A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

changing average if cells populated



 
 
Thread Tools Display Modes
  #1  
Old March 16th, 2007, 10:02 PM posted to microsoft.public.excel.worksheet.functions
Dave
external usenet poster
 
Posts: 2,331
Default changing average if cells populated

I have a spreadsheet with various values in three columns. Each column is a
different month of the yr. The values in some of the cells are used to
calculate ratios which appear in let's say row 10.

C D E
F
Row 1 2 5 10
Row2 8 9 3

Row 10 =C1/C2*365 =D1/D2*365 =E1/E2*365 in F10 =AVERAGE(C10:E10)
and in column G through all the other months it is currently using that
same average.

If there are no values in the column needed to do the calculation then e.g F
here, then the cell should average the previous months and use that average
for future months. If the cells/ columns for that month do have values then
it should calculate using the relevant formula and then adjust the next
months cell with the new average e.g. G in this case would then average
c10:f10 and not to e10.

How do I use the if function to do this properly. Thanks.
  #2  
Old March 16th, 2007, 11:05 PM posted to microsoft.public.excel.worksheet.functions
Sandy Mann
external usenet poster
 
Posts: 2,264
Default changing average if cells populated

Dave,

If I understand you correctly try this on a COPY of your data:

in cell D10:
=IF(COUNT(C1:C2)2,"",IF(COUNT(D12)=2,D1/D2*365,AVERAGE($C$10:C10)))

and copy along the row as far as necessary.
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Dave" wrote in message
...
I have a spreadsheet with various values in three columns. Each column is a
different month of the yr. The values in some of the cells are used to
calculate ratios which appear in let's say row 10.

C D E
F
Row 1 2 5 10
Row2 8 9 3

Row 10 =C1/C2*365 =D1/D2*365 =E1/E2*365 in F10
=AVERAGE(C10:E10)
and in column G through all the other months it is currently using that
same average.

If there are no values in the column needed to do the calculation then e.g
F
here, then the cell should average the previous months and use that
average
for future months. If the cells/ columns for that month do have values
then
it should calculate using the relevant formula and then adjust the next
months cell with the new average e.g. G in this case would then average
c10:f10 and not to e10.

How do I use the if function to do this properly. Thanks.



  #3  
Old March 18th, 2007, 09:57 PM posted to microsoft.public.excel.worksheet.functions
Dave
external usenet poster
 
Posts: 2,331
Default changing average if cells populated

Thanks.

"Sandy Mann" wrote:

Dave,

If I understand you correctly try this on a COPY of your data:

in cell D10:
=IF(COUNT(C1:C2)2,"",IF(COUNT(D12)=2,D1/D2*365,AVERAGE($C$10:C10)))

and copy along the row as far as necessary.
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Dave" wrote in message
...
I have a spreadsheet with various values in three columns. Each column is a
different month of the yr. The values in some of the cells are used to
calculate ratios which appear in let's say row 10.

C D E
F
Row 1 2 5 10
Row2 8 9 3

Row 10 =C1/C2*365 =D1/D2*365 =E1/E2*365 in F10
=AVERAGE(C10:E10)
and in column G through all the other months it is currently using that
same average.

If there are no values in the column needed to do the calculation then e.g
F
here, then the cell should average the previous months and use that
average
for future months. If the cells/ columns for that month do have values
then
it should calculate using the relevant formula and then adjust the next
months cell with the new average e.g. G in this case would then average
c10:f10 and not to e10.

How do I use the if function to do this properly. Thanks.




  #4  
Old March 18th, 2007, 10:14 PM posted to microsoft.public.excel.worksheet.functions
Sandy Mann
external usenet poster
 
Posts: 2,264
Default changing average if cells populated

You're very welcome.

--
Regards,

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Dave" wrote in message
...
Thanks.

"Sandy Mann" wrote:

Dave,

If I understand you correctly try this on a COPY of your data:

in cell D10:
=IF(COUNT(C1:C2)2,"",IF(COUNT(D12)=2,D1/D2*365,AVERAGE($C$10:C10)))

and copy along the row as far as necessary.
--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


with @tiscali.co.uk


"Dave" wrote in message
...
I have a spreadsheet with various values in three columns. Each column
is a
different month of the yr. The values in some of the cells are used to
calculate ratios which appear in let's say row 10.

C D E
F
Row 1 2 5 10
Row2 8 9 3

Row 10 =C1/C2*365 =D1/D2*365 =E1/E2*365 in F10
=AVERAGE(C10:E10)
and in column G through all the other months it is currently using
that
same average.

If there are no values in the column needed to do the calculation then
e.g
F
here, then the cell should average the previous months and use that
average
for future months. If the cells/ columns for that month do have values
then
it should calculate using the relevant formula and then adjust the next
months cell with the new average e.g. G in this case would then average
c10:f10 and not to e10.

How do I use the if function to do this properly. Thanks.






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:57 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.