IF Searching Multiple Cells to result a label

apexRaiden

New Member
Joined
Oct 7, 2021
Messages
15
Office Version
  1. 365
Platform
  1. Windows
Hey everyone! First time poster. I've came across the site a bunch for answers, so I figured I'd bring by my first question...

I have a row of data with a 10 columns. I want to do an if(search to find "xxx" in one column and "####" in the other, and if it finds BOTH, to output XXX.

This is an example of what i currently have.

=IF(IFERROR(SEARCH("####",$K10)*SEARCH("XXX",$B10)>0,0),"XYZName",VLOOKUP($B3,'[XXXXXXXXX.xlsx]Auto Assign DB'!A:D,4,FALSE))

Please ignore any minor mistakes, this doesnt currently work but was the closest thing I could provide to give an idea of what im trying to accomplish...

IF this and that are found, label it this. IFERROR, vlookup the db.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi, congrats on your first post!

Maybe this minor change will resolve the issue?
Excel Formula:
=IF(IFERROR(SEARCH("####",$K10)*SEARCH("XXX",$B10),0)=1,"XYZName",VLOOKUP($B3,'[XXXXXXXXX.xlsx]Auto Assign DB'!A:D,4,FALSE))

And then put all of that in an IFERROR to put nothing if it's not the case?
Excel Formula:
=IFERROR(IF(IFERROR(SEARCH("####",$K10)*SEARCH("XXX",$B10),0)=1,"XYZName",VLOOKUP($B3,'[XXXXXXXXX.xlsx]Auto Assign DB'!A:D,4,FALSE)),"")
 
Last edited:
Upvote 0
Thank you for your reply! So awesome to see forums still a thing after so long!

I do have an update. I think my problem is trying to find 2 things in one string. I took out my search for characters and it worked but wont when I implement the 2nd criteria it needs to match/find in order to be named/labeled XYZ.

This is the working formula...
=IF(IFERROR(SEARCH("####",$K13),0)=1,"XYZName",VLOOKUP($B13,'Auto Assign DB'!A:D,4,FALSE))

I'm just looking to add a 2nd search criteria before confirming the match to label the XYZName.
 
Upvote 0
@apexRaiden

The only possibility I can see (since you want to output from the VLOOKUP when the search appears) is to just say = 0 instead of =1.
Excel Formula:
=IF(IFERROR(SEARCH("####",$K13),0)=0,"XYZName",VLOOKUP($B13,'Auto Assign DB'!A:D,4,FALSE))

If this does not do the trick, please provide more details of what it is you want to do. Otherwise, please let us know.
 
Upvote 0
I apologize, I thought I was clear on what I was trying to accomplish. I'll try to rephrase it again...

I have a spreadsheet of data. I am trying to use an if/iferror statement to assign a finding/column of data to an individual. I want it to look for a text finding AND a number finding in 2 different columns. And if, and ONLY IF, BOTH match - i want to assign it to "Name". If it doesnt match, i want it to go to my vlookup process i have at the end.

=IF(IFERROR(SEARCH("####",$K10)*SEARCH("XXX",$B10),0)=1,"XYZName",VLOOKUP($B3,'[XXXXXXXXX.xlsx]Auto Assign DB'!A:D,4,FALSE))
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,952
Members
448,535
Latest member
alrossman

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