0

I know this should be straightforward enough but i cannot make my head get round this.

I am looking to Index if in excel and cannot do it.

Basically, i have a working formula =INDEX(E:E,MATCH(A2,B:B,0))

What i need is it to have a blank and not a N/A when there is no data further on in A:A

So, something like =IF(A2>0) THEN INDEX(E:E,MATCH(A2,B:B,0)) OTHERWISE "") would be perfect.

I have tried =If(a2>0)--INDEX(E:E,MATCH(A2,B:B,0),"").

HaveNoDisplayName
  • 8,291
  • 106
  • 37
  • 47
Scott
  • 15
  • 3

1 Answers1

1

Can we just look whether the INDEX function returns an error and keep the cell blank if that's the case? The formula would then look like

=IF(ISERROR(INDEX(E:E,MATCH(A2,B:B,0))),"",INDEX(E:E,MATCH(A2,B:B,0)))
LMM9790
  • 496
  • 2
  • 6
  • Thank you for your help, quite a few hours on this one but got there – Scott Mar 25 '16 at 17:24
  • This construct is exactly what the IFERROR function can do in a shorter way - `IFERROR(INDEX(E:E,MATCH(A2,B:B,0)), "")`. It returns the first argument if no error, and returns the second argument in case of any eror in the first argument. – MacroMarc Mar 27 '16 at 12:11