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
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!