tiredofit
Well-known Member
- Joined
- Apr 11, 2013
- Messages
- 1,834
- Office Version
- 365
- 2019
- Platform
- Windows
I have the following column of data:
I need to look up each row from the above table in the following table to find a partial match:
The answer would be:
Is this possible WITHOUT VBA?
The best I have come up with, so far is this formula:
taken from:
where substrings is the second table range from apple fair to lime from abroad.
but this only returns a TRUE or FALSE. It doesn't return the value, eg apple fair or lime from abroad.
Thanks
Description |
ten bananas |
rotten smelly apples |
very ripe oranges |
sour lemons to be binned |
blue limes? |
I need to look up each row from the above table in the following table to find a partial match:
Fruits |
apple fair |
really sweet pineapple |
lemon or not |
lime from abroad |
The answer would be:
Sentence | Match? |
ten bananas | no match |
rotten smelly apples | apple fair |
very ripe oranges | no match |
sour lemons to be binned | lemon or not |
blue limes? | lime from abroad |
Is this possible WITHOUT VBA?
The best I have come up with, so far is this formula:
Code:
=SUMPRODUCT(COUNTIF(A2,"*"&substrings&"*"))>0
taken from:
Range contains one of many substrings
To test a range and determine if it contains one of many substrings (partial matches, specific text, etc.) you can use use a formula based on the COUNTIF function nested in the SUMPRODUCT function.
exceljet.net
where substrings is the second table range from apple fair to lime from abroad.
but this only returns a TRUE or FALSE. It doesn't return the value, eg apple fair or lime from abroad.
Thanks