View Single Post
 
Old 11-20-2015, 06:27 AM
Officer_Bierschnitt Officer_Bierschnitt is offline Windows 7 64bit Office 2013
Advanced Beginner
 
Join Date: Oct 2015
Posts: 87
Officer_Bierschnitt is on a distinguished road
Default Assemble a destination_range for auto-filling a formula

Hi,

I have a formula in, say, cell K1 and I want to fill it downwards - but only up to a specific row which is defined by the length of a list I have copied from another workbook.
Say that list has 33 entries - but it might be different. I can find the last row of this and fill it into a variable no problem.
How do I have to write the command for auto-filling the formula down to row 34 now?
The usual command >> Selection.AutoFill Destination:=Range("K2:K34"), Type:=xlFillDefault <<
won't work of course because I cannot be certain that 34 is the last row - that's why I have that variable. I just can't seem to get the syntax right to fill that into this command ...
Can anybody help me there?

Thanks a lot!

Best regards,

Officer_Bierschnitt
Reply With Quote