Macro to Copy next data from a cell

su2009

Board Regular
Joined
Sep 24, 2010
Messages
81
hi,

I need a macro to copy the data from EFG to 9000 after cell ABC. ABC is random cell and has been selected. To sum, I want a macro that could copy the next data from a random cell.

ABC EFG

9000
 
Last edited:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
EFG, 9000, ABC... what are these? Named ranges? They aren't valid range references.
Perhaps you are just generalizing things. If so, can you walk us through an actual example with real range references?
Maybe then it will make more sense to me what you are trying to do.
 
Upvote 0
hi

here is my macro

Sub Copy()

Sheets("Sheet1").Select
NextRow = Range("A65536").End(xlUp).Row - 0
Range("A" & NextRow).Select
Range("A3:I3").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
End Sub


Instead of selecting A3:I3 for copying, I would like a macro that can select the current cells and 8 cells on the right as well as selecting 3 rows down for copying
 
Last edited:
Upvote 0
I would like a macro that can select 8 cells on the right and also selecting 3 rows down
To the right of what exactly? A specific cell? The ActiveCell? Something else?
We need to establish what the starting cell will be. Is it always going to be the same, or is there some logic on how to get there?
 
Upvote 0
8 cells to the right from ActiveCell. Macro has to copy the ActiveCell too. It is going to be the same.
 
Upvote 0
I would like a macro that can select the current cells and 8 cells on the right as well as selecting 3 rows down for copying
Try this line of code:
Code:
    Range(ActiveCell, ActiveCell.Offset(3, 8)).Copy
 
Upvote 0
Three rows down including the active cell row? If so...

Code:
ActiveCell.Resize(3, 8).Copy

If it's excluding the active cell row, in other words you'll want 4 rows of data copied, change the 3 above to 4.
 
Upvote 0
Code:
ActiveCell.Resize(3, 8).Copy
Ah yes, good ol' Resize.
Why do I always forget about that?
 
Upvote 0
Happens to the best of us. Unless you're Rory, then this is foreign to you. ;)
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top