How do you calculate an average on a column that also contains "#Invalid Data Type" in some cells??
I have a column of numbers (days duration) between two date columns but, in many cases, one of the dates may be missing which gives me an #Invalid Data Type entry in the column where I am averaging the days duration. Attempting to average the column, I don't know the syntax to skip over the #Invalid Data Type cells to only average the cell that contain numbers.
I've tried this approach but it doesn't seem to be working as I get a "#UNPARSEABLE" response to the formula.
=if([Total - Appl Compl to Bus Ready] >=0, AVG([Total - Appl Compl to Bus Ready]:[Total - Appl Compl to Bus Ready], "")
Best Answer
-
Try removing the = from before the IF.
Answers
-
You will need to use an IFERROR statement to get rid of that error from the original source data.
=IFERROR(original_formula, "")
-
Thank you so much. I still have some type of context error as it is removing the #INVALID DATA TYPE entries as desired but it is also now clearing valid data out of the cells that have a duration in them.
Original Formula
=IF(NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) >= 0, NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) - 1, "")
Updated Formula
=IFERROR(=IF(NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) >= 0, NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) - 1, ""), "")
What am I missing?
-
Thank you so much. I still have some type of context error as it is removing the #INVALID DATA TYPE entries as desired but it is also now clearing valid data out of the cells that have a duration in them.
Original Formula
=IF(NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) >= 0, NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) - 1, "")
Updated Formula
=IFERROR(=IF(NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) >= 0, NETWORKDAYS([Appl Compl Date]@row, [Business Ready Date]@row) - 1, ""), "")
What am I missing?
-
Try removing the = from before the IF.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.6K Get Help
- 403 Global Discussions
- 215 Industry Talk
- 455 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 136 Just for fun
- 56 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!