Vlookup search 2 ranges depending if the reference cell contains certain text

ElsiE93

New Member
Joined
Dec 5, 2018
Messages
17
Hi guys,I'm trying to create a formula that will correctly search either of 2 ranges of data depending on if the reference cell contains certain text. Both ranges are on 2 different tabs to the summary tab where my reference cell is.My 2 ranges are:Input Corby Picker Data (Range) A:FInput GT BP Picker Data (Range) A:FI want a formula that will look up the value in my G column and if the cell contains 'CY10' then search in the Input Corby Picker Data tab using the value in my A column. If not, use the range in the GT BP Picker Data tab. Data to be extracted is in the 4th column of both ranges of data and I want an exact match.I have tried the formula below but get #Value !. Any help you could give me would be greatly appreciated! :)=VLOOKUP(A14,IF(G14&"CY10",'Input Corby Picker Data'!A:F,'Input GT BP Picker Data'!A:F),4,FALSE)
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
You are very close, try:

=VLOOKUP(A14,IF(COUNTIF(G14,"*CY10*"),'Input Corby Picker Data'!A:F,'Input Gt BP Picker Data'!A:F),4,FALSE)
 
Upvote 0

Forum statistics

Threads
1,214,634
Messages
6,120,659
Members
448,975
Latest member
sweeberry

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