Search and Count

sndfx69

New Member
Joined
Apr 19, 2011
Messages
3
Hi All,

I would like a macro that would search a range of cells for a specific word and also count how many times the word has been used in the range, because the word is entered in the range more than once.

Thank you in advance for your support. ;)
 
There are hundreds of these.. so when I type in the wild card word.. I need something to gather the relevant lines
S.S.316 BALL VALVE 2 WAYS 1.1/4"
S.S.316 BALL VALVE 2 WAYS 2"
S.S.304 HOSE CLAMPS 11-17
S.S.304 HOSE CLAMPS 13-20
DIN 2982 WELD NIPP.S.S.316 1/2"
DIN 2982 WELD NIPP.S.S.316 1/4"
DIN 2986 FULL SOCKET S.S. 316 3/8"
DIN 2986 FULL SOCKET S.S. 316 1"
DIN 2986 FULL SOCK.S.S.316 1"1/2
DIN 2986 FULL SOCK.S.S.316 1"1/4
DIN 2986 FULL SOCKET S.S. 316 2"
DIN 2986 FULL SOCK.S.S.316 2"1/2
HALF SOCKETS S.S.316 1/2"
HALF SOCKETS S.S.316 1/4"
S.S.316 UNION CONICAL SEAT 1/2"
S.S.316 UNION CONICAL SEAT 1/4"
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
There are hundreds of these.. so when I type in the wild card word.. I need something to gather the relevant lines

S.S.316 BALL VALVE 2 WAYS 1.1/4"
S.S.316 BALL VALVE 2 WAYS 2"
S.S.304 HOSE CLAMPS 11-17
S.S.304 HOSE CLAMPS 13-20
DIN 2982 WELD NIPP.S.S.316 1/2"
DIN 2982 WELD NIPP.S.S.316 1/4"
DIN 2986 FULL SOCKET S.S. 316 3/8"
DIN 2986 FULL SOCKET S.S. 316 1"
DIN 2986 FULL SOCK.S.S.316 1"1/2
DIN 2986 FULL SOCK.S.S.316 1"1/4
DIN 2986 FULL SOCKET S.S. 316 2"
DIN 2986 FULL SOCK.S.S.316 2"1/2
HALF SOCKETS S.S.316 1/2"
HALF SOCKETS S.S.316 1/4"
S.S.316 UNION CONICAL SEAT 1/2"
S.S.316 UNION CONICAL SEAT 1/4"
Ok, if you were going to seach that data for some criteria what would it be and what result do get that is not correct?
 
Upvote 0
Ok, if you were going to seach that data for some criteria what would it be and what result do get that is not correct?

If I type in HOSE (upper or lower caps).. in the query cell.. I only want the following result to appear

S.S.304 HOSE CLAMPS 11-17
S.S.304 HOSE CLAMPS 13-20

I could use this in a filter list (if cell to right gets value 1 - for example - then select 1 to see them)
.. or if you can suggest something better (vlookup?)
 
Upvote 0
If I type in HOSE (upper or lower caps).. in the query cell.. I only want the following result to appear

S.S.304 HOSE CLAMPS 11-17
S.S.304 HOSE CLAMPS 13-20

I could use this in a filter list (if cell to right gets value 1 - for example - then select 1 to see them)
.. or if you can suggest something better (vlookup?)
Book1
ABCDE
2S.S.316 BALL VALVE 2 WAYS 1.1/4"0Search Forhose
3S.S.316 BALL VALVE 2 WAYS 2"0
4S.S.304 HOSE CLAMPS 11-171
5S.S.304 HOSE CLAMPS 13-201
6DIN 2982 WELD NIPP.S.S.316 1/2"0
7DIN 2982 WELD NIPP.S.S.316 1/4"0
8DIN 2986 FULL SOCKET S.S. 316 3/8"0
9DIN 2986 FULL SOCKET S.S. 316 1"0
10DIN 2986 FULL SOCK.S.S.316 1"1/20
11DIN 2986 FULL SOCK.S.S.316 1"1/40
12DIN 2986 FULL SOCKET S.S. 316 2"0
13DIN 2986 FULL SOCK.S.S.316 2"1/20
14HALF SOCKETS S.S.316 1/2"0
15HALF SOCKETS S.S.316 1/4"0
16S.S.316 UNION CONICAL SEAT 1/2"0
17S.S.316 UNION CONICAL SEAT 1/4"0
Sheet1

Formula entered in B2 and copied down:

=COUNTIF(A2,"*"&E$2&"*")
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
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