View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Find the largest number

Tom,

It works for me. I only did it because Frank's respomnse didn't work for me
(sic!)

This data

A B C D E
1 text1 text2 5 10
1 text1 text2 5 15
1 text1 text2 6 25

gives me 15.

confused RP


"Tom Ogilvy" wrote in message
...
You must have left something out Bob. That doesn't work.

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
or



=MAX(--(A1:A10=1),--(B1:B10="text1"),--(C1:C10="text2"),--(D1:D10=5)*E1:E10)

still array entered, Ctrl-SHift-Enter.

Change the values to suit.

--

HTH

RP

"Frank Kabel" wrote in message
...
Hi
try the following array formula (entered with cTRL+SHIFT+ENTER):
=MAX(IF(A1:A10="cond1")*(B1:B10="cond2")*(C1:C10=" cond3"),E1:E10))

or the array formula
=MAX((A1:A10="cond1")*(B1:B10="cond2")*(C1:C10="co nd3")*(E1:E10))


--
Regards
Frank Kabel
Frankfurt, Germany


mdoyle13 wrote:
I had posted a counting and summing question here a couple weeks ago
and received a great answer and introduction to the sumproduct
function. I'm looking for one more item, this one extracting the
largest number from a range but only if conditions are met for other
ranges.

The help I received before with the sumproduct function allowed me

to
count and sum results from cell ranges e1:e10 when conditions were
true in ranges a1:a10, b1:b10, c1:c10 and d1:d10. So if a4, b4, c4
and d4 conditions were true, i was able to count e4 and sum e4. Same
for row 6, etc.

What I'm looking for is a way to identify the largest number in
e1:e10 when the first four conditions are true. Thus, in my previous
example, if e4 was 10 and e6 was 6, I want my result to be 10, even
if e8 [which should be ignored if there is a false condition in a8,
b8, c8 or d8] is 15. I have tried working MAX or LARGE into some IF
functions, but it would always return the largest number [i.e., 15
from e8] in the whole range rather than the ranges with true
conditions.

Is what I'm looking for possible? Did this make sense?

Thanks in advance.