The dreaded #INVALID DATA TYPE error
I created what I thought was a simple nested IF statement, but got hit with an #INVALID DATA TYPE error.
Both columns have the Column Type = Text/Number
All "State" fields are populated with valid 2 character US state abbreviations.
What am I missing?
Formula:
=IF(OR(State@row, "AL", State@row, "KS", State@row, "MI", State@row, "MN", State@row, "OR", State@row, "SD", State@row, "WY", State@row, "CT"), "Redemption"
,IF(OR(State@row, "CA", State@row, "IL", State@row, "NE", State@row, "FL", State@row, "HI", State@row, "KY", State@row, "NC", State@row, "OK", State@row, "WI"), "Confirmation"
,IF(OR(State@row, "VT", State@row, "NM", State@row, "OH"), "Both"
, "N/A")))
Best Answer
-
Hi Rebekah!
Your formula had errors within the OR statements. It should be State@row = [condition] instead of State@row, [condition]. I have corrected in the formula below. :)
=IF(OR(State@row = "AL", State@row = "KS", State@row = "MI", State@row = "MN", State@row = "OR", State@row = "SD", State@row = "WY", State@row = "CT"), "Redemption", IF(OR(State@row = "CA", State@row = "IL", State@row = "NE", State@row = "FL", State@row = "HI", State@row = "KY", State@row = "NC", State@row = "OK", State@row = "WI"), "Confirmation", IF(OR(State@row = "VT", State@row = "NM", State@row = "OH"), "Both", "N/A")))
Answers
-
Hi Rebekah!
Your formula had errors within the OR statements. It should be State@row = [condition] instead of State@row, [condition]. I have corrected in the formula below. :)
=IF(OR(State@row = "AL", State@row = "KS", State@row = "MI", State@row = "MN", State@row = "OR", State@row = "SD", State@row = "WY", State@row = "CT"), "Redemption", IF(OR(State@row = "CA", State@row = "IL", State@row = "NE", State@row = "FL", State@row = "HI", State@row = "KY", State@row = "NC", State@row = "OK", State@row = "WI"), "Confirmation", IF(OR(State@row = "VT", State@row = "NM", State@row = "OH"), "Both", "N/A")))
-
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!