Link to home
Start Free TrialLog in
Avatar of Jagwarman
Jagwarman

asked on

Find and copy

I then need to offset 2 rows and then copy every row from the active row down until the first blank row.

So lets say  Issues-Rates is in B45

offset 2 to 47

first blank is 52

so I need to copy rows from 47 to 52


Appreciate an Expert providing the VBA please.
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Range(ActiveCell.Offset(2, 0).Address & ":" & Range("B1048576").End(xlUp).Address).Copy
That copies range B47:B51. Is that what you want or do you want to copy rows 47 to 51?
This copies rows 47 to 51 to row 52

Rows(ActiveCell.Offset(2, 0).Row & ":" & Range("B1048576").End(xlUp).Row).Copy Destination:=Rows(Range("B1048576").End(xlUp).Row + 1 & ":1048576")
Avatar of Jagwarman
Jagwarman

ASKER

My copy paste missed out the first row of my question so it should have said

I need to find Issues-Rates in the active sheet

I then need to offset 2 rows and then copy every row from the active row down until the first blank row.

 So lets say  Issues-Rates is in B45

 offset 2 to 47

 first blank is 52

 so I need to copy rows from 47 to 52

If  Issues-Rates is in B145

 offset 2 to 147

 first blank is 252

 so I need to copy rows from 147 to 252

sorry about that
Is the word "Issues-Rates" on the sheet?
Do you mean you want to copy rows 47: 51 to row 52? Or do you mean you want to copy rows 47:52 to someplace else? If the latter, where do you want them put?
Issues-Rates is in the sheet somewhere could be anywhere when I find it I want to offset two rows and then copy entire row[s] from there to next blank row

Regards
ASKER CERTIFIED SOLUTION
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hanks Martin that's what I was looking for.
You're welcome and I'm glad I was able to help.

In my profile you'll find links to some articles I've written that may interest you.
Marty - MVP 2009 to 2015, Experts-Exchange Top Expert Visual Basic Classic 2012 to 2014