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
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 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!