Modify formula so it doesn't return 0 if not true

suprsnipes

Active Member
Joined
Apr 26, 2009
Messages
434
How do I modify the following formula so it doesn't return 0 when it's not true?

Code:
=INDEX(F10:F297,MATCH(1,IF(E10:E297="Yes",1)),0)

Regards,
suprsnipes
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
When the cell in column F is = blank
Then try this
{=IF(INDEX(F10:F13,MATCH(1,IF(E10:E13="Yes",1)),0)="","",INDEX(F10:F13,MATCH(1,IF(E10:E13="Yes",1)),0))}

Edit: Oops, I forgot to increase the ranges back to yours but hopefully you picked that up.

But couldn't you just usr a simple INDEX/MATCH or VLOOKUP (with adjusted ranges)?

=IF(INDEX(F10:F22,MATCH("Yes",E10:E22,0))="","",INDEX(F10:F22,MATCH("Yes",E10:E22,0)))

=IF(VLOOKUP("Yes",E10:F22,2,0)="","",VLOOKUP("Yes",E10:F222,2,0))
 
Last edited:
Upvote 0
Is the formula is expected to return a text value? If so, do you want return blank if the F-value does not exist i.e., empty?
 
Upvote 0
Yes that's what I want to do

Control+shift+enter, not just enter:

=T(INDEX(F10:F297,MATCH(1,IF(E10:E297="Yes",1),0)))

Or, no CSE, just:

=T(INDEX(F10:F297,MATCH("Yes",E10:E297,0)))

If you also want to avoid #N/A...

2007 and later...

=IFERROR(T(INDEX(F10:F297,MATCH("Yes",E10:E297,0))),"")

All versions...

=LOOKUP(REPT("z",255),CHOOSE({1,2},"",T(INDEX(F10:F297,MATCH("Yes",E10:E297,0)))))
 
Last edited:
Upvote 0
I used the following formula which worked perfectly.

Code:
=T(INDEX(F10:F297,MATCH("Yes",E10:E297,0)))

Appreciate it the suggestions Peter & Aladin.
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,828
Members
452,946
Latest member
JoseDavid

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