creating a loop in vba for an excel macro -


i have recorded macro in excel takes data cells in 1 page of spreadsheet , copies them page in different order. each cell individually, , quite long.

however 1 row of data in first page.

how make single macro loop copies same data each row new page?

i haven't included macro code since long can if necessary.

thanks

you omit code show relevant part, or code mockup macro address , problem.

lets imagine problem sub, in case highly omitted:

sub omittedsub()     ' stuff end sub 

you can create new sub call many times, new sub 1 calling instead:

sub loopomittedsubs()     dim integer      ' loop call macro routine multiple times     = 1 100         omittedsub     next end sub 

in case need pass value, example macro not know row affect , need tell it, can pass loop variable this:

sub omittedsub(irow integer)     ' stuff row number irow end sub  sub loopomittedsubs()     dim integer      ' loop call macro routine multiple times     = 1 100         omittedsub     next end sub 

this answer basics of vba. dont know how answer question better without knowing tried, how tried, etc...


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -