Hi ,
It will work for all numbers , unless the number exceeds the limits of the type.
For instance the Integer type has a limit , which I am not sure about , but let us assume it is 32767. Now , if the cell contains the number 40000 , since this exceeds the limit of the type Integer , Excel will generate an error.
However , suppose you have declared the variable as type Integer or Long ; both of these types can accept only whole numbers ; if you now assign a decimal value to this variable , Excel will truncate the number.
For instance , if you assign the value 0.4 to a variable of type Integer or Long , the value actually assigned to the variable will be 0.
But no error will be generated.
Narayan