Vika,
No macro necessary, just a function.
Assuming the low-high table is in K1:L11, then just put this formula in B1
=MATCH(A1,$K$1:$K$11,1)
and copy down
--
HTH
RP
(remove nothere from the email address if mailing direct)
"Vika.F" wrote in
message ...
Is there a way to write a macro that can take the entered value from the
cells A2-A10 and run it through the "low" and "high" range and
automatically enter the correct codes to cells B2-B10 in the data
sheet.
code low high
1 0 5
2 6 10
3 11 15
4 16 20
5 21 25
6 16 30
7 31 35
8 36 40
9 41 45
10 46 50
11 51 55
For Example:
A B
7 2
3 1
53 11
42 9
32 7
53 11
14 3
28 6
5 1
Thank you very much for any help
--
Vika.F
------------------------------------------------------------------------
Vika.F's Profile:
http://www.excelforum.com/member.php...o&userid=26255
View this thread: http://www.excelforum.com/showthread...hreadid=395530