Forum

Notifications
Clear all

IF, INDEX, MATCH

4 Posts
2 Users
0 Reactions
102 Views
(@mittn)
Posts: 29
Eminent Member
Topic starter
 

I seem to have a problem with the below formula

 

=IF(D10,(CONCAT(B10,"-",(INDEX(Filterin_ProcessCodes,MATCH(C10,FilterOut_ProcessCodes,0))), "-", D10)), "TESTING")

 

If there is a value in D10, then I want it to return the Concate formula, (which is working perfectly fine), until I nest into this IF formula. If there is no value in D10, then it returns "TESTING". So that is also working correctly, but when D10 has a value in it, I get a #VALUE message..... so the true test is not working.

 

Where am I going wrong?

 

As I said the CONCAT function works perfectly fine without the IF function, but as soon as I nest it in the IF function it stops working.

 

thanks 

 
Posted : 07/12/2020 8:59 pm
Philip Treacy
(@philipt)
Posts: 1631
Member Admin
 

H Tania,

You have to explicitly state a test for the IF.  As it is you just have IF(D10, ...  but it needs to be something like IF(D10<>"",......

Regards

Phil

 
Posted : 07/12/2020 10:38 pm
(@mittn)
Posts: 29
Eminent Member
Topic starter
 

all good.... I fixed it myself, I just needed to add ">0" after D10.  Now it works perfectly!!! 

 

so it should read

 

=IF(D10>0,(CONCAT(B10,"-",(INDEX(Filterin_ProcessCodes,MATCH(C10,FilterOut_ProcessCodes,0))), "-", D10)), "TESTING")

 

I get there in the end.

 

thanks anyway

 
Posted : 07/12/2020 11:35 pm
(@mittn)
Posts: 29
Eminent Member
Topic starter
 

Hi Philip

sorry I only just saw your message..

 

yes you are absolutely correct... I added the ">0" and it works like a charm

 

thanks for your input.

 
Posted : 07/12/2020 11:36 pm
Share: