Little excel help required

Please post any questions regarding the program here.

Moderator: 2020vision

Little excel help required

Postby doris_day » Wed Jun 16, 2010 9:00 am

I'm improving every day with my excel skills but need a little help with something that will probably be very easy for some of you.

Say I have 2 columns, A and B. Say there are prices in the A cells and these are ranked in the B cells. I need a formula that will point to the respective price if I know the rank. So it would read something like =if(rank=4,price=?,"")

Hopefully you'll get my drift but ask any questions if you don't
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby johnnic » Wed Jun 16, 2010 9:36 am

The VLOOKUP function will do what you want.

Put your ranks in the first column and your prices in the second column. For example, if you have 10 ranks in cells A1 to A10 from 1 to 10 and 10 prices in cells B1 to B10, and let's assume you want to know the 5th rank price. The following formula will do the trick:

=VLOOKUP(5,A1:B10,2,FALSE), where

5 = the rank
A1:B10 = the range of the data including the rankings
2 = you want the data that exists in the second column of your range
FALSE = you want an exact match.

You can set the rank number in a separate cell and refer to it in your formula, of course.

Hope this helps. Please let me know if I haven't been clear.

John
johnnic
 
Posts: 68
Joined: Fri Apr 02, 2010 9:31 am

Postby doris_day » Wed Jun 16, 2010 9:57 am

I forgot about VLOOKUP. However, it doesn't appear to work. Could it be that the rank column cells are based on the RANK function ?
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby doris_day » Wed Jun 16, 2010 10:23 am

Found the problem. I needed the columns in a different order.
So, thanks for pointing me in the right direction.
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby johnnic » Wed Jun 16, 2010 10:43 am

It shouldn't cause a problem. I just tried it on the following data:

Cell A1 =RANK(B1,$B$1:$B$4,1)
Cell A2 =RANK(B2,$B$1:$B$4,1)
Cell A3 =RANK(B3,$B$1:$B$4,1)
Cell A4 =RANK(B4,$B$1:$B$4,1)

Cells B1,B2,B3 and B4 = $34, $654, $87 and $543 respectively.

Cell C1 =VLOOKUP(2,A1:B4,2,FALSE)

The solution is $87, which is what you would expect.

I'm at a loss to understand what is going wrong.

John
johnnic
 
Posts: 68
Joined: Fri Apr 02, 2010 9:31 am

Postby doris_day » Wed Jun 16, 2010 11:38 am

No, it works fine. It was me, not the formula.
Thanks again.
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am

Postby osknows » Wed Jun 16, 2010 12:14 pm

VLOOKUP relies on the lookup data being in order and the return value must be to the right of the lookup range

MATCH and INDEX functions can be used to get around the problems with VLOOKUP and are much faster over very large ranges

If Prices are in range A1:A10 and Rank in B1:B10

=MATCH(4,B1:B10,0) will return the row count from the start of the range which equals 4

=INDEX(A1:A10,MATCH(4,B1:B10,0),1) will return the value in column A
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby doris_day » Wed Jun 16, 2010 12:17 pm

Thanks osknows. Yes, I had my columns initially reversed, so I simply swapped them round but your new idea will be useful in the future. Thanks for that.
'He was looking for the card so high and wild he'd never need to deal another' - Leonard Cohen
User avatar
doris_day
 
Posts: 968
Joined: Fri Nov 02, 2007 12:34 am


Return to Help

Who is online

Users browsing this forum: Google [Bot] and 49 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.