Copy row2 cells down to last cell where the whole row isn't all blank

  • Thread starter Thread starter alienscript
  • Start date Start date
A

alienscript

Hi Colo,

I tried to run your code to copy formula in cell K2 (I place the cursor
on cell K2) down to last cell in column K, it doesn't copy down the
formula.

Is there anything missing from the code ?
Please help and thanks very much!



Sub Cell2CopyToEnd()

Dim col As Long
col = ActiveCell.column
Range(Cells(2, col), Cells(Rows.Count, col).End(xlUp)).Formula = _
Cells(2, col).Formula

End Sub
 
I put a value in K99 (so the macro knew when to quit) and I put a formula in K2.

With K2 selected, I ran the code and it worked fine.

The code does use the fact that there's something in column K to determine the
last row. Does your data fit that?
 
Back
Top