VLOOKUP with IF and AND

DiscoJean

New Member
Joined
Apr 5, 2018
Messages
5
I currently have the following formula which is saying that I've entered too few arguments for this function.

How would I go about fixing it? Is there an easier way?

=IF(AND(VLOOKUP('TAB1'!C2:C500=1,'TAB1'!D2:D500="yes"),"in use","available")

I want it to check the TAB1 sheet in column C to see if it returns either 1, 2, 3, 4, 5, 6, 7 or 8 (entered manually - no formula) (there will be other cells focusing on 2, 3, 4 etc.) and column D to see if that slot says "yes".

I want it to say "in use" if both conditions are fulfilled, and "available" if column D is not fulfilled.

Any help will be most appreciated, particularly if I'm using the wrong formula!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
I have changed it to the following:

=IF((AND((VLOOKUP(C1,'TAB1'!$D$2:$E$500,1,FALSE)),(VLOOKUP("yes",'TAB1'!$D$2:$E$500,2,FALSE)))),"in use","available")

But am getting #N/A as there is not data in all of the fields as we will add it as time goes by.

I'm trying to add the ISNA formula into this, but am unsure as to where to insert it.
 
Upvote 0
So, are you just trying to check to see if the value in cell C1 exists in column D on TAB1, and that the value in column E one that same row is equal to "yes", and if so, return "in use", else return "available"?

If so, try this formula instead:
Code:
=IF(COUNTIFS('TAB1'!D$2:D$500,C1,'TAB1'!E$2:E$500,"yes"),"in use","available")
 
Upvote 0
You are welcome.
 
Upvote 0

Forum statistics

Threads
1,216,073
Messages
6,128,645
Members
449,461
Latest member
kokoanutt

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