Divide by zero error - how to find solution

Jonathan Lankford

New Member
Joined
Apr 10, 2015
Messages
2
I am trying to work a very simple spreadsheet for student averages. Some columns have text, but I know that the average function is supposed to ignore text. When I use the average function of =AVERAGE(B2:H2), it gives me the #DIV/0! error. So I rewrote the formula to only include the columns with numbers. I got the same result. Then I started over with the formula and changed the cell types of the one with text to "text" and the cell types of the ones with numbers to "number" because the cell types were originally all "general." I still get the error. Am I missing a 0 somewhere? Do I have bad eyesight? Is there a way to evaluate whether it is a software error? This seems like such a simple function to have an error on.

Image of desktop:
redir

https://onedrive.live.com/redir?res...authkey=!APHpdUpvIozRu-g&v=3&ithint=photo,png


Thanks.
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi.

If those values have been entered as text values, then simply changing their cell format to Number will not render the values as such.

To convert them to numerics, one way is:

1) Enter the number 1 in a random cell somewhere
2) Copy that cell
3) Highlight the range of cells for which you wish to perform the conversion to numerics
4) Choose Paste Special/Multiply

Regards
 
Upvote 0
Unable to recreate your error. Suggest you post your actual worksheet instead of an image for analysis.
 
Upvote 0
XOR LX,

Fixed!

Thanks for the quick reply and your assessment of the problem, which was right by the way. But the process to fix the problem you suggested didn't quite work for me. However, I copied and all the columns in the spreadsheet that I wanted to average and pasted them to another sheet. When I did that, every numbered cell showed the error that it was designated as text instead of a number. (So simply changing the cell style on the ribbon at the top didn't actually change it to a number cell; but you already told me this.) I selected them all, then clicked on the error pop-up and selected fix all. Then I copied all of those once more and pasted them back into my sheet.

That's strange that I couldn't do this without a workaround like that. Anyway, thanks so much.
 
Upvote 0
Not sure why my workaround didn't work for you, but sounds like you've found a nice alternative solution.

And yes, good point re the Number Stored as Text error pop-up. Not sure why you didn't get some of those in your original sheet. Perhaps you chose to ignore them?

Glad you've got it sorted anyway.

Cheers
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top