Multiple index/match nested in an If statement
Hello,
I am having some issues with the following formula not returning the value I am expecting:
=IF(CONTAINS([Raw Lot ID]@row, {ActiveRawLot}), (INDEX({ActiveQCResult}, MATCH([Raw Lot ID]@row, {ActiveRawLot}))), IF(CONTAINS([Raw Lot ID]@row, {ArchivedRawlot}), (INDEX({ArchivedQCResult}, MATCH([Raw Lot ID]@row, {ArchivedRawlot}))), "Incomplete"))
What I am trying to have get done is for the formula to look for the @row value in 2 other sheets. If it exists in either, (they are mutually exclusive) then I want it to return the column value found in QC Result. If neither exists then return, "Incomplete"
Any help would be appreciated.
Best Answer
-
Hello,
I was able to fix it by simply adding the MATCH type:
=IF(CONTAINS([Raw Lot ID]@row, {ActiveRawLot}), (INDEX({ActiveQCResult}, MATCH([Raw Lot ID]@row, {ActiveRawLot}, 0))), IF(CONTAINS([Raw Lot ID]@row, {ArchivedRawlot}), (INDEX({ArchivedQCResult}, MATCH([Raw Lot ID]@row, {ArchivedRawlot}, 0))), "Incomplete"))
Answers
-
It looks like your "Incomplete" clause is for your second condition. Try this:
=IF(CONTAINS([Raw Lot ID]@row, {ActiveRawLot}), INDEX({ActiveQCResult}, MATCH([Raw Lot ID]@row, {ActiveRawLot})), IF(CONTAINS([Raw Lot ID]@row, {ArchivedRawlot}), INDEX({ArchivedQCResult}, MATCH([Raw Lot ID]@row, {ArchivedRawlot})), "Incomplete")
I hope this helps,
Cheers,
Ramzi
Ramzi Khuri - Principal Consultant @ Cedar Tree Consulting (www.cedartreeconsulting.com)
Feel free to email me: ramzi@cedartreeconsulting.com
💡 If this post helped you out, please help the Community by marking it as the accepted answer/helpful.
-
Hello,
I was able to fix it by simply adding the MATCH type:
=IF(CONTAINS([Raw Lot ID]@row, {ActiveRawLot}), (INDEX({ActiveQCResult}, MATCH([Raw Lot ID]@row, {ActiveRawLot}, 0))), IF(CONTAINS([Raw Lot ID]@row, {ArchivedRawlot}), (INDEX({ArchivedQCResult}, MATCH([Raw Lot ID]@row, {ArchivedRawlot}, 0))), "Incomplete"))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.6K Get Help
- 433 Global Discussions
- 136 Industry Talk
- 465 Announcements
- 4.9K Ideas & Feature Requests
- 143 Brandfolder
- 147 Just for fun
- 63 Community Job Board
- 466 Show & Tell
- 32 Member Spotlight
- 2 SmartStories
- 298 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!