Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rayo K
 
Posts: n/a
Default "MAXIF" workaround

Hi,

I want to create a formula that would act as a "MAXIF" function. I have data
in rows and I want to find the max of field A for a given field B.

For example:
A B C
4356 4 John
2341 2 Bill
3425 4 Joe
8734 2 Sam

I also want to be able to call data from field C that's on the same row as
the maximum.

I want to show:
Max 2: 8734 Sam
Max 4: 4356 John

How can I do this? I've tried pivottables and can't seem to get the results
I want.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default "MAXIF" workaround

=MAX(IF(B2:B5=2,A2:A5))

and

=MAX(IF(B2:B5=2,C2:C5))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Rayo K" wrote in message
...
Hi,

I want to create a formula that would act as a "MAXIF" function. I have

data
in rows and I want to find the max of field A for a given field B.

For example:
A B C
4356 4 John
2341 2 Bill
3425 4 Joe
8734 2 Sam

I also want to be able to call data from field C that's on the same row as
the maximum.

I want to show:
Max 2: 8734 Sam
Max 4: 4356 John

How can I do this? I've tried pivottables and can't seem to get the

results
I want.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default "MAXIF" workaround


If you use this formula in E2

=MAX(IF(B2:B5=2,A2:A5))

confirmed with CTRL+SHIFT+ENTER

then to get the associated name use a VLOOKUP

=VLOOKUP(E2,A2:C5,3,0)


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=513421

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 Workaround for Cell Display Limitation in Excel 2000 Kevin Excel Discussion (Misc queries) 5 April 20th 05 11:33 PM
bug - type 1-4531 in any cell - returned Jan-51 workaround is '1-. Paidi Excel Discussion (Misc queries) 6 March 24th 05 09:30 PM
csv load 64K workaround r0dr1g0 Excel Worksheet Functions 1 March 7th 05 06:36 PM
Workaround for returning month name? Marty Excel Worksheet Functions 4 February 14th 05 10:07 PM
Workaround for LOWER(A1:A100) Pantryman Excel Worksheet Functions 4 November 2nd 04 08:21 PM


All times are GMT +1. The time now is 09:15 PM.

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"