Looking for the Max value within subgroups of a list

ChuckDrago

Active Member
Joined
Sep 7, 2007
Messages
470
Office Version
  1. 2010
Platform
  1. Windows
Hi everyone,
I am trying to use the combo filter and max but get unwanted results due to filtered ranges not being properly coded. My fault.
The data structure is Segment, Discipline, TValue, and the populated data are:
1) Segment = 1 to 10
2) For each segment, 3 possible disciplines = Forward, Rest, Backward
3) For each discipline there are many values, of which I need to extract the Maximum for only Fwd and Bwd
The attached table exemplifies the sought end result, Notice that Forward are positive values and Backward are negative ones.
Thank you all very much,
Chuck
SegmentMax ForwardMax Backward
123.4-21
226.1-23.1
325.0-25.0
426.5-25.8
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Could you post a short example showing the layout of the data...where the Segments, Disciplines, and TValues are shown? And to clarify, do you want the maximum values for Fwd and Bwd for all records, regardless of whether they appear in a filtered list, or do you want the max values for only those records appearing in the filtered list?
 
Upvote 0
I'm making a guess about the layout, but here is one idea using the AGGREGATE function:
Book2
ABCDEFG
1SegmentDisciplineTvalue
21Forward10SegmentMax ForwardMax Backward
31Rest27130-35
41Backward-25264-77
52Backward-673109-200
62Forward6446-4
71Backward-15
82Forward34
93Forward109
103Backward-100
113Rest-150
121Backward-35
133Forward99
142Backward-77
151Forward30
163Backward-200
171Forward20
181Rest17
192Backward-57
202Forward24
212Rest14
224Backward-3
234Backward-4
244Forward5
254Forward6
264Rest8
274Rest9
ChuckDrago
Cell Formulas
RangeFormula
F3:F6F3=AGGREGATE(14,3,($C$2:$C$27)/(($A$2:$A$27=$E3)*($B$2:$B$27="Forward")),1)
G3:G6G3=AGGREGATE(15,3,($C$2:$C$27)/(($A$2:$A$27=$E3)*($B$2:$B$27="Backward")),1)
 
Upvote 0
Hi KRice, and thanks for your help.
Attached is a sample of the DB, although the numbers are just shown for illustration.
Chuck
SampleDB.JPG
 
Upvote 0
Thanks for the layout clarification. Here is a modified version:
Book2
ABCDEFGH
1SegmentForwardBackwardRest
2110-2527SegmentMax ForwardMax Backward
3130-1517130-35
4120-35264-77
5264-673109-200
6234-7746-4
7224-5714
83109-100-150
9399-20022
1045-38
1146-49
ChuckDrago (2)
Cell Formulas
RangeFormula
G3:G6G3=AGGREGATE(14,3,($B$2:$B$11)/($A$2:$A$11=$F3),1)
H3:H6H3=AGGREGATE(15,3,($C$2:$C$11)/($A$2:$A$11=$F3),1)
 
Upvote 0
Glad to help...thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,674
Messages
6,126,140
Members
449,294
Latest member
Jitesh_Sharma

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