I've got a spreadsheet that shows the averages of riders per revenue hour. First, I don't like averaging a row of averages, but you gotta do what you gotta do. But there are some routes that we've eliminated or changed and so won't have any more entries. Because of history, I've got to leave them on the sheet. When I average the column, it counts the blanks or zeros. Apparently, I'm doing something wrong, because I can't get the averageif to work here. Can you help? For example, row 44 should be the average of rows 6-42. But of course, without the blank cells. Thanks Excel 2007
Scarames
Last edited by NBVC; 08-18-2009 at 12:42 PM.
Does this work for you?
=AVERAGEIF(B6:B42,">0")
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Your existing formula seems OK to me. AVERAGE function ignores blank cells anyway, you'd only need AVERAGEIF if you have zeroes in there, which you don't
I assumed based on this:
that there may be zeroes... so safeway...it counts the blanks or zeros
Also, the grey cells in column K are hidden 0's..
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
DaddyLongLegsUnfortunately it didn't work tho, the average of 18.06 was incorrect. When I manually took out the empty cells I would get a different answer. That's why I wanted the correct formula.
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks