Retrun a 0 instead of false with the HLOOKUP FUNCTION.

David Brownell

New Member
Joined
Mar 29, 2019
Messages
6
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"
Thanks for your help!
Dave
 

Some videos you may like

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
Joined
Jun 12, 2014
Messages
55,470
Office Version
  1. 365
Platform
  1. Windows
What should happen if AL107 isn't Yes or No?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,470
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

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

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,470
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
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.
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
Top