IF function with ISNumber(Search()) and Vlookup

dango000

New Member
Joined
Apr 6, 2020
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi!
I am trying to write a function that would use two vlookups, where in the first vlookup there are also IsNumber(Search()) supporting it. What I have written looks like this - IF(ISNUMBER(SEARCH("part of text", d3)),VLOOKUP(D3, 'tab x'!A:B,2,false),VLOOKUP(D3, 'tab x'!A:C,3,FALSE)).

As you can see that in the first Vlookup, if cell D3 starts with certain text then we use data set of A:B. If D3 doesn't start with the needed text, then it is false and the second vlookup performs the search for cell D3 in the A:C dataset. Unfortunately, the function doesn't return what I need, however before I had those functions separately and they worked. It would be great if there is a solution to combine the two.

*I also tried IFERROR instead of IF and it didn't help

Thanks a lot!!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
If 'part of text' is found anywhere within cell D3 then you return the first vlookup, if it isnt the second. You didnt say why you have a problem with that?
 
Upvote 0
Hi Steve!

the function returns the same value in all of the cells in the column.
Hope this helps!
 
Upvote 0
That just means the isnumber is always true or always false most probably. I cant see the workbook to tell which
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,552
Members
449,088
Latest member
davidcom

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