Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old November 18th, 2006, 10:11 PM
kaygdanimal kaygdanimal is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2006
Posts: 5 kaygdanimal User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 8 m 4 sec
Reputation Power: 0
Microsoft Excel - Return the Next of a Duplicate

Anyone ever written a formula that gave you the next available answer for a duplicate value?

I have two columns of data:

TEAM (unique value)
STAT (non-unique value)

I created a ranking list that ranks the STAT column in order from Best to Worst. I used the LARGE formula in order to do this.

Then next to the Ranked Data, I created a new formula that would look for the Ranked Value in the STAT column and respond back with the corresponding TEAM. In this instance I used the INDEX/MATCH formula.

HOWEVER, I have duplicate values and because of that, my INDEX/MATCH formula returns the same value.

An example of this would be:

68.5 Panthers
67.4 Cowboys
65.1 Colts
63.7 Redskins
63.7 Redskins

In this case, instead of returning the Steelers as the next result because the Redskins and Steelers both contained the same value, it returned Redskins because each instance of the formula stops on the first available match. I am trying to get it to return the next TEAM that has the same value.

I will send my spreadsheet to anyone that asks. Mess with it how you want. I've actually been trying to find a formula that does this for the longest time now.

Reply With Quote
  #2  
Old September 7th, 2007, 04:18 PM
Paloma6479 Paloma6479 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2007
Posts: 1 Paloma6479 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 m 21 sec
Reputation Power: 0
you'll have to rank your non-unique numbers first so that they each get a unique rank.

in a new column enter:

=SUM(1*(a2<$a$2:$a$20))+1+IF(ROW(a2)-ROW($a$2)=0,0,SUM(1*(a2=OFFSET($a$2,0,0,INDEX(ROW(a2)-ROW($a$2)+1,1)-1,1))))

enter using Ctrl+Shift+Enter
then copy down the column

then you can use your rank column to index instead.

hope this helps.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Microsoft Excel - Return the Next of a Duplicate


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway