PC Review


Reply
Thread Tools Rate Thread

Array Formula - Offset Result Problem

 
 
Vlad
Guest
Posts: n/a
 
      1st Mar 2008
The following Array formula retulrns the maximum value in column E
where the value in Column H is Blue

{=MAX(($E$2:$E$115)*($H$2:$H$115="Blue"))}

How would I return the text in Column B for which is on the same line
as the maximum value in column E where the value in Column H is Blue

I'm using Excel 2003

TIA

A
 
Reply With Quote
 
 
 
 
JMB
Guest
Posts: n/a
 
      1st Mar 2008
One way
=INDEX($B$2:$B$115,MATCH(MAX(($E$2:$E$115)*($H$2:$H$115="Blue"))&"Blue",$E$2:$E$115&$H$2:$H$115,0))

array entered

"Vlad" wrote:

> The following Array formula retulrns the maximum value in column E
> where the value in Column H is Blue
>
> {=MAX(($E$2:$E$115)*($H$2:$H$115="Blue"))}
>
> How would I return the text in Column B for which is on the same line
> as the maximum value in column E where the value in Column H is Blue
>
> I'm using Excel 2003
>
> TIA
>
> A
>

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      1st Mar 2008
Vlad,

It's still an array

=INDEX($B$2:$B$115,MATCH(MAX(($E$2:$E$115)*($H$2:$H$115="Blue")),$E$2:$E$115,FALSE),1)

Mike

"Vlad" wrote:

> The following Array formula retulrns the maximum value in column E
> where the value in Column H is Blue
>
> {=MAX(($E$2:$E$115)*($H$2:$H$115="Blue"))}
>
> How would I return the text in Column B for which is on the same line
> as the maximum value in column E where the value in Column H is Blue
>
> I'm using Excel 2003
>
> TIA
>
> A
>

 
Reply With Quote
 
JMB
Guest
Posts: n/a
 
      1st Mar 2008
you would get an incorrect result if the data were:

2 red
5 red
5 blue
4 green

where another color happens to have a number that equals blues max and
appears before blue in the list.



"Mike H" wrote:

> Vlad,
>
> It's still an array
>
> =INDEX($B$2:$B$115,MATCH(MAX(($E$2:$E$115)*($H$2:$H$115="Blue")),$E$2:$E$115,FALSE),1)
>
> Mike
>
> "Vlad" wrote:
>
> > The following Array formula retulrns the maximum value in column E
> > where the value in Column H is Blue
> >
> > {=MAX(($E$2:$E$115)*($H$2:$H$115="Blue"))}
> >
> > How would I return the text in Column B for which is on the same line
> > as the maximum value in column E where the value in Column H is Blue
> >
> > I'm using Excel 2003
> >
> > TIA
> >
> > A
> >

 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      1st Mar 2008
Your right, forgot about duplicates, thanks for the correction

Mike


"JMB" wrote:

> you would get an incorrect result if the data were:
>
> 2 red
> 5 red
> 5 blue
> 4 green
>
> where another color happens to have a number that equals blues max and
> appears before blue in the list.
>
>
>
> "Mike H" wrote:
>
> > Vlad,
> >
> > It's still an array
> >
> > =INDEX($B$2:$B$115,MATCH(MAX(($E$2:$E$115)*($H$2:$H$115="Blue")),$E$2:$E$115,FALSE),1)
> >
> > Mike
> >
> > "Vlad" wrote:
> >
> > > The following Array formula retulrns the maximum value in column E
> > > where the value in Column H is Blue
> > >
> > > {=MAX(($E$2:$E$115)*($H$2:$H$115="Blue"))}
> > >
> > > How would I return the text in Column B for which is on the same line
> > > as the maximum value in column E where the value in Column H is Blue
> > >
> > > I'm using Excel 2003
> > >
> > > TIA
> > >
> > > A
> > >

 
Reply With Quote
 
Vlad
Guest
Posts: n/a
 
      2nd Mar 2008
On Mar 1, 9:23*pm, JMB <J...@discussions.microsoft.com> wrote:
> you would get an incorrect result if the data were:
>
> 2 * *red
> 5 * *red
> 5 * *blue
> 4 * *green
>
> where another color happens to have a number that equals blues max and
> appears before blue in the list.
>


Thanks for the suggestion but they don't work for me as it is quite
likely that there would be duplicate items with the same max value.

I thought something like {=MAX(($E$2:$E$115)*($H$2:$H$115=$J4)*($B$2:$B
$115))} would work but it doesn't.

Any other suggestions?

TIA



 
Reply With Quote
 
JMB
Guest
Posts: n/a
 
      2nd Mar 2008
why did my first suggestion not work?????

"Vlad" wrote:

> On Mar 1, 9:23 pm, JMB <J...@discussions.microsoft.com> wrote:
> > you would get an incorrect result if the data were:
> >
> > 2 red
> > 5 red
> > 5 blue
> > 4 green
> >
> > where another color happens to have a number that equals blues max and
> > appears before blue in the list.
> >

>
> Thanks for the suggestion but they don't work for me as it is quite
> likely that there would be duplicate items with the same max value.
>
> I thought something like {=MAX(($E$2:$E$115)*($H$2:$H$115=$J4)*($B$2:$B
> $115))} would work but it doesn't.
>
> Any other suggestions?
>
> TIA
>
>
>
>

 
Reply With Quote
 
Vlad
Guest
Posts: n/a
 
      3rd Mar 2008
I put the following data into a test sheet:-

1 COL B COL E COL H
2 Test 1 2 red
3 Test 2 5 red
4 Test 3 5 blue
5 Test 4 4 green

When I put the array forumla =INDEX($B$2:$B$115,MATCH(MAX(($E$2:$E
$115)*($H$2:$H$115="Blue")),$E$2:$E$115,FALSE),1) into cell L2 it
returns the test Test 2 whereas I was expecting Test 3.

I have uploaded the file to http://www.mediafire.com/?vglvvl3jtn0 -
not sure whether you would be happy to open it though but it's there
if you want.

TIA

Andy
 
Reply With Quote
 
JMB
Guest
Posts: n/a
 
      4th Mar 2008
that was not my suggestion. my suggestion was

=INDEX($B$2:$B$115,MATCH(MAX(($E$2:$E$115)*($H$2:$H$115="Blue"))&"Blue",$E$2:$E$115&$H$2:$H$115,0))

array entered - which returns Test 3 for me.



"Vlad" wrote:

> I put the following data into a test sheet:-
>
> 1 COL B COL E COL H
> 2 Test 1 2 red
> 3 Test 2 5 red
> 4 Test 3 5 blue
> 5 Test 4 4 green
>
> When I put the array forumla =INDEX($B$2:$B$115,MATCH(MAX(($E$2:$E
> $115)*($H$2:$H$115="Blue")),$E$2:$E$115,FALSE),1) into cell L2 it
> returns the test Test 2 whereas I was expecting Test 3.
>
> I have uploaded the file to http://www.mediafire.com/?vglvvl3jtn0 -
> not sure whether you would be happy to open it though but it's there
> if you want.
>
> TIA
>
> Andy
>

 
Reply With Quote
 
Vlad
Guest
Posts: n/a
 
      4th Mar 2008
That works like a treat - thanks for both of your help and suggestions
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Offset a formula result Patrick C. Simonds Microsoft Excel Worksheet Functions 1 16th Aug 2009 11:06 PM
RE: Use of Offset function in array formula =?Utf-8?B?ZGFkZHlsb25nbGVncw==?= Microsoft Excel Worksheet Functions 0 23rd Dec 2006 01:16 AM
Re: Use of Offset function in array formula RagDyeR Microsoft Excel Worksheet Functions 0 22nd Dec 2006 04:43 PM
Select row (with offset) from VB formula result =?Utf-8?B?UkFQ?= Microsoft Excel Programming 1 7th Aug 2005 09:22 AM
Array Formula - Use of OFFSET function with array argument Alan Microsoft Excel Worksheet Functions 2 11th Feb 2004 09:38 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:34 PM.