View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
[email protected] conorfinnegan@gmail.com is offline
external usenet poster
 
Posts: 28
Default Return Top values with changing criteria

On May 15, 5:46*pm, "RagDyer" wrote:
Would this work out for you?
Duplicates are ranked as individual values:

ColA criteria in D1,
ColB criteria in E1,

Enter formula in F1 and copy down as many rows as the rankings you wish to
return.

=SUMPRODUCT(LARGE((A$2:A$13=D$1)*(B$2:B$13=E$1)*C$ 2:C$13,ROWS($1:1)))

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

wrote in message

...



I am trying to return the top N values from a list with corresponding
names. *The criteria for ranking changes.
ColA:C contain my data (thousands of rows). *ColD:E contain my
criteria (note below I want to return top 3 values). *ColF sorts in
Top3 order.


ColA * * * * * * *ColB * * * * * * *ColC
ColD * * * * * *ColE * * * * * * ColF


Movie * * * * * *Friday * * * * * * $25
Movie * * * * * Friday * * * * * $26
Movie * * * * * *Friday * * * * * * $26
Movie * * * * * Friday * * * * * $25
Movie * * * * * *Friday * * * * * * $18
Movie * * * * * Friday * * * * * $18
TV * * * * * * * *Tues * * * * * * * $12
Movie * * * * * Tues * * * * * * $21
TV * * * * * * * *Tues * * * * * * * $19
Movie * * * * * Tues * * * * * * $19
TV * * * * * * * *Tues * * * * * * * $21
Movie * * * * * Tues * * * * * * $12


I would like to use a formla that can rank the data when the two
criteria in ColD & E are met. *So when Movie and Friday show up in the
list of thousands, just return the top 3 values. *Then when Movie and
Tues are met, return the top 3 values.


I know this can be done, but I am having trouble fixing my formulas
when the two criteria change.


Thanks in advance for your help.- Hide quoted text -


- Show quoted text -


I need to allow for changing criteria in the same column. So in two
cells in the same two columns, I would have Movie and Wednesday, then
in the row beneath this one, I might have TV and Tuesday. The formula
above doesn't see that my criteria changed since it is using Absolute
references.

Let me know if there is a solution.

Thanks.

Conor