LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
rda rda is offline
external usenet poster
 
Posts: 4
Default Need help with range value calculation

I am looking for a formula that would allow me to calculate a maximum of the
last 4 numeric values in a row divided by their count. For example:

A B C D E F G H I J
1 34 43 30 36 42 44 32
2 82 22 14
3 22 32 44 44 32 12 44 18 22

With the values in the cells displayed I would need a formula to get the
results in the following cells:

4 34 38 35 35 35 35 37 37 38 38
5 82 52 39 39 39 39
6 22 27 32 35 38 33 33 26 24

The results will be used in another worksheet for additional calculations as
needed.

The formula I came up with are as follows:
A4: =A1
B4: =IF(COUNT($A$1:B1)0,INT(SUM($A$1:B1)/COUNT($A$1:B1)),"")
C4: =IF(COUNT($A$1:C1)0,INT(SUM($A$1:C1)/COUNT($A$1:C1)),"")
D4: =IF(COUNT($A$1:D1)0,INT(SUM($A$1:D1)/COUNT($A$1:D1)),"")

This is where I'm stuck. If a value existed in D1 and a value in E1 then
the calculation should not include A1. In this instance there is no value in
either and E4 will have the same result as D4. Once we get to G1 then A1
must be dropped but the remaining need to be summed and divided by 4 with the
results in G4.

I hope I've explained my problem well and someone can come up with a simple
solution.

Thanks,
RDA
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup value in range, then if that value is something do a calculation. Richhall Excel Worksheet Functions 3 October 8th 07 11:06 AM
Calculation in Date Range tqm1 Excel Discussion (Misc queries) 1 June 29th 07 07:42 AM
range calculation help Mike Daniels Excel Worksheet Functions 1 January 22nd 07 11:12 PM
Date Range Calculation KC Excel Discussion (Misc queries) 5 July 31st 06 11:11 PM
Calculation of a number in a range Krista Excel Worksheet Functions 6 July 5th 06 11:12 PM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"