Hi guys,
I have the below code to copy down cells up to the level of adjacent column. I have a couple of questions;,
Thank you!
I have the below code to copy down cells up to the level of adjacent column. I have a couple of questions;,
- If I run the macro multiple times I get excess data cells at the bottom. Do I need to add an if statement to stop the copying of cells if it is already level with column to the left?
- Is there a neat way of combining the two With statements into one?
Thank you!
Code:
With Range("C" & Rows.Count).End(xlUp)
Range(.Offset(1, 0), Range("C" & Range("B" & Rows.Count).End(xlUp).Row)) = .Value
End With
With Range("D" & Rows.Count).End(xlUp)
Range(.Offset(1, 0), Range("D" & Range("C" & Rows.Count).End(xlUp).Row)) = .Value
End With