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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 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!