简体   繁体   中英

Percentile If Statement Excel

I have a table that has two columns and looks like the one below. My goal is to create a third column wherein the output is the percentile ranking of that line's growth rate segmented by group. That is, I want the formula to only look at the growth rates of 'Black" groups and give me the percentile ranking for the growth rate 10%.

Can't figure this out for the life of me.

Group        Growth
Black         10%
Black         -1%
Blue           0%
Blue           5%
Blue           5%
Red            2%
Green          2%
Green          9%

Try this in cell C2:

=IF($A$2:$A$9=A3,$B$2:$B$9,0)

But make sure you press ctrl-shift-enter instead of hitting enter. Then copy this down to C9.

This will give you 9%, 9%, 10%, 10%, 10%, 2%, 11%, 11%.

What this does is sum up everything that's black, blue, red, green, respectively. Adjust for your growth rate formula as necessary.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM