Excel formula for searching two text in one cell and return values based on the result

0 votes

I'm looking for an Excel formula that would search two text strings (dba, BP) in a single cell and return values based on whether dba or BP was found. I used the formula below, but it only returned one value.

=IF(OR(ISNUMBER(SEARCH("dba,A25)),ISNUMBER(SEARCH("bpi",A25))),"dba","")
Oct 10 in Others by Kithuzzz
• 20,660 points
54 views

1 answer to this question.

0 votes

You can include a second IF within the first one so that it functions as though it is testing for a second case if the first case does not match.

=IF(<first case>, <first case matched> ,IF(<second case>, <second case matched>, <no matches>))

In your case,

=IF(ISNUMBER(SEARCH("dba",A1)),"dba",IF(ISNUMBER(SEARCH("bpi",A1)),"bpi",""))
answered Oct 10 by narikkadan
• 37,660 points

Related Questions In Others

0 votes
0 answers

What is the formula to keep first two words in a cell over excel?

I want to maintain the first two ...READ MORE

Nov 2 in Others by Kithuzzz
• 20,660 points
27 views
0 votes
1 answer

In a excel formula I need to create a list of names on one sheet based upon criteria/data of another sheet

The final formula is: =IF(ROWS($H$3:H3)<=$I$1,INDEX(Personnel! ...READ MORE

answered Nov 25 in Others by narikkadan
• 37,660 points
26 views
0 votes
1 answer

Change the size of one cell in excel 2016

I'm sorry, but it's not feasible. A ...READ MORE

answered Oct 8 in Others by narikkadan
• 37,660 points
50 views
0 votes
1 answer

Repeated excel rows based on a cell with multiple values

You can use this query: let ...READ MORE

answered Oct 20 in Others by narikkadan
• 37,660 points
46 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hello, yes u can find your birthdate using ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
145 views
0 votes
1 answer

Calculate Birthdate from an age using y,m,d in Excel

Hi To Calculate the date, we can ...READ MORE

answered Feb 16 in Others by Edureka
• 13,640 points
248 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17 in Others by Edureka
• 13,640 points
112 views
0 votes
1 answer

IF - ELSE IF - ELSE Structure in Excel

In this case, you can use nested ...READ MORE

answered Feb 18 in Others by gaurav
• 22,040 points
79 views
0 votes
1 answer

Formula for inserting a thumbnail picture into excel cell, based on another cell's value

Here is a really excellent tutorial on ...READ MORE

answered Oct 31 in Others by narikkadan
• 37,660 points
61 views
0 votes
1 answer

Text with a dash in the cell but not in the formula bar (Excel)

What you have got here is called ...READ MORE

answered Nov 13 in Others by narikkadan
• 37,660 points
33 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP