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

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
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

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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