Emacs macro tip: press F3 during macro creation to insert an incrementing number. You can use kmacro-set-counter to set its initial value.