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, "Fields marked with an asterisk (*) are required." is the very first line in the body of every form I create. I don't remember seeing it before (unless you missed filling out a required field; then you would see the message). Is there a way to turn it off or change it? None of my forms are in English so the message is…
I have a sheet that I pull into a report. The report I then want to use to make a stacked bar chart and put into a dashboard if I can. The columns I am trying to make into a stacked chart are: Lead, project and phase. The issue is that there are several leads and I need the stacked bar chart to show in different colors for…
I have a dynamic view setup for a dashboard that has NO restrictions And on the Sharing tab, I have a Group that I created as the additional share access to the view But the individuals in the Group still cannot see the data from the dashboard. Am I missing something? Because when I share the view to them individually…