Vlookup and If statement

Mmon0429

New Member
Joined
Feb 22, 2021
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
I am trying to do a vlookup and if combined. What I need is for a vlookup of a value as long as the row contains another value.

my formula I'm using is =IF(Sheet1!C:C=Sheet2!A1,VLOOKUP(SheetB2,Sheet1!G:S,13,FALSE))

I need to lookup what column S shows on Sheet 1 if column G of Sheet 1 matches the value of Sheet 2 cell B2, however I want it to only pull from rows in Sheet 1 that contain a certain in text in the C column (used A1 as a reference for this). As there are repeating values of cell B2 in the G column depending on what the column C criteria is. The formula I currently have just displays FALSE when entered.

PS Sorry for not having the mini-sheet upload. Not able to download external software on work computer. Thanks.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
You would be better uploading a picture with the formula bar showing the current formula, and maybe highlight the cell. Anyway, it seems that you're looking at the entire column C in your first condition?

Excel Formula:
=IF(C2=$A$1,VLOOKUP(B2,Sheet1!G:S,13,FALSE))

Obviously, you'd want to return something different to false if the vlookup is not found, or the text in C2 doesn't match A1:

Excel Formula:
=IF(C2<>$A$1,"C2 doesn't match A1 error text",IFERROR(VLOOKUP(B2,Sheet1!G:S,13,FALSE,"B2 lookup not found")))

I think IFERROR is a thing in excel 2013, but I don't have a copy to check.
 
Upvote 0

Forum statistics

Threads
1,213,532
Messages
6,114,177
Members
448,554
Latest member
Gleisner2

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