Search multiple text in one string
Pilar,
How about different AND better.... Simply make a table with the unique keywords listed down a
column, and then categorize them:
Keywords Category
Per Diem 3 Travel
Diem Lodging 3 Travel
Diem 3 Travel
etc, etc
Then use VLOOKUP to pick up the category (use false as the 4th argument to force an exact match)
HTH,
Bernie
MS Excel MVP
"Pilar Morales" wrote in message
...
Greetings,
I have a pivot table where the first column holds the string to search
(first value in E21)
Airfare Account
AirFare Transactions
Car Rental
Meals & Incidentals
I have a table of 12 categories with about 3 keywords each:
Pick List: Keywords:
D E F G
3 Travel - Per Diem Diem lodging diem
4 Travel - Rental Car car mileage Ground trans
5 Travel - Airfare Air air Fare
6 Travel - Other travel
D21 (cell to the left of pivot table value) should automatically categorize
the item. Find is case sensitive, Search worked better...
This is what I have on D21:
=IFERROR(IF(SEARCH(OR($E$3,$F$3,$G$3),E21),$D$3,"c ontinue with next
keywords"),$D$14)
OR- Doesn't work on multiple search or find. Not sure how to do it in VBA.
Brain freeze Help..please :) Different/faster/better solutions also welcome.
Thanks,
Pilar
|