Help with IF AND formula with cross sheet reference
I am trying to write a cross sheet formula, and I keep getting an #INVALID OPERATION error, and I cannot puzzle it out.
My current formula: =IF(AND({Scenario REQ ID} = [REQ ID]@row, {Scenario Status} = "Pass"), 1, 0)
If the REQ ID from my scenario sheet matches the REQ ID of this row, AND the Status on the scenario sheet is "Pass", check the box.
Best Answer
-
After looking into it a bit it appears IF statements and cross sheet references do funny things. So I thought what if we did a Index Match instead.
=IF(Index({Scenario Status},Match([REQ ID]@row,{Scenario REQ ID},0))="Pass",1,0)
See how this works out for you.
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
Answers
-
Looking at your formula I can’t see an issue in and of itself. How ever since you changed the ref names from the defaults. Check to be sure the columns are still actually being referenced. I have ran into this issue before when selecting the column before changing the name.
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
-
I have double checked my column references, and they appear to be fine.
Just to be sure, I ended up deleting the formula, deleting the references out of the Sheet Reference Manager, saved the sheet, and then recreated the formula without changing the default reference names. I still got the same error message. -
is there any negative space in front of or behind the data in the reference rows?
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
-
After looking into it a bit it appears IF statements and cross sheet references do funny things. So I thought what if we did a Index Match instead.
=IF(Index({Scenario Status},Match([REQ ID]@row,{Scenario REQ ID},0))="Pass",1,0)
See how this works out for you.
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
-
@Mark.poole the Index Match formula worked! Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.1K Get Help
- 414 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!