Forums

General Betting

There is currently 1 person viewing this thread.
dlarssonf
27 Mar 10 17:40
Joined:
Date Joined: 05 Mar 08
| Topic/replies: 11,612 | Blogger: dlarssonf's blog
Can any1 help me with the following please:

In column B , I have a list of figures which change when my I update other sheets in the workbook

In Column A , the figures never change but the values in column b beside them always do. In cell H4 , I want it to read the nearest figure to 100 from the list in column B and pick the corresponding value in Column A.

Does that make sense and if it does can Excel do this?

Many Thanks for any help

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
sort by:
Show
per page
Replies: 18
By:
starfish and coffee
When: 27 Mar 10 18:23
=VLOOKUP(100,a1:b10000,1,TRUE)

try that..
By:
IanP
When: 27 Mar 10 18:47
I don't think that will be easy to do. You can use Match and Index to to a left look-up but I don't know how you'd find the closest to 100 rather than exactly 100. Presumably column B can't be sorted ?
By:
dlarssonf
When: 27 Mar 10 18:55
thanks starfish that is what i have but it returns n/a

to Ian sometimes the figure doesn't fall exactly on 100 which is the problem
By:
Lori
When: 27 Mar 10 19:09
I think there's an easy way to do this, but I don't know it.

Can you do the following though:

In column C, have =abs(100-b1)
Then in column D use rank to return the figure from the vlookup. something like =if(rank c1, c1:c100)=100,vlookup (blah),"irrelevant")
By:
starfish and coffee
When: 27 Mar 10 19:10
i thought you must have tried that.
Sometimes excel reads the cell formula rather than the value, do you think thats the problem here? does adding a column witb =VALUE(B1) work? it should do but it doesnt always work for me
By:
IanP
When: 27 Mar 10 19:47
Do as Lori suggests ..

In Col C insert this formula =ABS(100-B1)

In Col D insert this formula =RANK(C1,$C$1:$C$100,1)

Then use this formula anywhere =INDEX($A$1:$D$100,MATCH(1,$D$1:$D$100,0),1)
By:
dlarssonf
When: 27 Mar 10 20:18
Thanks guys for all your help and it is sort of working but I am just getting the column header in cell H4 , instead of the a value
By:
IanP
When: 27 Mar 10 20:44
What happens if you delete the column headings row ?
By:
dlarssonf
When: 27 Mar 10 20:56
I now get the answer 1 Ian, which is the top cell now
By:
Jollop
When: 27 Mar 10 21:04
just out of interest, is it likely there will be two values in colB with the same value and are all values returned in colB less than 100?

It could get a bit more complicated if you get 99, 99, 101 etc

are the values in colB always whole numbers or are you getting for example 91.333333333etc?
By:
dlarssonf
When: 27 Mar 10 21:10
no jollop there is no duplicate values and the figures do go up to the 100,000s of thousands and yes though there is figures with two decimal places 2300.44 etc
By:
Jollop
When: 27 Mar 10 21:13
so you could return two values both as close to 100 ie 90 & 110 ? which one would you want to match with column A?
By:
dlarssonf
When: 27 Mar 10 21:18
it would then be the higher one Jollop
By:
Jollop
When: 27 Mar 10 21:53
In C1 (this is an array formula so press control&shift&enter not just enter)

=INDEX($B1:$B1000,MATCH(MIN(ABS($B1:$B$1000-100)),ABS($B$1:$B$1000-100),0),1)

In H8 (or whichever cell you wanted the result in)

=OFFSET($A$1:$B$1000,MATCH($C$1,OFFSET($A$1:$B$1000,0,1,ROWS($A$1:$B$1000),1),0)-1,0,1,1)

Try that it might need adjusting slightly.
By:
dlarssonf
When: 27 Mar 10 22:24
no Jollop that ain't working mate, don't worry I will figure something out. Many thanks to you and everyone for your help!!!!
By:
Compound Magic
When: 28 Mar 10 02:23
IN H4 enter this =MATCH(H2,dat,0)
Select all data in column B. In the name box type dat then enter
In cell H1 type 100 In the name box type tar then enter
In cell H2 paste this formula and enter it as an array
to do this press shift and control and enter.
=INDEX(dat,MATCH(SMALL(ABS(tar-dat),1),ABS(tar-dat),0))
By:
Compound Magic
When: 28 Mar 10 02:49
If you are not familiar with excel
the name box is the left most box in the formula bar
if you select Cell H1 you will see in the name box H1
In that box type as per previous instructions.

When entering an array formula, When you have pasted or typed in the formula,
the insertion must be blinking in the formula bar, then whilst holding down
shift and control press enter. This will put curly brackets around the formula.

Your answer that you wanted will be in H4 as you requested
By:
Compound Magic
When: 28 Mar 10 04:04
An interesting aside is that if you had 99 in column B and 101 in
column B. The closest number to 100 is actually 101 in % terms than
what 99 is.
So the formula in H2 would give you 101 even though the difference
in both cases is only 1.
sort by:
Show
per page

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
‹ back to topics
www.betfair.com