ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I find the max in each group? (https://www.excelbanter.com/excel-worksheet-functions/6960-how-can-i-find-max-each-group.html)

LRATLARSON

How can I find the max in each group?
 
How can I find the max in each group? The amount of data in each group can
vary. An example is shown below:

Group Value
A 8
A 7
B 3
B 4
B 2

ExcelBanter AI

Answer: How can I find the max in each group?
 
  1. Select a cell where you want to display the maximum value for each group.
  2. Type the following formula: =MAXIFS(Value, Group, "group_name")
  3. Replace "Value" with the column name where your values are located (in this case, it's "Value").
  4. Replace "Group" with the column name where your group names are located (in this case, it's "Group").
  5. Replace "group_name" with the name of the group you want to find the maximum value for (e.g. "A" or "B").
  6. Press Enter to calculate the maximum value for that group.
  7. Repeat steps 2-6 for each group name.

For example, if you want to find the maximum value for group A, your formula would be: =MAXIFS(Value, Group, "A"). If you want to find the maximum value for group B, your formula would be: =MAXIFS(Value, Group, "B").

This formula will automatically adjust to accommodate varying amounts of data in each group, so you don't need to worry about specifying a range of cells.

JE McGimpsey

One way (array-entered: CTRL-SHIFT-ENTER or CMD-RETURN):

=MAX(IF(A1:A100="A",B1:B1000))


Better:

Use a Pivot Table, with Group in the Rows field and Max of Value in the
Data field.


In article ,
"LRATLARSON" wrote:

How can I find the max in each group? The amount of data in each group can
vary. An example is shown below:

Group Value
A 8
A 7
B 3
B 4
B 2


Frank Kabel

Hi
try for example the following array formula (entered with
cTRL+SHIFT+ENTER):
=MAX(IF(A1:A100="A",B1:B100))

also check out pivot tables:
http://www.cpearson.com/excel/pivots.htm
http://peltiertech.com/Excel/Pivots/pivotstart.htm
http://www.contextures.com/xlPivot02.html
http://www.ozgrid.com/Excel/excel-pivot-tables.htm
http://www.techonthenet.com/excel/pivottbls/index.htm

--
Regards
Frank Kabel
Frankfurt, Germany

"LRATLARSON" schrieb im
Newsbeitrag ...
How can I find the max in each group? The amount of data in each

group can
vary. An example is shown below:

Group Value
A 8
A 7
B 3
B 4
B 2



Don Guillett

this is an ARRAY formula so must be edited/entered with ctrl+shift+enter
instead of just enter.

=MAX(IF(C4:C8="b",D4:D8))

--
Don Guillett
SalesAid Software

"LRATLARSON" wrote in message
...
How can I find the max in each group? The amount of data in each group

can
vary. An example is shown below:

Group Value
A 8
A 7
B 3
B 4
B 2




Aladin Akyurek


D2:

=MAX(IF($A$2:$A$6=C2,$B$2:$B$6))

which must be confirmed with control+shift+enter instead of just with
enter.

Note that C2 houses a group id like A.

Another option is to build a pivot table from the data.

LRATLARSON Wrote:
How can I find the max in each group? The amount of data in each group
can
vary. An example is shown below:

Group Value
A 8
A 7
B 3
B 4
B 2



--
Aladin Akyurek
------------------------------------------------------------------------
Aladin Akyurek's Profile: http://www.excelforum.com/member.php...fo&userid=4165
View this thread: http://www.excelforum.com/showthread...hreadid=319760



All times are GMT +1. The time now is 07:24 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com