Issue when Converting to Column Formula - #Invalid Data Type
I am working on a Smartsheet to track invoices for contractors and automatically update how much I need to accrue at the end of the month based on the contractor and average price. Each row in my sheet represents an invoice with details such as the contractor's name, invoice date, and price. I need to calculate the total charges for each contractor for a given month. Price- contains invoice amountm, Date - Week end date of period contractor worked and Identifier- Contractor name, the rest are formulas.
Month Number =Month(Date@row)
Year Number = Year(Date@row)
Total Monthly Charges=SUMIFS([Price]:[Price], [Identifier]:[Identifier], [Identifier]@row, [Month Number]:[Month Number], [Month Number]@row, [Year Number]:[Year Number], [Year Number]@row)
All of these work, until I convert to column formula, then my total monthly charges shows an error.
I have tried to do =Value(Month(Date@row) and same with year, but it is still showing either #INVALID DATA TYPE or #INVALID COLUMN VALUE. All columns except the Date column are Text/Number.
Does anyone know why this is happening?
Best Answer
-
Add an IFERROR statement to the conversion of the months to numbers. If you have a blank date in your data set that will give you an error which will show up in your Total Charges causing it to also error when you try to make it a column formula.
Month Number =Month(Date@row) → =IFERROR(MONTH(Date@row), "")
Year Number = Year(Date@row) → =IFERROR(YEAR(Date@row), "")
Answers
-
Add an IFERROR statement to the conversion of the months to numbers. If you have a blank date in your data set that will give you an error which will show up in your Total Charges causing it to also error when you try to make it a column formula.
Month Number =Month(Date@row) → =IFERROR(MONTH(Date@row), "")
Year Number = Year(Date@row) → =IFERROR(YEAR(Date@row), "")
-
Yes, that worked. Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 66.6K Get Help
- 435 Global Discussions
- 152 Industry Talk
- 495 Announcements
- 5.3K Ideas & Feature Requests
- 85 Brandfolder
- 155 Just for fun
- 77 Community Job Board
- 508 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!