Finding and selecting specific text in a worksheet

chadski778

Active Member
Joined
Mar 14, 2010
Messages
297
I would like code for finding specific text in my worksheet, selecting it and also selecting all the data in the rows below until the first empty is found. Example below:

Excel Workbook
FGHI
33Actual%Generic NameEC HazardCAS Number
3474.92Highly refined mineral oil (IP346N/CVarious
3574.92Highly refined mineral oil (IP346N/C64742-62-7
3674.92Highly refined mineral oil (IP346N/C64742-65-0
3710Highly refined mineral oil (IP346N/C64742-54-7 or 92062-09-4
385.852Highly refined mineral oil (IP346N/C64742-65-0 or 64741-88-4 or 64741-89-5 or 72623-86-0
393.99Polyolefin polyamine succinimide polyolR53Polymer
401.064Calcium alkaryl sulphonateR53Not available
411.064Zinc dialkyldithiophosphateR41-51/5368649-42-3
421.06Olefin co-polymerN/CConfidential
430.99Highly refined mineral oil (IP346N/CNot available
440.99PolyalkylmethacrylateN/CNot available
450.931Calcium alkaryl sulphonateR43-53Not available
460.399Borated polyolefin polyamine succinimideR53Not available
470.133Polyolefin polyamine succinimide molybdenum cmplxN/CPolymer
480.0532PolyalkarylamineR51/5368411-46-1
490.0266Branched alkanesR38-65-51/53Polymer
500.01Alkyl methacrylate (as impurity)R36/37/38-50/53142-90-5
Composition


In effect, the macro will find and select "Actual%", "Generic Name", "EC Hazard" and "CAS Number", which are in columns F, G, H and I, and the data in the rows below the headings in the same columns. Effectively, it is like selecting a table of data
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,224,520
Messages
6,179,270
Members
452,902
Latest member
Knuddeluff

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