Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Percentile for specific states

Hi

I have included a sample table.

State Priority Age P90 for A____ P90 for B___ P90 for C___
A 1 3
A 1 128
B 2 131
A 3 100
C 2 100
B 3 96
C 3 88
B 3 41
C 1 5
C 2 79

In order to find the P90 for all items in state "A" (column 1) I filter for
A and then copy paste the date in column 3 (Age) into another sheet and find
the percentile. I would like to know if there is a way to find the P90 for
all the states without having to manually do each state one at a time.

Sam

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Percentile for specific states

You could try something like this ..
Source cols A to C as posted, data from row2 down
List the states in D1 across, ie: A, B, C ..
Put in D2, array-enter the formula by pressing CTRL+SHIFT+ENTER,
instead of just pressing ENTER:
=PERCENTILE(IF($A$2:$A$100=D$1,$C$2:$C$100),0.9)
Copy D2 across as far as required. Adapt the ranges to suit.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Sam B" wrote:
Hi

I have included a sample table.

State Priority Age P90 for A____ P90 for B___ P90 for C___
A 1 3
A 1 128
B 2 131
A 3 100
C 2 100
B 3 96
C 3 88
B 3 41
C 1 5
C 2 79

In order to find the P90 for all items in state "A" (column 1) I filter for
A and then copy paste the date in column 3 (Age) into another sheet and find
the percentile. I would like to know if there is a way to find the P90 for
all the states without having to manually do each state one at a time.

Sam

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Percentile for specific states

Max - Thank you. You helped me get through the first step. I have one more
variation of this.

I want the percentile (P90) for items with State "A" (coulmn 1) and Priority
"1" (column 2). Based on you initial idea I wrote this formula

=PERCENTILE(IF(AND($A$2:$A$100=D$1,$B$2:$B$100="1" ),$C$2:$C$100),0.9)

I array-entered the formula using SHIFT+CTRL+ENTER.

I always get a 0 instead of the actual value. What am I doing wrong? Is it
possible to do this. Can I extend this same principle to check for three
variables (three columns)?

Thank you,


"Max" wrote:

You could try something like this ..
Source cols A to C as posted, data from row2 down
List the states in D1 across, ie: A, B, C ..
Put in D2, array-enter the formula by pressing CTRL+SHIFT+ENTER,
instead of just pressing ENTER:
=PERCENTILE(IF($A$2:$A$100=D$1,$C$2:$C$100),0.9)
Copy D2 across as far as required. Adapt the ranges to suit.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Sam B" wrote:
Hi

I have included a sample table.

State Priority Age P90 for A____ P90 for B___ P90 for C___
A 1 3
A 1 128
B 2 131
A 3 100
C 2 100
B 3 96
C 3 88
B 3 41
C 1 5
C 2 79

In order to find the P90 for all items in state "A" (column 1) I filter for
A and then copy paste the date in column 3 (Age) into another sheet and find
the percentile. I would like to know if there is a way to find the P90 for
all the states without having to manually do each state one at a time.

Sam

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Percentile for specific states

I want the percentile (P90) for items with State "A" (coulmn 1)
and Priority "1" (column 2).


You could extend it in this way,
Array-entered in say, D3, then copied across:
=PERCENTILE(IF(($A$2:$A$100=D$1)*($B$2:$B$100=1),$ C$2:$C$100),0.9)

Note that as the priorities in col B are numbers,
the criteria term for col B should be: $B$2:$B$100=1 (not "1", which is
text)

Can I extend this same principle to check for three variables (three
columns)?


Yes, just extend in the same manner
Eg supposing you have another criteria for col D to be added-on,
where col D = X (say),
then the array expression will look like this, indicatively:
=PERCENTILE(IF((ColA=D$1)*(ColB=1)*(ColD="X"),ColC ),0.9)
Adapt to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Sam B" wrote in message
...
Max - Thank you. You helped me get through the first step. I have one more
variation of this.

I want the percentile (P90) for items with State "A" (coulmn 1) and
Priority
"1" (column 2). Based on you initial idea I wrote this formula

=PERCENTILE(IF(AND($A$2:$A$100=D$1,$B$2:$B$100="1" ),$C$2:$C$100),0.9)

I array-entered the formula using SHIFT+CTRL+ENTER.

I always get a 0 instead of the actual value. What am I doing wrong? Is it
possible to do this. Can I extend this same principle to check for three
variables (three columns)?

Thank you,



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Percentile for specific states

IT WORKS. Thank you. You saved me a lot of time.

Sam B

"Max" wrote:

I want the percentile (P90) for items with State "A" (coulmn 1)
and Priority "1" (column 2).


You could extend it in this way,
Array-entered in say, D3, then copied across:
=PERCENTILE(IF(($A$2:$A$100=D$1)*($B$2:$B$100=1),$ C$2:$C$100),0.9)

Note that as the priorities in col B are numbers,
the criteria term for col B should be: $B$2:$B$100=1 (not "1", which is
text)

Can I extend this same principle to check for three variables (three
columns)?


Yes, just extend in the same manner
Eg supposing you have another criteria for col D to be added-on,
where col D = X (say),
then the array expression will look like this, indicatively:
=PERCENTILE(IF((ColA=D$1)*(ColB=1)*(ColD="X"),ColC ),0.9)
Adapt to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Sam B" wrote in message
...
Max - Thank you. You helped me get through the first step. I have one more
variation of this.

I want the percentile (P90) for items with State "A" (coulmn 1) and
Priority
"1" (column 2). Based on you initial idea I wrote this formula

=PERCENTILE(IF(AND($A$2:$A$100=D$1,$B$2:$B$100="1" ),$C$2:$C$100),0.9)

I array-entered the formula using SHIFT+CTRL+ENTER.

I always get a 0 instead of the actual value. What am I doing wrong? Is it
possible to do this. Can I extend this same principle to check for three
variables (three columns)?

Thank you,






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Percentile for specific states

Welcome, Sam. Glad it helped.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Sam B" wrote in message
...
IT WORKS. Thank you. You saved me a lot of time.

Sam B



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I create a U.S. map where I can mark certain states? JJP Charts and Charting in Excel 2 August 21st 07 05:44 PM
US states Tammy Excel Worksheet Functions 1 May 18th 06 04:44 PM
How to Sort Customer List with Specific States SeaTiger New Users to Excel 4 February 8th 06 02:02 AM
My date format is not as the template states Denise Excel Worksheet Functions 2 August 10th 05 07:29 PM
How to find top five States? Saadi Excel Worksheet Functions 7 February 15th 05 09:05 PM


All times are GMT +1. The time now is 04:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"