Grouping A Column By Max Value

ec1957

New Member
Joined
Jul 29, 2008
Messages
31
I think I am making this too hard, any help is appreciated.

Three columns; A, B and C
Column A is filled with all numbers, somtimes these numbers repeat
Column B is filled with three letter text chars, sometimes these numbers repeat
Coumn C is filled with numbers

For each unique value in Column A, I need to pull out the corresponding max value in Column C and then show me what is in Column B. Essentially i'm trying to group on column A based on the largest value in column c which will then show me what value appeared in column B.

Any help would be great. Thanks.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hi,

Did you find a solution to this?
See if this helps....

Excel Workbook
ABCDEFGHIJ
1NumberTEXTNumbersRankCount*CountNumberNumbersTEXT
2123Cat1231131*71231231Cat
3123Dog124070**1241235Dog
4123Mat124430**1251232Cat
5123Cow124610**1261237Dog
6124Dog1235111**1271238Bat
7124Rat124250**1301241Cat
8125Cat1232121**1321243Dog
9125Pat123980*****
10126Dog1237101*****
11127Bat123891*****
12130Cat124161*****
13130Hat124520*****
14132Dog124341*****
Sheet3


Copy the formulas in D, E, H, I, J down.
Once you sort by column D, the data in H, I, J will change.
The formulas in E, G, H help create a Unique list in H of all the numbers in column A

Probably not the best method and a bit late, but it seems to work.

Ak
 
Upvote 0
Using Akashwani's data, the following formulas in cells D2 and E2, then copied down, will also provide your desired result. The D2 formula provides a list of unique values in Column A. The E2 formula uses the values in Column D to provide your final answer. Range NUMBER is all values in Column A, range TEXT is all values in Column B, and range NUMBERS is all values in Column C. These formulas use the IFERROR function, so you need at least Excel 2007.

Sheet1

<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Calibri,Arial; FONT-SIZE: 11pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 64px"><COL style="WIDTH: 64px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD> </TD><TD>D</TD><TD>E</TD></TR><TR style="HEIGHT: 18px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD style="TEXT-ALIGN: right">123</TD><TD>Cow</TD></TR></TBODY></TABLE>
<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; FONT-SIZE: 10pt; BORDER-LEFT-STYLE: groove; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>D2</TD><TD>{=IFERROR(INDEX(NUMBER,SMALL(IF(MATCH(NUMBER,NUMBER,0)=ROW(INDIRECT("1:"&ROWS(NUMBER))),MATCH(NUMBER,NUMBER,0),""),ROW(A1))),"")}</TD></TR><TR><TD>E2</TD><TD>{=IFERROR(INDEX(TEXT,SUMPRODUCT(--(MAX((--(NUMBER=D2)*NUMBERS))=NUMBERS),--(D2=NUMBER),ROW(NUMBERS))-1),"")}</TD></TR></TBODY></TABLE></TD></TR><TR><TD>Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!
</TD></TR></TBODY></TABLE>

Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4

Mike
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top