If statement with a Vlookup

waxb18

Board Regular
Joined
May 31, 2011
Messages
179
i want to perform this vlookup but i only want it to perform it IF the data in column AY states "Unknown"

VLOOKUP(A51,'RAW OPEN DATA'!$B$20:$S$1048576,16,FALSE)

Any ideas???
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Try:

Code:
=IF(AY51 = "Unknown", VLOOKUP(A51,'RAW OPEN DATA'!$B$20:$S$1048576,16,FALSE), "")

change cell references as needed
 
Upvote 0
would this only use cell AY51 as the reference for unknown?

Should it not be AY:AY = "unknown" ??
 
Upvote 0
The way i've written it will only check AY51 yes, (TBH i used it as you have a ref to A51)

stick AY:AY in and see what happens.
 
Last edited:
Upvote 0
Ok brilliant it works perfectly thanks

One quick one though, say i wanted to multiple if statements
say column B against a number say 53 would i use the same method?
 
Upvote 0
You could do, nested statments get complicated quickly though so i try and avoid multiple if statements, I think AND, OR etc.. look prittier
both take 2 or more arguments seperated by commas,
AND returns TRUE if all arguments inside are right
OR returns TRUE if ANY arguments are right

try


Code:
 =IF(AND(AY51 = "Unknown", B51 = 53), VLOOKUP(A51,'RAW OPEN DATA'!$B$20:$S$1048576,16,FALSE), "")

have a try and put AY:AY, B:B where you think they should go
 
Upvote 0
unfortunately it hasnt worked,

What ive decieded to do is create a new column and use a few &'s in my daya so i have things like "unknown50" then done a vlookup against this to give me my values

Thanks for the help
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,628
Members
452,933
Latest member
patv

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