averaging numbers from IF statements

Munkykween

New Member
Joined
Jul 11, 2007
Messages
4
I have a column of IF statements which produce a number depending upon the percentage that is entered into the column next to it. How do I have the column of IF statements average all of the numbers that are produced (out by a decimal and two places)? Each time that I try it gives me this: #DIV/0!

The IF statement is this: =IF(C9>89%,"4",IF(C9>79%,"3",IF(C9>69%,"2",IF(C9>59%,"1"))))

So it looks like this:

73% 2
68% 1
85% 3
#DIV/0!


I need #DIV/0! to have the average (which would be 2.00 in this case)

Thank you for your help this one is REALLY stumping me
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Remove the quotes from your numbers inside your if formula, then try your average formula

Code:
=IF(C9>89%,4,IF(C9>79%,3,IF(C9>69%,2,IF(C9>59%,1))))


HTH
 
Upvote 0
I think there's a slicker way with them crazy {} things and and combination of ; and , . I've seen it and I think it may have been Brian from Maui that posted the solution. Looked really cool and much better than a nested =IF

Hopefully someone can remember the post or suggest the same
 
Upvote 0
I tried removing the quotes and HOTPEPPER's formula and either way all I get is ###. Moving the cursor over that cell shows 300% (I don't know why that is). Any other suggestions?
 
Upvote 0
Did the other suggestions work. I have no intention of stepping on Aladin Akyureks toes?
 
Upvote 0
This is weird. The first time that I tried removing the quotes it didn't work, but now it does.

Thanks so much for all of your help!!!! I am ecstatic with the results!!
 
Upvote 0

Forum statistics

Threads
1,214,805
Messages
6,121,665
Members
449,045
Latest member
Marcus05

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