#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 19
Default Finding a value

I have this formula:

=OFFSET(INDIRECT(ADDRESS(MATCH(MAX(B1:B26),B1:B26, 0),2)),0,-1)

It looks up the value one cell left of the largest value in B1:B26,
and it works OK, but

1) Can it be done in an easier way?
2) It only works if the column starts in row 1. as Match find the row
within the array and Address demands the row in the sheet.

Jan
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default Finding a value

Try =INDEX(A1:A26,MATCH(MAX(B1:B26),B1:B26,0))
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"jkrons" wrote in message
...
I have this formula:

=OFFSET(INDIRECT(ADDRESS(MATCH(MAX(B1:B26),B1:B26, 0),2)),0,-1)

It looks up the value one cell left of the largest value in B1:B26,
and it works OK, but

1) Can it be done in an easier way?
2) It only works if the column starts in row 1. as Match find the row
within the array and Address demands the row in the sheet.

Jan


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Finding a value

Hi,

here's another way with an ARRAY formula

=INDEX(A2:A20,MATCH(MAX(B2:B20),B2:B20,0))

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"jkrons" wrote:

I have this formula:

=OFFSET(INDIRECT(ADDRESS(MATCH(MAX(B1:B26),B1:B26, 0),2)),0,-1)

It looks up the value one cell left of the largest value in B1:B26,
and it works OK, but

1) Can it be done in an easier way?
2) It only works if the column starts in row 1. as Match find the row
within the array and Address demands the row in the sheet.

Jan
.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 563
Default Finding a value

I hate to be pedantic, Mike, but the formulas we each suggested do NOT need
to be array entered.
Bernard

"Mike H" wrote in message
...
Hi,

here's another way with an ARRAY formula

=INDEX(A2:A20,MATCH(MAX(B2:B20),B2:B20,0))

This is an array formula which must be entered by pressing
CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly
brackets
'around the formula {}. You can't type these yourself. If you edit the
formula
'you must enter it again with CTRL+Shift+Enter.

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"jkrons" wrote:

I have this formula:

=OFFSET(INDIRECT(ADDRESS(MATCH(MAX(B1:B26),B1:B26, 0),2)),0,-1)

It looks up the value one cell left of the largest value in B1:B26,
and it works OK, but

1) Can it be done in an easier way?
2) It only works if the column starts in row 1. as Match find the row
within the array and Address demands the row in the sheet.

Jan
.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 99
Default Finding a value

Great. Thank you both.

Jan

Bernard Liengme wrote:
I hate to be pedantic, Mike, but the formulas we each suggested do
NOT need to be array entered.
Bernard

"Mike H" wrote in message
...
Hi,

here's another way with an ARRAY formula

=INDEX(A2:A20,MATCH(MAX(B2:B20),B2:B20,0))

This is an array formula which must be entered by pressing
CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly
brackets
'around the formula {}. You can't type these yourself. If you edit
the formula
'you must enter it again with CTRL+Shift+Enter.

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis
that introduces the fewest assumptions while still sufficiently
answering the question.


"jkrons" wrote:

I have this formula:

=OFFSET(INDIRECT(ADDRESS(MATCH(MAX(B1:B26),B1:B26, 0),2)),0,-1)

It looks up the value one cell left of the largest value in B1:B26,
and it works OK, but

1) Can it be done in an easier way?
2) It only works if the column starts in row 1. as Match find the
row within the array and Address demands the row in the sheet.

Jan
.



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
Finding * FARAZ QURESHI Excel Discussion (Misc queries) 1 April 3rd 08 08:50 AM
Finding non-zero value Tom Stout Excel Discussion (Misc queries) 2 November 21st 07 05:20 PM
Finding Max or Min Value [email protected] Excel Discussion (Misc queries) 4 November 24th 06 09:39 AM
finding the "end" Julia New Users to Excel 2 September 1st 05 02:38 AM
finding the last value Simon Shaw Excel Discussion (Misc queries) 8 January 16th 05 10:02 AM


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

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"