# Combining OR Function with INDEX MATCH.

✭✭✭✭✭

Hi,

I tried using Combination of OR Function with INDEX MATCH and phrased it as below

=INDEX({Ref Column}, MATCH(OR([Column #]@row, {Column # SheetA},

{Column # SheetB},{ Column # SheetC}), 0))

but it if throwing #INVALID DATA TYPE.

whereas =INDEX({Ref Column}, MATCH([[Column #]@row, { Column # SheetA},

0)) is working perfectly.

• ✭✭✭✭✭✭

Try something like this...

=IFERROR(IFERROR(INDEX({Ref Column}, MATCH([Column #]@row, {Column # SheetA}, 0)), INDEX({Ref Column}, MATCH([Column #]@row, {Column # SheetB}, 0))), INDEX({Ref Column}, MATCH([Column #]@row, {Column # SheetC}, 0)))

• ✭✭✭✭✭

Hi Paul,

I tried with your suggestion, but getting #INCORRECT ARGUMENT SET error

My exact Formula is as under:

=IFERROR(IFERROR(INDEX({Doc Name}, MATCH([Work Order #]@row, {Work Order #THRML}, 0)), INDEX({Doc Name ACPwr}, MATCH([Work Order #]@row, {Work Order #ACPwr}, 0))))

Prajna

• ✭✭✭✭✭✭
edited 08/26/20

In your original post you referenced 3 different sheets. In your formula above you are only referencing 2. You are missing the 3rd INDEX/MATCH for Sheet C which goes in the second position of the first IFERROR.

=IFERROR(IFERROR(INDEX({Ref Column}, MATCH([Column #]@row, {Column # SheetA}, 0)), INDEX({Ref Column}, MATCH([Column #]@row, {Column # SheetB}, 0))), INDEX({Ref Column}, MATCH([Column #]@row, {Column # SheetC}, 0)))

• ✭✭✭✭✭

I checked adding once more sheet and the formula is as under, but it is throwing #UNPARSEABLE error

=IFERROR(IFERROR(INDEX({Doc Name ACPwr}, MATCH([Work Order #]@row, {Work Order #ACPwr}, 0)), INDEX({Doc Name ELI}, MATCH([Work Order #]@row, {Work Order#ELI}, 0)), INDEX({Doc Name THMRL}, MATCH([Work Order #]@row, {Work Order #THMRL}, 0))))

Actually, I have to check 4 sheet and hence I added once more IFERROR and the fourth sheet references as well in this case I am getting #INCORRECT ARGUMENT error.

=IFERROR(IFERROR(IFERROR(INDEX({Doc Name ACPwr}, MATCH([Work Order #]@row, {Work Order #ACPwr}, 0)), INDEX({Doc Name ELI}, MATCH([Work Order #]@row, {Work Order#ELI}, 0)), INDEX({Doc Name THMRL}, MATCH([Work Order #]@row, {Work Order #THMRL}, 0)),  INDEX({Doc Name OLOB}, MATCH([Work Order #]@row, {Work Order #OLOB}), 0)))))

Prajna

• ✭✭✭✭✭
edited 08/27/20

Hi Paul,

I could resolve it still thanks, the formula that worked is as under

=IFERROR(IFERROR(IFERROR(INDEX({Doc Name ACPwr}, MATCH(\$[Work Order #]@row, {Work Order #ACPwr}, 0)), INDEX({Doc Name ELI}, MATCH(\$[Work Order #]@row, {Work Order#ELI}, 0))), INDEX({Doc Name THMRL}, MATCH(\$[Work Order #]@row, {Work Order #THMRL}, 0))), INDEX({Doc Name OLOB}, MATCH(\$[Work Order #]@row, {Work Order #OLOB}, 0)))

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!