I have been trying to create a macro that will go through a spreadsheet and copy figures in Cells E, then paste them into Cell K and L, then repeat as the macro transverse column E. i.e. E1 will be copied to K1 and L1, E2 will be copied to K2, L2 etc...
This is what i have done so far:
Sub uy()
'
' Macro1 Macro
' lo
'
Range("E299").Select
Do Until IsEmpty(ActiveCell)
If ActiveCell.Value < 0 Then
Selection.Copy
Range("K299").Select
Do Until IsEmpty(ActiveCell)
ActiveSheet.Paste
Loop
Range("L299").Select
Do Until IsEmpty(ActiveCell)
ActiveSheet.Paste
Loop
Else
Range("L299").Select
Do Until IsEmpty(ActiveCell)
ActiveSheet.Paste
Loop
End If
ActiveCell.Offset(1, 0).Select
Loop
End Sub
When i run the macro it just highlights cell E229 with a broken line box and Cells K299, L299 are left blank. I feel Range("K299").Select, Do Until IsEmpty(ActiveCell), ActiveSheet.Paste
part is selecting and copying a blank cell, so it will terminate itself as it meets the "Do Until IsEmpty(ActiveCell)" criteria.
Is there a way for me to fix this?