# Vlookup with IF, AND, and ISBLANK statement

#### GuitaristJLN

##### New Member
Hi guys I was wondering if there was a way to do a Vlookup with an IF, AND, perhaps even an ISBLANK statement and what that formula would look like for the following scenario.

I am trying to create a worksheet that will allow me to type in a restaurant ID and it tell me if It is closed on Saturdays by returning YES or NO. The raw data has thousands of entries so I wanted to create a bit of a dashboard where it returns YES or NO if two fields (Saturday inside-dinning & Saturday Drive through) are BLANK. If it has data in either one of the Saturday Inside-Dinning hours or Saturday Driv through hour fields then it should return YES.

So as a visual I want to type in the restaurant id and it display like the following:

 Restaurant ID Does the location have Saturday Hours? 112 YES 113 NO

The Raw data would look like this (Table/worksheet name is Restaurant Hours) :

 Restaurant ID M-F Hours Saturday Inside-dinning hours Saturday Drive through hours 112 8-5 11-4 113 8-5

I am learning more advanced excel as part of my new job role but was asked to help in creating the formula for the above scenario and don't even know where to start so I would really appreciate any help from you guys.

### Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Please try this, where A2 is the restaurant ID to look up:

Excel Formula:
``=IF(AND(VLOOKUP(A2,'Restaurant Hours'!A:D,3,FALSE)="",VLOOKUP(A2,'Restaurant Hours'!A:D,4,FALSE)=""),"NO","YES")``

Hi & welcome to MrExcel.
+Fluff 1.xlsm
ABCDEFG
1Restaurant IDM-F HoursSaturday Inside-dinning hoursSaturday Drive through hoursRestaurant IDDoes the location have Saturday Hours?
21128-511-4112Yes
31138-6113No
Lists
Cell Formulas
RangeFormula
G2:G3G2=IF(MAX(--ISTEXT(FILTER(\$C\$2:\$D\$3,\$A\$2:\$A\$3=F2,"")))>0,"Yes","No")

Replies
1
Views
410
Replies
8
Views
1K
Replies
6
Views
931
Replies
7
Views
418
Replies
2
Views
442

1,196,041
Messages
6,013,042
Members
441,746
Latest member
ArtemisAlex

### 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.

### Which adblocker are you using?

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

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