View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Larry Levinson Larry Levinson is offline
external usenet poster
 
Posts: 42
Default Data Types help ... Overflow errors

I have a formula to calculate a percentage,

dim used, guests as Long, result as single
result = (USED / GUESTS)*100

and get the dreaded overflow on data type error on some of the
answers.

I tried double, variant and decimal in the dim statment. decimal
wouldn't even take in the dim.

then, I tried, result = round((USED / GUESTS)*100,1)

but the syntax gets hung up on the parentheses ...

help greatly appreciated.


Larry Levinson
Talking up to the vocal ...
LLevinson*Bloomberg.net
(remove the star etc ....)