jcbetanzos
New Member
- Joined
- Apr 24, 2017
- Messages
- 5
Hello,
I need help with the following Macro:
Sheets("Sheet1").Activate
ActiveSheet.Range("E2:H2").Select
Selection.Copy
ActiveSheet.Range("E3").Activate
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Activate
Loop
Selection.PasteSpecial xlPasteAll
So basically, this macro copy the content for the range E2 to H2, then every time is active paste the content in column E, starting in the cell E3 only if the cell is empty.
The only thing is that I need to click on the macro to copy and paste the content of the range E2 to H2 and I want to know a way to do this automatically.
Something like:
if column A has values from the cell A2 to the A9, then copy the range E2 to H2 and paste it from the cell E3 to E9,
depending how many values have column A, if have values from cell A2 to A1788, then copy the range E2 to H2 and paste it starting in the cell E3 to E1788.
I need help with the following Macro:
Sheets("Sheet1").Activate
ActiveSheet.Range("E2:H2").Select
Selection.Copy
ActiveSheet.Range("E3").Activate
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Activate
Loop
Selection.PasteSpecial xlPasteAll
So basically, this macro copy the content for the range E2 to H2, then every time is active paste the content in column E, starting in the cell E3 only if the cell is empty.
The only thing is that I need to click on the macro to copy and paste the content of the range E2 to H2 and I want to know a way to do this automatically.
Something like:
if column A has values from the cell A2 to the A9, then copy the range E2 to H2 and paste it from the cell E3 to E9,
depending how many values have column A, if have values from cell A2 to A1788, then copy the range E2 to H2 and paste it starting in the cell E3 to E1788.