View Single Post
  #5   Report Post  
 
Posts: n/a
Default

Bob
I know you have a table set up to use but this sounds like a simple=20
conversion like =B0C to =B0F or back
with a possible requirement to round either up, down or to the nearest=20
integer.

using the rules from your post
I have a worksheet that interprets values from a #255-#0 number system
and need to convert them to a 0%-100% number system and visa versa.
#255 =3D 0% . #250 =3D 1% and so on.


if the number to convert is in A1
To convert from #255-#0
=3D100-(100/255)*A1
or =3D1-(1/255)*A1 if you are using %formats

To convert from 0%-100%
=3D255-(255/100)*A1
or =3D255-255*A1 if you are using %formats

If you need to change the underlying returned value to an integer use one=20
of the Excel functions
eg =3DROUND(100-(100/255)*A1,0)
other options include
ROUNDUP
ROUNDDOWN
CEILING and FLOOR

have a look at the MS help and post back if you need guidence

hth RES