Excel formula has stumped me! HELP!

jonathanp

New Member
Joined
May 27, 2008
Messages
3
ok im trying to create a sheet for my girlfriend. she has stomach problems depending on what she eats. ive made a sheet so she can put down everything she eats and give it a score out of five depending on how she feels the next day.

the problem is i need to add all these scored cells up and divide them by the amount of ACTIVE cells.
e.g.
A1 = Food name
B1 = Average cell score
C1 = Mon
D1 = tue
E1 = wed
F1 = Thur etc


A2 = Soup
B2 = ???????
c2 = 3 (the score out of five for how her stomach felt 5=good)
d2 = 2
e2 = empty cell she did not eat soup that day
f2 = 3


I need it so B2 takes c2,d2,e2,f2......all the way to KF2 adds them together, skips blank cells then divides them to find the average. Leaving me with an average score out of five.

The point of this is over time my girlfriend will be able to tell what foods react with her stomach.

Any help would be greatly appreciated.

Regards
jonathan
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Re: Excel formular has stumped me! HELP!

use COUNTA or COUNTIF(range,">"&0) as your denominator
 
Upvote 0
thanks but im a bit of an excel novice. Could you please give me the formula to put this in the field.

thanks in advance
 
Upvote 0
B2 formula

=ROUND(SUM(C2:KF2)/COUNTIF(C2:KF2,">"&0),1)

Countif > 0 is pretty safe way of doing this.... the round assumes you want 1 decimal place in your avg -- change as necessary by altering the ,1 to ,2 for 2 decimals etc...
 
Upvote 0
jonathanp

Welcome to the MrExcel board!

I would just use the built-in Excel function for AVERAGE - it already knows to skip blanks. The formula below can be adjusted to go to column KF (you must be using Excel 2007 to have that many columns) and then copied down as far as you want.

Excel Workbook
ABCDEFGHIJK
1Food nameAverage cell scoreMonTueWedThuFriSatSunMonTue
2Soup2.67323
3Next Food3.752355
4
Food Scores
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,120
Members
451,399
Latest member
alchavar

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