A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Try
=IF(SUM(--ISNUMBER(FIND({"BRAKE","TIRE"},C2))),B2,0)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Background:
I often import large datalists from SAP into Excel to evaluate, sort and/or analyze costs. In this data list, each row (of which there are many thousands) contains a variety of data, such as posting date, $ amount, and description of expense. The description of expense is a text string, such as "Transmission repairs, oil chage", or "Replace tires, front brakes and rear springs". I want to enter a formula that extract the corresponding $ amount only if the text string contains either of several specified "key words".
So Far:
After searching Excel Help, I found this example:
Check if part of a cell matches a specific text
Row Column A
1 Data
2 Davolio
3 BD123
The example provides the Formula: =IF(ISNUMBER(FIND("v",A2)),"OK","Not Ok")
Which checks to see if A2 contains the letter "v", which it does, so it returns the value "OK" in the target cell
My Attempt:
Lets use the following sample date for my situation:
Row Col A Col B Col C
1 Date $Amt Description
2 22.06.2011 1,157.21 REPLACE BRAKE ROTORS/CALIPERS
3 24.06.2011 2,740.85 TRANSMISSION NOT DOWNSHIFTING
4 04.07.2011 499.80 OIL/FILTER CHANGE, TIRE ROTATION
In my case, I thought I could modify the FIND subfunction in the formula with an OR function to search a larger text string for multiple text expressions, so I tried this:
=IF(ISNUMBER(FIND(OR("BRAKE","TIRE"),A2)),B2,0)
Unfortunately, my modified formula above only returns the value "TRUE" in the target cell. I confess, I do not understand the application of the ISNUMBER function in the use of evaluating a text string, so I really don't know where this is going wrong.
My bottom line need, is to be able to specify several "key word" text expressions, either in an OR function, or a lookup table, so that the presence of either of the keywords in the cell to be evaluated (col c) will return the corresponding dollar amount (col b) to the target cell (col D).
Would really appreciate some help.
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Try
=IF(SUM(--ISNUMBER(FIND({"BRAKE","TIRE"},C2))),B2,0)
Answer accepted by question author
=IF(SUMPRODUCT(--(ISNUMBER(SEARCH({"BRAKE","TIRE"},A2))))>0,B2,0)
opps you are right it works only with brake, I didn't check it
I am not too sure how your formula differs from the one posted by the OP? The issue that I see is that if you try to evaluate
OR("BRAKE", "TIRE")
the result is checking to see if either of those 2 words is true which really does not make sense and the formula falls apart from there. Since Both Find and Seach only take a single argument as the search string I do not see how to get around this without sumproduct or an array type formula....
Hi, try
=IF(ISNUMBER(FIND({"BRAKE","TIRE"},A1)),B2,0)