I am getting an invalid data type when the IF function pulls the false statement which is blank inst
=SUM(IF(AND(YEAR(INDEX({Draw 1 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) = 2024, MONTH(INDEX({Draw 1 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) = 11, DAY(INDEX({Draw 1 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) < 15), INDEX({Draw 1 Received}, MATCH([TK ID#]@row, {FEE TKID}, 0)), ""), IF(AND(YEAR(INDEX({Draw 2 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) = 2024, MONTH(INDEX({Draw 2 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) = 11, DAY(INDEX({Draw 2 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) < 15), INDEX({Draw 2 Received}, MATCH([TK ID#]@row, {FEE TKID}, 0)), ""), IF(AND(YEAR(INDEX({Draw 3 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) = 2024, MONTH(INDEX({Draw 3 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) = 11, DAY(INDEX({Draw 3 Date Received}, MATCH([TK ID#]@row, {FEE TKID}, 0))) < 15), INDEX({Draw 3 Received}, MATCH([TK ID#]@row, {FEE TKID}, 0)), ""))
Best Answer
-
My next guess would be that there are instances where your INDEX/MATCHes aren't pulling in dates. This could also throw that error when using date based functions such as YEAR, MONTH, and DAY. Try wrapping each of those in an IFERROR to output zero as well.
IFERROR(YEAR(index/match), 0)
Answers
-
Try outputting a zero instead of a blank.
-
already tried with just 0 and "0" and still got the same result of invalid data type unfortunately
-
My next guess would be that there are instances where your INDEX/MATCHes aren't pulling in dates. This could also throw that error when using date based functions such as YEAR, MONTH, and DAY. Try wrapping each of those in an IFERROR to output zero as well.
IFERROR(YEAR(index/match), 0)
-
You are a genius !!!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.7K Get Help
- 406 Global Discussions
- 217 Industry Talk
- 456 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 297 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!