Question on Like * values

SKV

Active Member
Joined
Jan 7, 2009
Messages
257
I want to filter records based on specific words which can places any where with that field record.

I am looking for a solution to have a table with list of these words and then use this table to flag records that contain these words in my original table.

Please guide on how to develop this solution.

I can do hard coding like *xx* but want to avoid it if possible.

Thanks
SKV
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
You can use subquery with EXISTS:

In the SQL query below, tbl_main is the main table with fld_lookin field that you are trying to match with the values in the tbl_lookup table's fld_keyword field.

Code:
SELECT *
FROM tbl_main
WHERE EXISTS (
  SELECT fld_keyword FROM tbl_lookup 
  WHERE tbl_main.fld_lookin LIKE "*" & fld_keyword  & "*"
);


I hope it helps.



I want to filter records based on specific words which can places any where with that field record.

I am looking for a solution to have a table with list of these words and then use this table to flag records that contain these words in my original table.

Please guide on how to develop this solution.

I can do hard coding like *xx* but want to avoid it if possible.

Thanks
SKV
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,040
Members
449,063
Latest member
ak94

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