Sign in to join the conversation:
In my project, I'm trying to find the average of a few cells (in some cases it is only one cell), but I keep getting a #DIVIDE BY ZERO error message. Do you know why?
Hi,
Can you describe your process in more detail and maybe share the sheet(s) or some screenshots? That would make it easier to help.
I hope this helps you!
Have a fantastic weekend!
Best,
Andrée Starå
Workflow Consultant @ Get Done Consulting
Sure. I'm trying to get the overall average for an objective. In the first screenshot below, the 'Status' column has drop-down options to select. Depending on the status, I have a formula to populate the output level 'Status Color' column to be certain RYGB dot colors. I'm using this formula for the Status color:
=IF(Status30 = "On Schedule", "Green", IF(Status30 = "Complete", "Blue", IF(Status30 = "Needs Organizational Attention", "Red", IF(Status30 = "Not Started", "", IF(Status30 = "Needs Management Attention", "Yellow")))))
The output level 'Status Converter' column then populates a certain number based on the colors. Formula here:
=IF([Status Color]30 = "Red", 1, IF([Status Color]30 = "Yellow", 2, IF([Status Color]30 = "Green", 3, IF([Status Color]30 = "Blue", "4", IF([Status Color]30 = "", "0")))))
The number ^this formula pulls is then used for the average for the outcome level (i.e. row29). I am trying to find the separate average for each outcome row (i.e.,row 29, 31, 33, & 35) and then from there use the outcome level average to find the overall average for the Objective (row 28). This is where I get the error message for finding the average of the outcome level.
Are your numbers being populated by a formula? If so, you will need a VALUE function to pull the ACTUAL number, otherwise there are no numbers for the AVG function to work with which would produce a #DIVIDE BY ZERO error.
You could have some formatting in place for the column and whatnot, but generally speaking from my own personal experience, if a number is in a cell as a text string, it will be on the left side of the cell. If it is an actual number, it is on the right side of the cell (unless you format the column to show all data in a specific area of the cell).
EDIT: It looks like I keep typing at the same time as other people this morning. Haha. Wrap your second formula in a VALUE function like so
=VALUE(IF(...................))
You can remove the quotes around the numbers in your IF statement which may correct the issue as well.
Hi There, sorry to pipe in but the issue is that the formula you are using to populate the numbers is using quotations around the 4 and 0.
Using quotations around the 4 makes the output a text based output and the average formula only works with numbers. Simply remove the quotes from around the 4 in the formula like this...
=IF([Status Color]30 = "Red", 1, IF([Status Color]30 = "Yellow", 2, IF([Status Color]30 = "Green", 3, IF([Status Color]30 = "Blue", 4, IF([Status Color]30 = "", 0)))))
And your average will work.
Only use quotes if you want your output to be a text answer.
Remove the quotes from the 0 as well.
Thanks Mike. I wasn't 100% positive on the quotes when I said it as an option as I've never actually tested it. I was just taking an edumacated guess there, so the confirmation was good to have. Haha.
Adding the VALUE worked. Thank you!
Haha. I totally missed that you said that. I was aiming for a conveying lesson there.
"Anything that is put in quotes is considered as text, even numbers."
You were correct!
Lesson conveyed!
Happy to help.
Hi, I'm using smartsheet to track updates on each task in a tracker. These updates may span over a year, so they get lengthy. I was excited about smartsheets because viewing these notes is a lot cleaner. However, I've just realized that there is a content limit to a cell, which is a huge issue. While excel was annoying to…
Hello, i've a question about 2 tasks. Task 1 has for example 4 hours and should be on day 1 for example 6 january. Task 2 has 30 hours and should be on start on 4 january and futher. How can i manage that on 6 january task 2 has only 4 hours? Now i got the message user is over-allocated because task 2 is planned on a full…
Hi All, We have several update automations on various solutions - and have worked very well for getting info from people that dont have smartsheet access - how ever in Sept we switched over to SSO and MFA and activated the Safe Share - We have now run into an issue that when our update automations trigger and people within…