Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
jgannon
 
Posts: n/a
Default Range compariosn - best of


I have multiple sets of ranges (10) and I would like to show the best
of. Currently I have nested if statements to give me the "best of",
but I was wondering if there was another/better way of doing this? Any
Suggestions?

This is what the ranges look like
Group A
rate 15 30 45 60
5 100 101 102 103
5.125 101 102 103 104
5.250 103 104 105 106
AVG(x) x x x x

Group B
rate 15 30 45 60
5 101 102 103 104
5.125 102 103 104 105
5.250 104 105 106 107
AVG(x) x x x x

x = average of that column (15,30,45,60)
AVG(x) = the average of the values of x
Max(Avg(x)) = gives the highest average between all ranges

I am currently using a max function on the [AVG(x)] to determine which
group is showing the best pricing.

Once I have that value, I am using another IF statement to say
IF(a10=Max(avg(x)), Group A, IF(e10=Max(avg(x)), Group B... and so on.


Is there a simpler way to do this besides a nested if statement?


--
jgannon
------------------------------------------------------------------------
jgannon's Profile: http://www.excelforum.com/member.php...o&userid=29003
View this thread: http://www.excelforum.com/showthread...hreadid=487319

  #2   Report Post  
Posted to microsoft.public.excel.misc
Bernie Deitrick
 
Posts: n/a
Default Range compariosn - best of

j,

Yes, there is a better way, usinge a combination of OFFSET and MATCH.

Select a block of cells that is the same size as the table that you are interested in, say 5 by 5,
and use an array-entered formula (enter using Ctrl-Shift-Enter) like:

=OFFSET($A$1,MATCH(MAX(A:A),A:A,FALSE)-6,0,5,5)

Replace the 6 with the number of rows of each block + 1 (5 + 1 = 6). For this example, the AVG(x)
formulas are in column A, and there shouldn't be any other numbers in column A that could cause the
MAX to return a value other than one of the AVG(x) values.

HTH,
Bernie
MS Excel MVP


"jgannon" wrote in message
...

I have multiple sets of ranges (10) and I would like to show the best
of. Currently I have nested if statements to give me the "best of",
but I was wondering if there was another/better way of doing this? Any
Suggestions?

This is what the ranges look like
Group A
rate 15 30 45 60
5 100 101 102 103
5.125 101 102 103 104
5.250 103 104 105 106
AVG(x) x x x x

Group B
rate 15 30 45 60
5 101 102 103 104
5.125 102 103 104 105
5.250 104 105 106 107
AVG(x) x x x x

x = average of that column (15,30,45,60)
AVG(x) = the average of the values of x
Max(Avg(x)) = gives the highest average between all ranges

I am currently using a max function on the [AVG(x)] to determine which
group is showing the best pricing.

Once I have that value, I am using another IF statement to say
IF(a10=Max(avg(x)), Group A, IF(e10=Max(avg(x)), Group B... and so on.


Is there a simpler way to do this besides a nested if statement?


--
jgannon
------------------------------------------------------------------------
jgannon's Profile: http://www.excelforum.com/member.php...o&userid=29003
View this thread: http://www.excelforum.com/showthread...hreadid=487319



Reply
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
How to Select a relative range with Using "Find" and Offset() Dennis Excel Discussion (Misc queries) 7 July 27th 05 03:57 PM
Question for use of offset and range Demi Excel Worksheet Functions 3 July 22nd 05 08:48 PM
Question regarding dynamic range setting dharmik Excel Worksheet Functions 2 July 22nd 05 08:44 PM
Can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 3 April 8th 05 07:36 AM
can a formula check for a certain value in a range? Lee IT Excel Discussion (Misc queries) 1 April 7th 05 04:31 PM


All times are GMT +1. The time now is 05:35 PM.

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

About Us

"It's about Microsoft Excel"