Average of an If Formula
Hello!
Can anyone provide some insight on why I am unable to get an average on a column of IF formulas?
Here is the formula across the rows in the column: =IF(Status2 = "Not Started", "0%", IF(Status2 = "In Progress", "50%", IF(Status2 = "Completed", "100%")))
I am getting a #DIVIDE BY ZERO error when I use the AVG formula on 10 rows.
When I try to sum the rows and divide by 10, I get 0.000 as the result.
Thank you!
Best Answer
-
@Lauren E oh yeah that makes sense! You can also do it without value and without quotes:
=IF(Status2 = "Not Started", 0, IF(Status2 = "In Progress", 0.5, IF(Status2 = "Completed", 1)))
Answers
-
@Lauren E can you provide a screenshot?
-
Thank you but I actually was able to just figure it out! For anyone else who might come along searching later in a similar situation: I had to remove the % and convert to a value on each of the result values to get it to work.
-
@Lauren E oh yeah that makes sense! You can also do it without value and without quotes:
=IF(Status2 = "Not Started", 0, IF(Status2 = "In Progress", 0.5, IF(Status2 = "Completed", 1)))
-
That is good to know! Thank you so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!