Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Formula depends on which cell contains max.

I have a worksheet where I need to select a value based on which cell in a
non-contiguous range has the MAXimum value.

To be more specific,
There are 4 cells in column E (26, 35, 43, 47) each with values < 200.
There are 4 matching cells in column G.
If say E35 is the largest of the 4 values then the value in G35 is to be
used as part of a formula in G59.

I guess I could always create a contiguous table and use VLOOKUP but the
layout is repeated 200 more times down the sheet and I would rather save the
space. Besides, I just know there has to be a formula. I have played with
MAX and MATCH and CELL("row"

Is there another function I should look into. Any suggestions?

TIA
-- Len


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Formula depends on which cell contains max.

Are there any numeric values in the cells between the specific range cells?

Will there be only one instance of the max value?

No real elegant way to do this. Brute force:

=IF(E26=MAX(E26,E35,E43,E47),G26,IF(E35=MAX(E26,E3 5,E43,E47),G35,IF(E43=MAX(E26,E35,E43,E47),G43,IF( E47=MAX(E26,E35,E43,E47),G47,""))))

Biff

"Len B" <gonehome@optusnet:con:au wrote in message
...
I have a worksheet where I need to select a value based on which cell in a
non-contiguous range has the MAXimum value.

To be more specific,
There are 4 cells in column E (26, 35, 43, 47) each with values < 200.
There are 4 matching cells in column G.
If say E35 is the largest of the 4 values then the value in G35 is to be
used as part of a formula in G59.

I guess I could always create a contiguous table and use VLOOKUP but the
layout is repeated 200 more times down the sheet and I would rather save
the space. Besides, I just know there has to be a formula. I have played
with MAX and MATCH and CELL("row"

Is there another function I should look into. Any suggestions?

TIA
-- Len




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Formula depends on which cell contains max.

Thanks Biff.
Yes there will be values in between the specific cells. Each cell heads its
own column of values reaching the next header cell. E47 heads a column of 4
values so the range is E26:E50 and the possibility exists that a value may
be larger than the desired max from the 4 specified cells so that rules out
taking the max from E26:E50 unfortunately.

Yes, It is possible for 2 of the 4 to have the same max value but choosing
the first will be ok. It will not matter because the whole scheme is
designed to predict what someone else will choose.

Thanks again
-- Len

"T. Valko" wrote in message
...
Are there any numeric values in the cells between the specific range
cells?

Will there be only one instance of the max value?

No real elegant way to do this. Brute force:

=IF(E26=MAX(E26,E35,E43,E47),G26,IF(E35=MAX(E26,E3 5,E43,E47),G35,IF(E43=MAX(E26,E35,E43,E47),G43,IF( E47=MAX(E26,E35,E43,E47),G47,""))))

Biff

"Len B" <gonehome@optusnet:con:au wrote in message
...
I have a worksheet where I need to select a value based on which cell in a
non-contiguous range has the MAXimum value.

To be more specific,
There are 4 cells in column E (26, 35, 43, 47) each with values < 200.
There are 4 matching cells in column G.
If say E35 is the largest of the 4 values then the value in G35 is to be
used as part of a formula in G59.

I guess I could always create a contiguous table and use VLOOKUP but the
layout is repeated 200 more times down the sheet and I would rather save
the space. Besides, I just know there has to be a formula. I have played
with MAX and MATCH and CELL("row"

Is there another function I should look into. Any suggestions?

TIA
-- Len






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Banned
 
Posts: 6
Default Formula depends on which cell contains max.

Hi Len:

Based on the same idea as T. Valko's ... but to shorten the formula,
I defined LenMax as

=Max($E$26,$E$35,$E$43,$E$47)

and then used

=IF(LenMax=E26,G26,IF(LenMax=E35,G35,IF(LenMax=E43 ,G43,IF(LenMax-E47,G47))))



"Len B" wrote:

Thanks Biff.
Yes there will be values in between the specific cells. Each cell heads its
own column of values reaching the next header cell. E47 heads a column of 4
values so the range is E26:E50 and the possibility exists that a value may
be larger than the desired max from the 4 specified cells so that rules out
taking the max from E26:E50 unfortunately.

Yes, It is possible for 2 of the 4 to have the same max value but choosing
the first will be ok. It will not matter because the whole scheme is
designed to predict what someone else will choose.

Thanks again
-- Len

"T. Valko" wrote in message
...
Are there any numeric values in the cells between the specific range
cells?

Will there be only one instance of the max value?

No real elegant way to do this. Brute force:

=IF(E26=MAX(E26,E35,E43,E47),G26,IF(E35=MAX(E26,E3 5,E43,E47),G35,IF(E43=MAX(E26,E35,E43,E47),G43,IF( E47=MAX(E26,E35,E43,E47),G47,""))))

Biff

"Len B" <gonehome@optusnet:con:au wrote in message
...
I have a worksheet where I need to select a value based on which cell in a
non-contiguous range has the MAXimum value.

To be more specific,
There are 4 cells in column E (26, 35, 43, 47) each with values < 200.
There are 4 matching cells in column G.
If say E35 is the largest of the 4 values then the value in G35 is to be
used as part of a formula in G59.

I guess I could always create a contiguous table and use VLOOKUP but the
layout is repeated 200 more times down the sheet and I would rather save
the space. Besides, I just know there has to be a formula. I have played
with MAX and MATCH and CELL("row"

Is there another function I should look into. Any suggestions?

TIA
-- Len







  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Formula depends on which cell contains max.

Thanks Yogi
That would work well but this framework is repeated 200 times down the sheet
so I wouldn't use a named range, just choose a vacant cell (G55) and set =
Max(E26,E35,E43,E47) then =IF(G55=E26,G26,IF(G55=E35... using relative
rather than absolute addressing. this will allow me to copy the framework
down.

Thanks to both of you.
-- Len

"Yogi Anand--www.energyefficientbuild.com"
icrosoft.com wrote in
message ...
Hi Len:

Based on the same idea as T. Valko's ... but to shorten the formula,
I defined LenMax as

=Max($E$26,$E$35,$E$43,$E$47)

and then used

=IF(LenMax=E26,G26,IF(LenMax=E35,G35,IF(LenMax=E43 ,G43,IF(LenMax-E47,G47))))



"Len B" wrote:

Thanks Biff.
Yes there will be values in between the specific cells. Each cell heads
its
own column of values reaching the next header cell. E47 heads a column of
4
values so the range is E26:E50 and the possibility exists that a value
may
be larger than the desired max from the 4 specified cells so that rules
out
taking the max from E26:E50 unfortunately.

Yes, It is possible for 2 of the 4 to have the same max value but
choosing
the first will be ok. It will not matter because the whole scheme is
designed to predict what someone else will choose.

Thanks again
-- Len

"T. Valko" wrote in message
...
Are there any numeric values in the cells between the specific range
cells?

Will there be only one instance of the max value?

No real elegant way to do this. Brute force:

=IF(E26=MAX(E26,E35,E43,E47),G26,IF(E35=MAX(E26,E3 5,E43,E47),G35,IF(E43=MAX(E26,E35,E43,E47),G43,IF( E47=MAX(E26,E35,E43,E47),G47,""))))

Biff

"Len B" <gonehome@optusnet:con:au wrote in message
...
I have a worksheet where I need to select a value based on which cell
in a
non-contiguous range has the MAXimum value.

To be more specific,
There are 4 cells in column E (26, 35, 43, 47) each with values < 200.
There are 4 matching cells in column G.
If say E35 is the largest of the 4 values then the value in G35 is to
be
used as part of a formula in G59.

I guess I could always create a contiguous table and use VLOOKUP but
the
layout is repeated 200 more times down the sheet and I would rather
save
the space. Besides, I just know there has to be a formula. I have
played
with MAX and MATCH and CELL("row"

Is there another function I should look into. Any suggestions?

TIA
-- Len









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
Chart formula style depends on number of sheets.... [email protected] Charts and Charting in Excel 1 December 5th 06 02:55 PM
Embedding IF: depends on result.. nastech Excel Discussion (Misc queries) 13 July 5th 06 10:11 PM
Can Excel send automaticaly e-mails depends on cell value Booker Excel Discussion (Misc queries) 2 November 9th 05 08:26 AM
Combo box list depends on value Neal Excel Discussion (Misc queries) 3 February 1st 05 08:52 PM
Validation depends on cell value SteveT Excel Worksheet Functions 2 January 31st 05 06:17 PM


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

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"