View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
klafert klafert is offline
external usenet poster
 
Posts: 127
Default Need help wiht a macro for autofill rows

Will the 22 line is not really blank - I had somebody help me copy the rows -
(wished I had used a macro to autofill that sheet), but anyway they copied 23
rows instead of 22 and their is data that needs to line up. In other words I
have data in column a2-ag on 23 but line 23 is not needed and I have to line
the data for the next set on line 24 and 23 will end up getting deleted out.
The data I am copying is :
Payfield # Payfield acct
H2 = 1 I2=50101
h3 =2 I3=50101
h4=3 I4=50101
h5=22 I5=22100
h6=23 and so on until H23
and the same but different column heading for I2-L2 for 23 lines. Besides
the formula I am copying other data besides the formula in column K2-K23. I
will copy the formula in column K using the Fill down command. After the
macros runs then there will a line with #N/A. Then I can sort and delete
those lines. I am pulling data from another spreadsheet using the Index
command. The line I want to skip wil not have anything to pull and will have
the error that I can sort and delete.

"Don Guillett" wrote:

Why not a macro to copy all the way downcome back and insert rows using a
loop step 20

--
Don Guillett
SalesAid Software

"klafert" wrote in message
...
I have a spreadsheet that has 10915 lines. I am copying the same formula
from row 2 - columns H2..L2 to the next 21 rows then there will be one
blank
row and I will copy the same columns for the next 21 rows - blank row
again
and so on.

Example:

I highlight row 2 (column H2-L2) Fill down H2:L2 to h23:L23 then I have
one
blank row and then I would copy H2-L2 thru H23-l23 to h25-L46 - Hope that
is
clear enough for somebody to understand if not let me know.