i have a data from which i have to select top ten values ..
the data is something like this
pid
|
|
0
|
|
|
|
Reply
|
vicky
|
2/2/2010 1:01:54 PM |
|
pid sales
1 5
2 10
3 15
3 10
3 5
1 6
1 7
2 20
2 5
.........
output of only top ten sales (rest of the values i need not dispaly)
pid sales pid sales pid sales
1 7 2 20 3 15
1 6 2 10 3 10
1 5 2 5 3 5
|
|
0
|
|
|
|
Reply
|
vicky
|
2/2/2010 1:06:44 PM
|
|
If your PID values are in A2:A100 and the sales in B2:B100, the ARRAY
formula (commit with CTRL+SHIFT+ENTER) below will give you the larges B
value whose corresponding pid is 1
=LARGE(IF(A2:A10=1,B2:B10,0),1)
If D2:D11 have the value 1, in E2 enter
=LARGE(IF($A$2:$A$100=D2,$B$2:$B$100,0),ROW(A1))
Copy it down the column to get first, second, third, etc largest
With 2 in F2:F11, copy the formula to G2 and then drag down the column.....
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
"vicky" <vimalbarlota@gmail.com> wrote in message
news:398d9c9c-2e7b-4c23-b8bc-ee0ec219cbc1@a16g2000pre.googlegroups.com...
> pid sales
> 1 5
> 2 10
> 3 15
> 3 10
> 3 5
> 1 6
> 1 7
> 2 20
> 2 5
> ........
>
> output of only top ten sales (rest of the values i need not dispaly)
>
> pid sales pid sales pid sales
> 1 7 2 20 3 15
> 1 6 2 10 3 10
> 1 5 2 5 3 5
|
|
0
|
|
|
|
Reply
|
Bernard
|
2/2/2010 2:06:39 PM
|
|
Hello Vicky,
On my Excel 2007 I select: Home then: Sort and Largest to smallest and voila
you can pick the top ten.
Best wishes
Gabor
"vicky" <vimalbarlota@gmail.com> wrote in message
news:aabbc8fb-7044-48a4-a2a4-c2fd9be81127@t17g2000prg.googlegroups.com...
>i have a data from which i have to select top ten values ..
> the data is something like this
>
> pid
>
|
|
0
|
|
|
|
Reply
|
helene
|
2/2/2010 2:08:58 PM
|
|
hey i need a formula for this
|
|
0
|
|
|
|
Reply
|
vicky
|
2/3/2010 8:11:39 AM
|
|
On Feb 3, 1:11=A0pm, vicky <vimalbarl...@gmail.com> wrote:
> hey i need a formula for this
You can use Rank formula for this. Supposing you have Pid in Column A
and Sales in Column B , then in column C you can enter C1=3DRank
C2=3DRANK(B2,$B$2:$B$100,0) Now drag this formula in all the cells and
you will get the rank of number. Apply filter for rank 1 to 10.
Alternatively you can apply a pivot table and use filter to show top
10 values only.
Anand
9910548139
|
|
0
|
|
|
|
Reply
|
anandydr
|
2/3/2010 8:58:46 AM
|
|
On Feb 3, 1:11=A0pm, vicky <vimalbarl...@gmail.com> wrote:
> hey i need a formula for this
There can be one more manual process for this if you need to have top
sales for all different periods. Apply custom sort on Pid column and
choose smallest to largest.
Apply filter on columns and choose 1 in pid column. In column C use
the formula =3DRANK(B2,$B$2:$B$10,0) assuming that last value of 1 in
pid column is shown in A10. Then select 2 in column A for Pid(period)
and apply the same formula in visible cells. Repeat this until you
have done the same with all periods. Now remove filter from Pid column
and apply filter on Rank column , check values from 1 to 10 and all
top sales in periods 1 to 4 would be visible.
Hope that helps,
Anand
9910548139
@Bernard Liengme
Dear Sir,
I tested your formula on following data set
pid sales Result
1 5 10
1 10 10
1 7 10
2 10 10
2 5 10
2 20 10
3 15 10
3 6 10
3 5 10
The third column (C) has the formula {=3DLARGE(IF($A$2:$A$10=3D1,$B$2:$B
$10,0),1)} (array entered as per instructions), somehow the results
were not what they should be. I've tried to see the logic behind the
formula through formula auditing but can't figure out where I went
wrong. I was wondering if you could illuminate.
thanks,
Anand
9910548139
|
|
0
|
|
|
|
Reply
|
anandydr
|
2/3/2010 9:24:50 AM
|
|
|
6 Replies
673 Views
(page loaded in 0.297 seconds)
Similiar Articles: how to select top ten values - microsoft.public.exceli have a data from which i have to select top ten values .. the data is something like this pid ... top N values per group using VBA - microsoft.public.access.queries ...how to select top ten values - microsoft.public.excel top N values per group using VBA - microsoft.public.access.queries ... how to select top ten values - microsoft ... How to sum all the records, excluding the top N ones? - microsoft ...how to select top ten values - microsoft.public.excel How to sum all the records, excluding the top N ones? - microsoft ... how to select top ten values - microsoft.public ... PIvot Table top Values - microsoft.public.excelHI I have to generate pivot tables and only extarct the top 20 or 40 values. Excel 2003 has an option that could display the top values that I need... Can I use Select Top of every group in a Query? - microsoft.public ...how to select top ten values - microsoft.public.excel Can I use Select Top of every group in a Query? - microsoft.public ... >> >> >> SELECT Persons.PersonID ... How to retrieve a distinct row using one column as criteria ...how to select top ten values - microsoft.public.excel How to retrieve a distinct row using one column as criteria ... SELECT Warehouse, Sku, LastDate, (SELECT TOP 1 ... pivot table sorting - microsoft.public.excel.chartingSelect Value Filters then Top 10. Pop up should appear with four fields:- Show Top 10 Items Sum of Value Hit OK. Top ten items (by Vendor) should now ... Using a variable 'Top n' value from a form control ...Is it possible to have a form control that can adjust the 'Top n' value that is based ... SQL = strSql > > > My Current SQL (Test Points generator): > > SELECT TOP 5 Test ... Selecting more than one value from a list or combo box - microsoft ...You cannot select more than one value from a combo box, but you can for a listbox. ... However, the combo box doesn ... the item to the top of the list. The ... Top 5 Most Important Reports - microsoft.public.project ...how to select top ten values - microsoft.public.excel Top 5 Most Important Reports - microsoft.public.project ... how to select top ten values - microsoft.public.excel i ... how to select top ten values Excel - Excel Discussion List Tuesday ...i have a data from which i have to select top ten values .. the data is something like this pid Highlight Top 10 Values (or bottom 10) using Excel Conditional ...To highlight the top 10 values, 1. Select the range of values and launch conditional formatting dialog. 2. Assuming you have cells in the range c5: c30, In the formula we ... Find the top 10 values in an Excel range without sorting ...Find the top 10 values in an Excel range without sorting ... want to total the amount of sales from your top 10 ... Select the range in column B containing Sales ... TOP (Transact-SQL) - Microsoft Corporation: Software, Smartphones ...As a part of a SELECT statement, the query optimizer can consider the value of expression in the TOP or FETCH clauses ... SELECT TOP(10)JobTitle, HireDate FROM ... How to select top 1 based on distinct value for a columnFrom my table, I need to select top one for all distinct value for a specific column. Something like Select top 1 distinct colname from table Obviously ... 7/23/2012 12:50:01 PM
|