.cells question

M

Mona

I have this formula:
..Range(.Cells(cStartRow, 9), .Cells(cStartRow + nRows, 9)).FillDown

cStartRow=12 and nRows=counter that counts the number of rows. 9=column.

I want to use this formula for column 9 through 15. I could repeat formula
7 times and change the column number but surely there is a better way!

Thanks in advance!
 
P

Per Jessen

Hi

This should do it (untested)

..Range(.Cells(cStartRow, 9), .Cells(cStartRow + nRows, 15)).FillDown

Regards,
Per
 
D

Dave Peterson

dim iCol as long
for icol = 9 to 15
'do what you want...
.range(.cells(cstartrow,icol),.cells(cstartrow+nrows,icol)).filldown
next icol
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top