Find/Cut/Paste Last Row

Strobbe

New Member
Joined
Jul 18, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hello,

Currently trying to create a Macro that will find "IBT" in my data set from Sheet2 then select the Current Region to cut that data to Sheet3.

currently i am able to find that "IBT" select current region cut and paste to Sheet3, however cannot figure out how to loop this to grab all data that contains the "IBT"


Dim lastrow As Long

lastrow = Worksheets("Sheet3").Range("A5000").End(xlUp).Row

Cells.Find(What:="IBT", After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Select

ActiveCell.CurrentRegion.Select
Selection.Cut Worksheets("Sheet3")
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

RobP

Active Member
Joined
May 8, 2008
Messages
335
Office Version
  1. 365
Platform
  1. Windows
Thats great - glad to have helped, and appreciate the feedback..

Kind Regards

Rob
 

Forum statistics

Threads
1,176,267
Messages
5,902,245
Members
434,954
Latest member
kchallr00

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
Top