Is there a built-in function to check if a value is a double/float?
I need to check if a particular cell is a float and also need to check the precision
looked all around and can't find anything!
thanks
Pabs
Is there a built-in function to check if a value is a double/float?
I need to check if a particular cell is a float and also need to check the precision
looked all around and can't find anything!
thanks
Pabs
Hello Pabs,
All numbers on a worksheet are stored as Double data type (IEEE 64 bit double precision floating point). Formatting only changes the appearance of the number, not the stored number itself. The internal precision is carried out to 15 decimal places.
If you need to check a variable in VBA then you need to first assign the number to a Variant data type variable. You can then use the VBA function VarType to determine if the number is Double. If the return value is 5, it is a double number.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Starbelow the post.
3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks