What would have helped more than your *results* would be a copy of the
*formula* that is returning them, but lacking that let me guess - Does the
lookup range (table) in the formula use absolute references, i.e.:
$G1$:$G$45
as opposed to just using relative references:
G1:G45
If not, the relative references are changing as the formula is copied down &
soon runs out of the table range.

Signature
HTH |:>)
Bob Jones
[MVP] Office:Mac
>I have a problem that has appeared in a large spreadsheet where the Lookup
> function returns some values correct and not others. To test what was
[quoted text clipped - 44 lines]
> suggestions?
> Thanks
jeff - 17 Aug 2007 19:26 GMT
Oops, yes i should have included the formula. Yes it does use absolute
references as follows: =LOOKUP(D3,$A$3:$A$36,$B$3:$B$36)

Signature
jeff
> What would have helped more than your *results* would be a copy of the
> *formula* that is returning them, but lacking that let me guess - Does the
[quoted text clipped - 57 lines]
> > suggestions?
> > Thanks
jpdphd - 17 Aug 2007 20:29 GMT
> Oops, yes i should have included the formula. Yes it does use absolute
> references as follows: =LOOKUP(D3,$A$3:$A$36,$B$3:$B$36)
[quoted text clipped - 69 lines]
> > > --
> > > jeff
Jeff,
I think if you replace G1 with G01, (etc thru G9), it will work
correctly. What puzzles me is that I would have thought that the wrong
answers would have begun with G10 rather than G16. Maybe there's some
hexidecimal conversion silently working in the background.
jpdphd
jeff - 17 Aug 2007 22:53 GMT
> > Oops, yes i should have included the formula. Yes it does use absolute
> > references as follows: =LOOKUP(D3,$A$3:$A$36,$B$3:$B$36)
[quoted text clipped - 75 lines]
> hexidecimal conversion silently working in the background.
> jpdphd
Thanks for that, it does fix the problem. I thought it was something to do
with G11 having two ones, as this was where it was tripping up in the main
spreadsheet although it got past this in the test spreadsheet. I don't know
why this works but i can live with it - thanks again.
Jeff
CyberTaz - 18 Aug 2007 00:06 GMT
Hi Jeff -
If you happen to return this may help explain it:
Since you're dealing with a text string each character has a value
associated with it and Excel looks at the series of values, not the string
as a whole - IOW, when you look at G11 you see "Gee eleven", when Excel
looks at the same string it sees "Gee one one". Anything with a higher
single digit after the G (such as G2) is interpreted as a higher value than
any where the first digit after the G is a 1 (G1, G11, G111, ad infinitum).
If you're interested there is a table of ascii values at:
http://www.asciitable.com/
HTH |:>)
Bob Jones
[MVP] Office:Mac
On 8/17/07 5:53 PM, in article
0C331E74-0CF0-415D-92C5-DBB550FD2BAC@microsoft.com, "jeff"
Jeff,
It is working ABSOLUTELY correctly, and as expected. What is happening is
that your input array, the stuff in A3:A36 is not is ascending order as
REQUIRED by the lookup function. You think they are in order, but they
aren't. To do what you want, the values in column A must be G01, G02, or G 1
G 2, etc. the lookup function is returning the correct matching value for
the next lower value. Read the Help discussion carefully.
If you do not want to change the values in A3:A11, use the index and match
functions: =INDEX($B$3:$B$36,MATCH(D3,$A$3:$A$36,0))

Signature
Bob Greenblatt [MVP], Macintosh
bobgreenblattATmsnDOTcom
jeff - 18 Aug 2007 03:22 GMT
Yep, thanks all, I can see now how it thinks - problem solved!

Signature
jeff
> Jeff,
>
[quoted text clipped - 7 lines]
> If you do not want to change the values in A3:A11, use the index and match
> functions: =INDEX($B$3:$B$36,MATCH(D3,$A$3:$A$36,0))