#1   Report Post  
Posted to microsoft.public.excel.misc
FT FT is offline
external usenet poster
 
Posts: 4
Default Rank If?

Here is my data


ColA-ColB-ColC
ABC-1-
ABC-4-
ABC-2-
DEF-4-
DEF-5-
DEF-10-
FGH-19-
FGH-12-
FGH-1-
FGH-4-
FGH-8-


Is there any formula I can use in Column C where it will input a 1 if
the number in Column B is ranked in the top two of Column A, and a 0
if it's not?

So final result would look like:

ColA-ColB-ColC
ABC-1-0
ABC-4-1
ABC-2-1
DEF-4-0
DEF-5-1
DEF-10-1
FGH-19-1
FGH-12-1
FGH-1-0
FGH-4-0
FGH-8-0
FGH-9
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Rank If?

FT,

In C2, enter the formula

=IF(1+SUMPRODUCT(($A$2:$A$XXX=A2)*($B$2:$B$XXXB2) )<=2,1,0)

replace the XXX with the row number of your bottom values, then copy the formula down to match your
data set.

HTH,
Bernie
MS Excel MVP


"FT" wrote in message
...
Here is my data


ColA-ColB-ColC
ABC-1-
ABC-4-
ABC-2-
DEF-4-
DEF-5-
DEF-10-
FGH-19-
FGH-12-
FGH-1-
FGH-4-
FGH-8-


Is there any formula I can use in Column C where it will input a 1 if
the number in Column B is ranked in the top two of Column A, and a 0
if it's not?

So final result would look like:

ColA-ColB-ColC
ABC-1-0
ABC-4-1
ABC-2-1
DEF-4-0
DEF-5-1
DEF-10-1
FGH-19-1
FGH-12-1
FGH-1-0
FGH-4-0
FGH-8-0
FGH-9



  #3   Report Post  
Posted to microsoft.public.excel.misc
FT FT is offline
external usenet poster
 
Posts: 4
Default Rank If?


Thanks Bernie, worked like magic...had found a post you had replied to
with similar question after a google search.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Rank If?


Thanks Bernie, worked like magic...had found a post you had replied to
with similar question after a google search.


Me, too! ;-)

Gotta love Google...

Bernie
MS Excel MVP


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
rank the numbers / range of data using 'RANK' and 'ABS' KP Excel Worksheet Functions 1 March 8th 08 05:50 PM
RANK, duplicate ranking but no gaps in rank arron laing Excel Worksheet Functions 4 June 14th 06 07:57 AM
Rank where lowest value is highest rank mile3024 Excel Worksheet Functions 2 December 9th 05 10:57 PM
Does Correl/Rank combo work eg CORREL(cols E & H) where E&H=RANK(. Emmanuel Excel Worksheet Functions 3 November 12th 05 03:33 PM
Rank items, select one start date, have remaining dates follow based on rank rob normerica Excel Discussion (Misc queries) 1 August 15th 05 09:36 PM


All times are GMT +1. The time now is 02:25 AM.

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"