Thread: Vlookup
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Mark Mark is offline
external usenet poster
 
Posts: 989
Default Vlookup

Mean -0.818 0.123 0.932 1.585
SD 0.132 0.250 0.273 0.211
M-1SD -0.950 -0.127 0.659 1.374
M+1SD -0.686 0.372 1.204 1.796
Returned 14 23 31.5 37.5
But Shd Be14.5 23.5 32 37.5



W X
-0.97233 13
-0.91169 13.5
-0.85234 14
-0.79413 14.5
-0.73697 15
-0.68078 15.5
....
-0.0099 22
0.03871 22.5
0.08702 23
0.13509 23.5
0.18291 24
0.23061 24.5
....
0.8506 31
0.90019 31.5
0.95039 32
1.00127 32.5
1.05301 33
1.10559 33.5
....
1.38651 36
1.44727 36.5
1.50992 37
1.57465 37.5
1.64175 38
1.71143 38.5
1.78403 39
....

"Mark" wrote:

Thanks for your help, but I'm also using the vlookup to find a value in e27,
g27 which would mean I would need a column Z, AA, etc. Is there an easier
way?

"bj" wrote:

you may need to use a helper column (Y?)
in Y2 enter =abs(c$27-w2)
copy down to Y98
use index($X$2:$X$98,match(min($Y$2:$Y$98),$Y$2:$Y$98)

"Mark" wrote:

I'm using the vlookup function below and looking for the value in C27 that is
closest (numerically) to the value in columns W and returning the
corresponding value in X

=IF(C27"","",VLOOKUP(C27,$W$2:$X$98,2,TRUE))


C27 is -0.818

and the relavent part in W:X is

-0.97233 13
-0.91169 13.5
-0.85234 14
-0.79413 14.5
-0.73697 15

Using the vlookup as I have it returns 14, but the closest value is the one
corresponding to 14.5. How do I get it to return the value 14.5.