Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 28
Default Why does this confuse me?? -- ? on Offset function

I'm trying to understand how/why this works...

=OFFSET(A12,MATCH(MAX(E12:E300),E12:E300,0)-1,)

So the reference cell is a12 - got that
Understand the MATCH/MAX functions.
I'm confused about the -1 aspect of the OFFSET function.
If I understand this it's referencing one row below the reference A12...
however it's referencing the same row.... the formula works, though I'm
confused as to why...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Why does this confuse me?? -- ? on Offset function

MATCH returns a number from 1 to n (or, possibly an error).

So, if you want to include the value of cell A12 in the calculation then you
have to correct the MATCH offset from 1 to n to 0 to n. To do that you
subtract 1 from the result of MATCH.

Let's assume E12 is the max value of the range. So:

MATCH(MAX(E12:E300),E12:E300,0) = 1

If you didn't use the -1 correction then you'd have:

=OFFSET(A12,1,) = A13

With the -1 correction you have:

=OFFSET(A12,0,) = A12

Another way to do this is with the INDEX function:

=INDEX(A12:A300,MATCH(MAX(E12:E300),E12:E300,0))

--
Biff
Microsoft Excel MVP


"Awrex" wrote in message
...
I'm trying to understand how/why this works...

=OFFSET(A12,MATCH(MAX(E12:E300),E12:E300,0)-1,)

So the reference cell is a12 - got that
Understand the MATCH/MAX functions.
I'm confused about the -1 aspect of the OFFSET function.
If I understand this it's referencing one row below the reference A12...
however it's referencing the same row.... the formula works, though I'm
confused as to why...



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
confuse on vlookup, index match vcff Excel Discussion (Misc queries) 1 December 1st 06 01:19 AM
confuse on vlookup, index match [email protected] Excel Discussion (Misc queries) 0 November 30th 06 05:52 AM
confuse on vlookup, index match vcff Excel Discussion (Misc queries) 0 November 30th 06 12:11 AM
confuse on vlookup, index match vcff Excel Discussion (Misc queries) 0 November 29th 06 11:49 PM
confuse on vlookup, index match [email protected] Excel Discussion (Misc queries) 0 November 29th 06 08:59 AM


All times are GMT +1. The time now is 05:40 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"