How to use "Do... while/until... loop"

jongova

New Member
Joined
Dec 6, 2012
Messages
9
I have a Macro that find a specific value in this case the word "BRILLANTE-2 (DES)", when the word is found a range is selected, cut and paste in other book.

I want repeat this instruction because the word ""BRILLANTE-2 (DES)" could be more than one time in the Sheet. When the word doesn't exist, do nothing.


Thanks a lot


Cells.Find(What:="BRILLANTE-2 (DES)", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext, MatchCase:=False, SearchFormat:=False).Activate

ActiveCell.Offset(-3, 0).Range(Cells(1, 1), Cells(62, 11)).Select
Selection.Cut
Windows("Book1").Activate
ActiveSheet.Paste
Sheets.Add After:=Sheets(Sheets.Count)
Workbooks(2).Activate
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
if "BRILLANTE-2 (DES)", occurs in the same column AUTOFILTER for thils column for this creteria and use filtered data for your manipulatios. .
you can copy filtered data somwhere else and manipulate. if autofiltgered data is coied only the visible rows are copied. use this facility of excel.

if there is problem post small extrct of data and then explain what you want.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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