Help with adding blank handling to IF INDEX MATCH?

slam

Well-known Member
Joined
Sep 16, 2002
Messages
848
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

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
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,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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