#1   Report Post  
Voodoodan
 
Posts: n/a
Default Max Offset


Hi,

I've got a range of numbers, J5:J28. I can get the maximum value
using:

=max(j5:j28)

However, I want to find that max number and find the offset value 1
column to the left.

Is this possible within a formula?

I've tried all sorts of combos with MAX and OFFSET but can't get this
one.

Any help would be appreciated.

Thanks,
Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile: http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,1)

or

=INDEX(K5:K28,MATCH(MAX(J5:J28),J5:J28,0))

--
HTH

Bob Phillips

"Voodoodan" wrote in
message ...

Hi,

I've got a range of numbers, J5:J28. I can get the maximum value
using:

=max(j5:j28)

However, I want to find that max number and find the offset value 1
column to the left.

Is this possible within a formula?

I've tried all sorts of combos with MAX and OFFSET but can't get this
one.

Any help would be appreciated.

Thanks,
Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile:

http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856



  #3   Report Post  
mangesh_yadav
 
Posts: n/a
Default


Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=373856

  #4   Report Post  
Voodoodan
 
Posts: n/a
Default


Blimey, any quicker guys and you'll be inventing time travel!

Thanks very much, that's worked perfectly.

Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile: http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856

  #5   Report Post  
mangesh_yadav
 
Posts: n/a
Default


:)

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=373856



  #6   Report Post  
bj
 
Posts: n/a
Default

I would recommend using
=OFFSET(J5,MATCH(MAX(J5:J28,0),J5:J28,0)-1,1)
or
=INDEX(K5:K28,MATCH(MAX(J5:J28,0),J5:J28,0))

While it is not needed specifically in this case, I would use the ,0 in a
match whenever I do not definately know if the data is in ascending order.

Is there any concern that there might be several cells with the max value?

"Bob Phillips" wrote:

=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,1)

or

=INDEX(K5:K28,MATCH(MAX(J5:J28),J5:J28,0))

--
HTH

Bob Phillips

"Voodoodan" wrote in
message ...

Hi,

I've got a range of numbers, J5:J28. I can get the maximum value
using:

=max(j5:j28)

However, I want to find that max number and find the offset value 1
column to the left.

Is this possible within a formula?

I've tried all sorts of combos with MAX and OFFSET but can't get this
one.

Any help would be appreciated.

Thanks,
Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile:

http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856




  #7   Report Post  
Jim May
 
Posts: n/a
Default

Why the "-1" in the row argument?
When I from the formula bar highlite the
MATCH(MAX(J5:J28),J5:J28,0) only and F9
it return the correct position WITHOUT the need for the -1. (*&%$^%$???
TIA,
Jim May

"mangesh_yadav"
wrote in message
news:mangesh_yadav.1pl7cy_1117023660.9539@excelfor um-nospam.com...

Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=373856



  #8   Report Post  
Bob Phillips
 
Posts: n/a
Default

I think you got confused here bj, I did put a ,0 for an exact match in the
formulae. You have added it to the max, which does absolutely nothing :-)

--
HTH

Bob Phillips

"bj" wrote in message
...
I would recommend using
=OFFSET(J5,MATCH(MAX(J5:J28,0),J5:J28,0)-1,1)
or
=INDEX(K5:K28,MATCH(MAX(J5:J28,0),J5:J28,0))

While it is not needed specifically in this case, I would use the ,0 in a
match whenever I do not definately know if the data is in ascending order.

Is there any concern that there might be several cells with the max value?

"Bob Phillips" wrote:

=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,1)

or

=INDEX(K5:K28,MATCH(MAX(J5:J28),J5:J28,0))

--
HTH

Bob Phillips

"Voodoodan" wrote

in
message ...

Hi,

I've got a range of numbers, J5:J28. I can get the maximum value
using:

=max(j5:j28)

However, I want to find that max number and find the offset value 1
column to the left.

Is this possible within a formula?

I've tried all sorts of combos with MAX and OFFSET but can't get this
one.

Any help would be appreciated.

Thanks,
Dan.


--
Voodoodan


------------------------------------------------------------------------
Voodoodan's Profile:

http://www.excelforum.com/member.php...nfo&userid=597
View this thread:

http://www.excelforum.com/showthread...hreadid=373856






  #9   Report Post  
Bob Phillips
 
Posts: n/a
Default

Jim,

It applies to the OFFSET column, not to the MATCH.

Mangesh is looking left for the offset value. I (wrongly) looked right, so I
used 1 (+1).

--
HTH

Bob Phillips

"Jim May" wrote in message
news:Yf_ke.18456$Fv.10788@lakeread01...
Why the "-1" in the row argument?
When I from the formula bar highlite the
MATCH(MAX(J5:J28),J5:J28,0) only and F9
it return the correct position WITHOUT the need for the -1. (*&%$^%$???
TIA,
Jim May

"mangesh_yadav"


wrote in message
news:mangesh_yadav.1pl7cy_1117023660.9539@excelfor um-nospam.com...

Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread:

http://www.excelforum.com/showthread...hreadid=373856





  #10   Report Post  
bj
 
Posts: n/a
Default

the "-1" is needed for the offset function.
the reference cell is "0" for offset so to get to the third cell below the
reference, this would result in a match of 4, but need a row of three input
to the offset.
in lookup fumctions (v and h and just lookup) the first cell is 1 so you do
not need to compensate. (I get bit by this occasionally)

"Jim May" wrote:

Why the "-1" in the row argument?
When I from the formula bar highlite the
MATCH(MAX(J5:J28),J5:J28,0) only and F9
it return the correct position WITHOUT the need for the -1. (*&%$^%$???
TIA,
Jim May

"mangesh_yadav"
wrote in message
news:mangesh_yadav.1pl7cy_1117023660.9539@excelfor um-nospam.com...

Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=373856






  #11   Report Post  
bj
 
Posts: n/a
Default

oops you wanted to go to the right
=OFFSET(J5,MATCH(MAX(J5:J28,0),J5:J28,0)-1,-1)
or
=INDEX(I5:I28,MATCH(MAX(J5:J28,0),J5:J28,0))

"bj" wrote:

I would recommend using
=OFFSET(J5,MATCH(MAX(J5:J28,0),J5:J28,0)-1,1)
or
=INDEX(K5:K28,MATCH(MAX(J5:J28,0),J5:J28,0))

While it is not needed specifically in this case, I would use the ,0 in a
match whenever I do not definately know if the data is in ascending order.

Is there any concern that there might be several cells with the max value?

"Bob Phillips" wrote:

=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,1)

or

=INDEX(K5:K28,MATCH(MAX(J5:J28),J5:J28,0))

--
HTH

Bob Phillips

"Voodoodan" wrote in
message ...

Hi,

I've got a range of numbers, J5:J28. I can get the maximum value
using:

=max(j5:j28)

However, I want to find that max number and find the offset value 1
column to the left.

Is this possible within a formula?

I've tried all sorts of combos with MAX and OFFSET but can't get this
one.

Any help would be appreciated.

Thanks,
Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile:

http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856




  #12   Report Post  
bj
 
Posts: n/a
Default

Opps I meant to say you wanted to go to the left

"bj" wrote:

oops you wanted to go to the right
=OFFSET(J5,MATCH(MAX(J5:J28,0),J5:J28,0)-1,-1)
or
=INDEX(I5:I28,MATCH(MAX(J5:J28,0),J5:J28,0))

"bj" wrote:

I would recommend using
=OFFSET(J5,MATCH(MAX(J5:J28,0),J5:J28,0)-1,1)
or
=INDEX(K5:K28,MATCH(MAX(J5:J28,0),J5:J28,0))

While it is not needed specifically in this case, I would use the ,0 in a
match whenever I do not definately know if the data is in ascending order.

Is there any concern that there might be several cells with the max value?

"Bob Phillips" wrote:

=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,1)

or

=INDEX(K5:K28,MATCH(MAX(J5:J28),J5:J28,0))

--
HTH

Bob Phillips

"Voodoodan" wrote in
message ...

Hi,

I've got a range of numbers, J5:J28. I can get the maximum value
using:

=max(j5:j28)

However, I want to find that max number and find the offset value 1
column to the left.

Is this possible within a formula?

I've tried all sorts of combos with MAX and OFFSET but can't get this
one.

Any help would be appreciated.

Thanks,
Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile:
http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856




  #13   Report Post  
Jim May
 
Posts: n/a
Default

=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Bob:

My Q does not have to do with the LAST "-1" << which is the Column
argument (I understand that one;

My Q has to do with the "-1" at the end of the Row argument, that is ...
J5:J28,0)-1, <<<
WHY - See more extensive results below (in my orig write-in)..

Tks,

Jim




"Bob Phillips" wrote in message
...
Jim,

It applies to the OFFSET column, not to the MATCH.

Mangesh is looking left for the offset value. I (wrongly) looked right, so

I
used 1 (+1).

--
HTH

Bob Phillips

"Jim May" wrote in message
news:Yf_ke.18456$Fv.10788@lakeread01...
Why the "-1" in the row argument?
When I from the formula bar highlite the
MATCH(MAX(J5:J28),J5:J28,0) only and F9
it return the correct position WITHOUT the need for the -1. (*&%$^%$???
TIA,
Jim May

"mangesh_yadav"


wrote in message
news:mangesh_yadav.1pl7cy_1117023660.9539@excelfor um-nospam.com...

Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav


------------------------------------------------------------------------
mangesh_yadav's Profile:

http://www.excelforum.com/member.php...o&userid=10470
View this thread:

http://www.excelforum.com/showthread...hreadid=373856







  #14   Report Post  
Bob Phillips
 
Posts: n/a
Default

Jim,

That is because OFFSET is zero based, MATCH is 1 based, so you have to
subtract 1 from the matched row to get the number of rows to OFFSET.

--
HTH

Bob Phillips

"Jim May" wrote in message
news:HN6le.18545$Fv.7033@lakeread01...
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Bob:

My Q does not have to do with the LAST "-1" << which is the Column
argument (I understand that one;

My Q has to do with the "-1" at the end of the Row argument, that is ...
J5:J28,0)-1, <<<
WHY - See more extensive results below (in my orig write-in)..

Tks,

Jim




"Bob Phillips" wrote in message
...
Jim,

It applies to the OFFSET column, not to the MATCH.

Mangesh is looking left for the offset value. I (wrongly) looked right,

so
I
used 1 (+1).

--
HTH

Bob Phillips

"Jim May" wrote in message
news:Yf_ke.18456$Fv.10788@lakeread01...
Why the "-1" in the row argument?
When I from the formula bar highlite the
MATCH(MAX(J5:J28),J5:J28,0) only and F9
it return the correct position WITHOUT the need for the -1.

(*&%$^%$???
TIA,
Jim May

"mangesh_yadav"


wrote in message
news:mangesh_yadav.1pl7cy_1117023660.9539@excelfor um-nospam.com...

Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav

------------------------------------------------------------------------
mangesh_yadav's Profile:
http://www.excelforum.com/member.php...o&userid=10470
View this thread:

http://www.excelforum.com/showthread...hreadid=373856









  #15   Report Post  
Jim May
 
Posts: n/a
Default

Bob,
I got it !!! Your explanation - well phrased!!
a bit "thick" here at times,
appreciate your patience.
Jim


"Bob Phillips" wrote in message
...
Jim,

That is because OFFSET is zero based, MATCH is 1 based, so you have to
subtract 1 from the matched row to get the number of rows to OFFSET.

--
HTH

Bob Phillips

"Jim May" wrote in message
news:HN6le.18545$Fv.7033@lakeread01...
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Bob:

My Q does not have to do with the LAST "-1" << which is the Column
argument (I understand that one;

My Q has to do with the "-1" at the end of the Row argument, that is

....
J5:J28,0)-1, <<<
WHY - See more extensive results below (in my orig write-in)..

Tks,

Jim




"Bob Phillips" wrote in message
...
Jim,

It applies to the OFFSET column, not to the MATCH.

Mangesh is looking left for the offset value. I (wrongly) looked

right,
so
I
used 1 (+1).

--
HTH

Bob Phillips

"Jim May" wrote in message
news:Yf_ke.18456$Fv.10788@lakeread01...
Why the "-1" in the row argument?
When I from the formula bar highlite the
MATCH(MAX(J5:J28),J5:J28,0) only and F9
it return the correct position WITHOUT the need for the -1.

(*&%$^%$???
TIA,
Jim May

"mangesh_yadav"

wrote in message
news:mangesh_yadav.1pl7cy_1117023660.9539@excelfor um-nospam.com...

Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav


------------------------------------------------------------------------
mangesh_yadav's Profile:
http://www.excelforum.com/member.php...o&userid=10470
View this thread:
http://www.excelforum.com/showthread...hreadid=373856













  #16   Report Post  
Bob Phillips
 
Posts: n/a
Default

No problem Jim.

I know that when you ask a question, you have thought about it, so it helps
me to get the right level of explanation.

It's symbiotic :-)

Regards

Bob

"Jim May" wrote in message
news:HY7le.18565$Fv.13207@lakeread01...
Bob,
I got it !!! Your explanation - well phrased!!
a bit "thick" here at times,
appreciate your patience.
Jim


"Bob Phillips" wrote in message
...
Jim,

That is because OFFSET is zero based, MATCH is 1 based, so you have to
subtract 1 from the matched row to get the number of rows to OFFSET.

--
HTH

Bob Phillips

"Jim May" wrote in message
news:HN6le.18545$Fv.7033@lakeread01...
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Bob:

My Q does not have to do with the LAST "-1" << which is the Column
argument (I understand that one;

My Q has to do with the "-1" at the end of the Row argument, that is

...
J5:J28,0)-1, <<<
WHY - See more extensive results below (in my orig write-in)..

Tks,

Jim




"Bob Phillips" wrote in message
...
Jim,

It applies to the OFFSET column, not to the MATCH.

Mangesh is looking left for the offset value. I (wrongly) looked

right,
so
I
used 1 (+1).

--
HTH

Bob Phillips

"Jim May" wrote in message
news:Yf_ke.18456$Fv.10788@lakeread01...
Why the "-1" in the row argument?
When I from the formula bar highlite the
MATCH(MAX(J5:J28),J5:J28,0) only and F9
it return the correct position WITHOUT the need for the -1.

(*&%$^%$???
TIA,
Jim May

"mangesh_yadav"

wrote in message
news:mangesh_yadav.1pl7cy_1117023660.9539@excelfor um-nospam.com...

Use:
=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)

Mangesh


--
mangesh_yadav


------------------------------------------------------------------------
mangesh_yadav's Profile:
http://www.excelforum.com/member.php...o&userid=10470
View this thread:
http://www.excelforum.com/showthread...hreadid=373856













  #17   Report Post  
mangesh_yadav
 
Posts: n/a
Default


This thread spawned one big discussion..!

Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=373856

  #18   Report Post  
Voodoodan
 
Posts: n/a
Default


Hi,

I seemed to have stirred up a right hornets' nest! But I have one more
question to add to the original post.

Using the formula you gave me
*"=OFFSET(J5,MATCH(MAX(J5:J28),J5:J28,0)-1,-1)"* is there any way to
return duplicates, i.e., if two or more numbers equal the maximum
figure?

Thanks,
Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile: http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856

  #19   Report Post  
mangesh_yadav
 
Posts: n/a
Default


This is bit difficult, but you can try the following:

In column K, starting row 5, enter the following formula and copy
down.
=IF(J5=MAX($J$5:$J$28),I5,"")

In column L, enter the following formula and copy down:
=IF(ISNUMBER(SMALL($K$5:$K$28,ROW()-ROW($K$5)+1)),SMALL($K$5:$K$28,ROW()-ROW($K$5)+1),"")


Mangesh


--
mangesh_yadav
------------------------------------------------------------------------
mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470
View this thread: http://www.excelforum.com/showthread...hreadid=373856

  #20   Report Post  
Voodoodan
 
Posts: n/a
Default


That's excellent, thanks very much!

Dan.


--
Voodoodan
------------------------------------------------------------------------
Voodoodan's Profile: http://www.excelforum.com/member.php...nfo&userid=597
View this thread: http://www.excelforum.com/showthread...hreadid=373856

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
need help using the offset function differently Marshin Excel Worksheet Functions 2 March 16th 05 04:01 PM
Hyperlinks using R[1]C[1] and offset function in its cell referenc Elijah-Dadda Excel Worksheet Functions 0 March 5th 05 03:31 AM
dynamic offset [email protected] Excel Discussion (Misc queries) 3 March 4th 05 12:38 AM
Passing Cell Address to Offset Bob Excel Worksheet Functions 2 December 1st 04 04:56 PM
Offset? Patrick_KC Excel Discussion (Misc queries) 1 November 29th 04 10:17 PM


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