# Retrun a 0 instead of false with the HLOOKUP FUNCTION.

#### David Brownell

##### New Member
I need a little help with a function I am trying to get to return a zero value in the cell when the question asked is not "yes".
I found some help in the archives, but I'm not well versed enough to figure it out for my situation.
This is the formula I have now; =IF(AL107="YES",(HLOOKUP(AL105,Sheet2!D2:HV10,8,FALSE)))
What I would like is if I enter "no" in the AL107 cell, I want to return a "0". currently it returns "FALSE"
Dave

### Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

#### Fluff

##### MrExcel MVP, Moderator
What should happen if AL107 isn't Yes or No?

#### David Brownell

##### New Member
What should happen if AL107 isn't Yes or No?
Those will be the only questions, the answering cell provides the other functions.

#### David Brownell

##### New Member
Those will be the only questions, the answering cell provides the other functions.
If it would help to simplify it further...anything other than "yes" returns a "0". the "yes" function performs as wanted.

#### Fluff

##### MrExcel MVP, Moderator

=IF(AL107="YES",HLOOKUP(AL105,Sheet2!D2:HV10,8,FALSE),0)

#### David Brownell

##### New Member
=IF(AL107="YES",HLOOKUP(AL105,Sheet2!D2:HV10,8,FALSE),0)
PERFECT! I wasn't adding a ) between the "FALSE" and "0" when I tried that earlier.
Knew it should be quite simple.
Thanks so much!

#### Fluff

##### MrExcel MVP, Moderator
You're welcome & thanks for the feedback.

Replies
4
Views
164
Replies
6
Views
97
Replies
5
Views
472
Replies
2
Views
108
Replies
4
Views
149

1,127,443
Messages
5,624,802
Members
416,054
Latest member
Ariel2219

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