Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Rank for range with two criterion - hard

Hi,

I'd like show my problem with rank by two criterion in
table below:

Name Feature Data Rank_of_Name_and_Feature
A 1 2.5 3
A 1 3.5 2
A 0 6.3 2
A 1 6.5 1
A 0 6.8 1
A 1 1.2 4
etc...

How create rank (diminishing count Data) for the same Name
(col1) and Feature (col2)?

My data can't be sorted!!
Any help in VBA or function (excel 2k) will be appreciated

Regards
Mark
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Rank for range with two criterion - hard

Hi
try:
=SUMPRODUCT(--($B$2:$B$7=B2),--($C$2:$C$7=C2))

Note: may not give you the expected results if you have ties in your data

"Mark" wrote:

Hi,

I'd like show my problem with rank by two criterion in
table below:

Name Feature Data Rank_of_Name_and_Feature
A 1 2.5 3
A 1 3.5 2
A 0 6.3 2
A 1 6.5 1
A 0 6.8 1
A 1 1.2 4
etc...

How create rank (diminishing count Data) for the same Name
(col1) and Feature (col2)?

My data can't be sorted!!
Any help in VBA or function (excel 2k) will be appreciated

Regards
Mark

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Rank for range with two criterion - hard

Hi Frank,
What target do you want achieve by function sumproduct?
I'd like calculate position in column
Rank_of_Name_and_Feature count column Data for e.g. Name A
and Feature d and separately for Name A and Feature u.

I a bit changed my table.:

Name Feature Data Rank_of_Name_and_Feature
A d 2.5 3 (what function ?)
A d 3.5 2 (what function ?)
A u 6.3 2 (what function ?)
A d 6.5 1 (what function ?)
A u 6.8 1 (what function ?)
A d 1.2 4 (what function ?)
etc...

Function RANK operate only for range, not for range take
into account Name and Feature.

Is there any solution for VBA or function?

Best Regards
Mark

-----Original Message-----
Hi
try:
=SUMPRODUCT(--($B$2:$B$7=B2),--($C$2:$C$7=C2))

Note: may not give you the expected results if you have

ties in your data

"Mark" wrote:

Hi,

I'd like show my problem with rank by two criterion in
table below:

Name Feature Data Rank_of_Name_and_Feature
A 1 2.5 3
A 1 3.5 2
A 0 6.3 2
A 1 6.5 1
A 0 6.8 1
A 1 1.2 4
etc...

How create rank (diminishing count Data) for the same

Name
(col1) and Feature (col2)?

My data can't be sorted!!
Any help in VBA or function (excel 2k) will be

appreciated

Regards
Mark

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Rank for range with two criterion - hard

It's not a perfect solution as it involves hard-coding a maximum value for
your data, but assuming the below are headerless columns A to C, the answer
in column D could be

{=MATCH(C1,SMALL(IF(A$1:A$6=A1,IF(B$1:B$6=B1,C$1:C $6,99)),ROW(A$1:A$6)),FALSE)}

This basically sorts the numbers manually, after stripping out any that
weren't matching the Name or Feature of that particular row. The ROW() part
is just to get a (1,2,3...} array that we can pass to SMALL() to get a
sorted list. You need a separate entry of the array formula for each line.

It's a little on the calculation-intensive side, but at least doesn't
involve any VBA.

Hope that helps,

Chris

"Mark" wrote in message
...
Hi Frank,
What target do you want achieve by function sumproduct?
I'd like calculate position in column
Rank_of_Name_and_Feature count column Data for e.g. Name A
and Feature d and separately for Name A and Feature u.

I a bit changed my table.:

Name Feature Data Rank_of_Name_and_Feature
A d 2.5 3 (what function ?)
A d 3.5 2 (what function ?)
A u 6.3 2 (what function ?)
A d 6.5 1 (what function ?)
A u 6.8 1 (what function ?)
A d 1.2 4 (what function ?)
etc...

Function RANK operate only for range, not for range take
into account Name and Feature.

Is there any solution for VBA or function?

Best Regards
Mark

-----Original Message-----
Hi
try:
=SUMPRODUCT(--($B$2:$B$7=B2),--($C$2:$C$7=C2))

Note: may not give you the expected results if you have

ties in your data

"Mark" wrote:

Hi,

I'd like show my problem with rank by two criterion in
table below:

Name Feature Data Rank_of_Name_and_Feature
A 1 2.5 3
A 1 3.5 2
A 0 6.3 2
A 1 6.5 1
A 0 6.8 1
A 1 1.2 4
etc...

How create rank (diminishing count Data) for the same

Name
(col1) and Feature (col2)?

My data can't be sorted!!
Any help in VBA or function (excel 2k) will be

appreciated

Regards
Mark

.



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
Hlp! Named range Advanced Filter Criterion Joyce Excel Discussion (Misc queries) 10 March 3rd 10 02:04 PM
rank the numbers / range of data using 'RANK' and 'ABS' KP Excel Worksheet Functions 1 March 8th 08 05:50 PM
Select value from a range given a rank BRD88 Excel Discussion (Misc queries) 2 August 30th 07 11:26 PM
Sum a range based on a criterion gerryboy458 Excel Worksheet Functions 3 January 20th 06 08:36 PM
Multiple criterion including wildcards to sum in a range JEH Excel Worksheet Functions 6 June 12th 05 10:55 AM


All times are GMT +1. The time now is 12:45 PM.

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

About Us

"It's about Microsoft Excel"