Index match return zero instead blanks

0

Greeting,

I am apply the following formula, the formula return blank cells as a number instead of returning as blank. Is there a way to fix this, so that it returns just a blank value?

In result sheet

C3=IF(INDEX(DATA!$D$3:$D$25,MATCH(1,INDEX((DATA!$C$3:$C$25=$B3)*(MID(DATA!$B$3:$B$23,1,2)=MID($A3,2,2))*(DATA!$A$3:$A$25=C$2),0),0))="OK","OK",INDEX(DATA!$B$3:$B$25,MATCH(1,INDEX((DATA!$C$3:$C$25=$B3)*(MID(DATA!$B$3:$B$23,1,2)=MID($A3,2,2))*(DATA!$A$3:$A$25=C$2),0),0)))

Column A= No
Column B=Type
Column C=ID
Column D=Status

If column D is blank formula return 0 but I want blanks.

DATA            
Order   TYPE    ID  Reason
02792   88908-13    0060    BBP
02792   88896-13    0220    KVT
02792   88139-03    0140    IVT
02792   88142-03    0300    TTR
02792   88151-03    0200    OK
02792   88154-03    0350    OK

02793   88908-13    0060    BBP
02793   88896-13    0220    KVT
02793   88139-03    0140    OK
02793   88142-03    0300    GST
02793   88151-03    0200    KPY
02793   88154-03    0350    OK

02794   88908-13    0060    
02794   88896-13    0220    
02794   88139-03    0140    
02794   88142-03    0300    
02794   88151-03    0200    
02794   88154-03    0350    

enter image description here

enter image description here

johon

Posted 2017-10-13T21:07:38.450

Reputation: 7

Why not put a Nested IF after ="OK","OK" to also check for Blank. If Blank return Blank else rest of the formula as is. – patkim – 2017-10-14T01:35:55.020

Thanks for your reply. I try to apply if but I got error. How to apply if the same formula. Please help me – johon – 2017-10-14T05:28:37.523

Answers

0

In your other sheet where you are maintaining the Results table in Cell C3 put this formula and drag it down across the length & the width.

=IF(INDEX(Data!$D$3:$D$25,MATCH(1,INDEX((Data!$C$3:$C$25=$B3)*(MID(Data!$B$3:$B$23,1,2)=MID($A3,2,2))*(Data!$A$3:$A$25=C$2),0),0))="OK","OK",IF(INDEX(Data!$D$3:$D$25,MATCH(1,INDEX((Data!$C$3:$C$25=$B3)*(MID(Data!$B$3:$B$23,1,2)=MID($A3,2,2))*(Data!$A$3:$A$25=C$2),0),0))="","",INDEX(Data!$B$3:$B$25,MATCH(1,INDEX((Data!$C$3:$C$25=$B3)*(MID(Data!$B$3:$B$23,1,2)=MID($A3,2,2))*(Data!$A$3:$A$25=C$2),0),0))))

Since your main formula is eventually based on IF logic, in addition to checking for "OK" it also puts a nested IF to check for blank and then your rest of the formula follows. Hope this helps. Revert back in case this does not work or what error you get.

patkim

Posted 2017-10-13T21:07:38.450

Reputation: 3 699

Thank you for taking the trouble to help me and explain the IF logic. I do appreciate it . Sorry for the late reply. – johon – 2017-10-14T19:29:16.260