Help with adding blank handling to IF INDEX MATCH?

slam

Well-known Member
Joined
Sep 16, 2002
Messages
867
Office Version
  1. 365
  2. 2019
Could someone help me add a condition to this array formula where if the corresponding value in C3:C34 is blank, a blank "" is displayed? Currently it's displaying a 0 if C3:C34 is blank.

Code:
=IF(C3<>"",IFERROR(INDEX(INDIRECT("'"&B3&"'!C3:C34"),MATCH(D3,INDIRECT("'"&B3&"'!B3:B34"),0)),""),"")

Thank you
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Hi,

The formula isn't an array formula.

This would work but if you're looking up numeric values they would be returned as text strings.

=IF(C3<>"",IFERROR(INDEX(INDIRECT("'"&B3&"'!C3:C34"),MATCH(D3,INDIRECT("'"&B3&"'!B3:B34"),0)),""),"")&""

Failing that you could go for a longer construct like this

=IF(LEN(IF(C3<>"",IFERROR(INDEX(INDIRECT("'"&B3&"'!C3:C34"),MATCH(D3,INDIRECT("'"&B3&"'!B3:B34"),0)),""),""))=0,"",IF(C3<>"",IFERROR(INDEX(INDIRECT("'"&B3&"'!C3:C34"),MATCH(D3,INDIRECT("'"&B3&"'!B3:B34"),0)),""),""))
 
Upvote 0

Forum statistics

Threads
1,214,387
Messages
6,119,208
Members
448,874
Latest member
Lancelots

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