Link to home
Start Free TrialLog in
Avatar of hkgal
hkgal

asked on

Excel Ranking within a group

Working on excel :

Segment     Gp               Result
2                 Asia                   2
5                 Asia                   2
3                 Asia                   2
6                Regional            1
1                Regional            1

Third result column is based on the result of first two columns:
- For same gp, detect the min value and show

How to do? thanks!
Avatar of NBVC
NBVC
Flag of Canada image

Do you mean this?

Eg.  If your data is in A2:B6, try in C2:

=SUMPRODUCT(--($B$2:$B$6=B2),--(A2>=$A$2:$A$6))

or

=COUNTIFS($B$2:$B$6,B2,$A$2:$A$6,"<="&A2)

copied down.
Avatar of hkgal
hkgal

ASKER

I am using Excel 2003 that without a countifs function?

the first sentense return:
1
3
2
2
1

seems not correct...
Avatar of hkgal

ASKER

e.g.Min for "Asia" is 2, so in column C should be all 2 for Asia
ASKER CERTIFIED SOLUTION
Avatar of NBVC
NBVC
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hkgal

ASKER

Thanks!