excel - Get maximum value based on unique values -
i have 2 columns in excel follows:
col1 col2 1 10 1 22 1 11 1 23 1 14 2 16 2 12 2 10 2 9
how write command returns maximum value col2
corresponding each unique value in col1
?
so here need write command 23
, 16
.
the data have shown here dummies; have 600 unique values in col1
in actual data set.
pivot tables: single underutilized , powerful feature of excel.
- file menu:
- insert
- pivot table
- select range
- fill in indicated in image below
step step:
- place cursor in cell right of data on sheet.
- select insert menu
- select pivot table icon
- select pivot table pop-up of icon
- use button select range of cells included (all 600+ rows in 2 columns) (or enter $a:$b)
- select ok
- a pivot table field list appears on right:
- drag , drop row 1 row labels.
- drag , drop row 2 values area.
- left click on "... of row 2"
- select value field settings
- select "max" instead of count or sum
- select ok , should have desired results.
the pivot table find max value in row 2 each unique value in row 1 believe after.
Comments
Post a Comment