Using INDEX but returning blank if match found

Hello,
I am using the following formula to reference another sheet:
=INDEX({DISASTER CLOSINGS Range 1}, MATCH([Store Id]@row, {DISASTER CLOSINGS Range 1}, 0))
This returns #NO MATCH for cells that, well frankly do not have a match, and the corresponding number if it does have a match. That works as intended.
But... I want the opposite. If the number exists on the "DISASTER CLOSINGS" sheet, I want it to return blank, and if the number does NOT exist on the "DISASTER CLOSINGS" sheet, I want it to return the value in the "Store Id" column.
Answers
-
Try this:
=IF(INDEX({DISASTER CLOSINGS Range 1}, MATCH([Store Id]@row, {DISASTER CLOSINGS Range 1}, 0)) <> "", "", [Store ID]@row)
-
I am getting a "NO MATCH".
I have changed my column names since I first posted trying to do a workaround.
I am currently using:
=IFERROR(INDEX({DISASTER CLOSINGS Range 1}, MATCH([All Stores]@row, {DISASTER CLOSINGS Range 1}, 0), 0), "")
in the Store ID - Disasters column
and:
=IF(ISBLANK([Store ID - Disasters]@row), [All Stores]@row, "")
in the Store ID column.
It's a clunky workaround.
-
Does this work?
=IF(IFERROR(INDEX({DISASTER CLOSINGS Range 1}, MATCH([Store Id]@row, {DISASTER CLOSINGS Range 1}, 0)), [Store ID]@row) <> [Store ID]@row, [Store ID]@row)
Help Article Resources
Categories
Check out the Formula Handbook template!