Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
The following texts return true for IsNumeric: 121d1 13124324d7 2892392385d1 and so on It returns true for a string with a set of number followed by d and a single number. I found this to be a strange occurance. Is there a fix or a workaround? Thanks, Jayant |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there any more non numeric strings that return true, other than the
above sequence? Thanks, Jayant |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Try IsNumber e.g. =Isnumber(A1) where A1 = 121D1 ... will return FALSE or in VBA Msgbox application.IsNumber("121D1") HTH "jjk" wrote: Is there any more non numeric strings that return true, other than the above sequence? Thanks, Jayant |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the tips.
Regards, Jayant |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The 'd' tells excel something special, just like 'e' would. In this case,
what comes after the 'd' indicates # trailing zeros. HTH "jjk" wrote in message oups.com... Hi, The following texts return true for IsNumeric: 121d1 13124324d7 2892392385d1 and so on It returns true for a string with a set of number followed by d and a single number. I found this to be a strange occurance. Is there a fix or a workaround? Thanks, Jayant |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That "something special" you are referring to is known as "scientific
notation." In Fortran the "e" stands for "exponent", the mantissa being a single precision number, and the "d" stands for "double", meaning "exponent" but the mantissa being double precision. VB doesn't seem to differentiate, i.e. "d" and "e" seem to work the same but maybe both are available for the sake of standards. Anyone feel free to correct me if I'm not exactly right about my explanation. 1.234e5 is equivalent to 1.234 * 10 ^ 5 1.234d5 is equivalent to 1.234 * 10 ^ 5 "William Benson" wrote: The 'd' tells excel something special, just like 'e' would. In this case, what comes after the 'd' indicates # trailing zeros. HTH "jjk" wrote in message oups.com... Hi, The following texts return true for IsNumeric: 121d1 13124324d7 2892392385d1 and so on It returns true for a string with a set of number followed by d and a single number. I found this to be a strange occurance. Is there a fix or a workaround? Thanks, Jayant |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Let me further my examples to make sure you realize the "d" is not the number
of trailing zeros: 1.234e5 is equivalent to 1.234 * 10 ^ 5 which equals 123400. 1.234d-5 is equivalent to 1.234 * 10 ^ -5 which equals .00001234 yes, you can have negative exponents. In fact, if I recall correctly, Fortran also allows decimal exponents (logarithms) 1.234e5.67 is equivalent to 1.234 * 10 ^ 5.67 which equals 577185.164 1.234e-5.67 is equivalent to 1.234 * 10 ^ -5.67 which equals .000002638245 (if I did my math right) VB doesn't seem to like decimal exponents. |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was a mathematics major about 22 years ago, but that doesn't mean I know
how to express facts precisely anymore, I guess! When an OP shows a bunch of numbers all which are positive integers, some expressed in "d" notation, I say "number of trailing zeros" without even thinking because that is what they worked out to be in his case: Your additional clarity (and recognizing the need for it) is appreciated not just by myself, but by all reading the post I am sure... thanks. Bill "Charlie" wrote in message ... Let me further my examples to make sure you realize the "d" is not the number of trailing zeros: 1.234e5 is equivalent to 1.234 * 10 ^ 5 which equals 123400. 1.234d-5 is equivalent to 1.234 * 10 ^ -5 which equals .00001234 yes, you can have negative exponents. In fact, if I recall correctly, Fortran also allows decimal exponents (logarithms) 1.234e5.67 is equivalent to 1.234 * 10 ^ 5.67 which equals 577185.164 1.234e-5.67 is equivalent to 1.234 * 10 ^ -5.67 which equals .000002638245 (if I did my math right) VB doesn't seem to like decimal exponents. |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Right ... d and e are the same, I was trying to keep it simple (trailing
zeros) as opposed to getting into exponential notation ("10 raised to the power of...") I am sure others will benefit from your more precise reply, thanks. "Charlie" wrote in message ... That "something special" you are referring to is known as "scientific notation." In Fortran the "e" stands for "exponent", the mantissa being a single precision number, and the "d" stands for "double", meaning "exponent" but the mantissa being double precision. VB doesn't seem to differentiate, i.e. "d" and "e" seem to work the same but maybe both are available for the sake of standards. Anyone feel free to correct me if I'm not exactly right about my explanation. 1.234e5 is equivalent to 1.234 * 10 ^ 5 1.234d5 is equivalent to 1.234 * 10 ^ 5 "William Benson" wrote: The 'd' tells excel something special, just like 'e' would. In this case, what comes after the 'd' indicates # trailing zeros. HTH "jjk" wrote in message oups.com... Hi, The following texts return true for IsNumeric: 121d1 13124324d7 2892392385d1 and so on It returns true for a string with a set of number followed by d and a single number. I found this to be a strange occurance. Is there a fix or a workaround? Thanks, Jayant |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As far as I know, there is no function IsNumeric in Excel.
Looking at the Upper/Lowercase mix, it might be a User Defined Function. Please tell us more about the function, what you expect it to do how you've used it before, etc. -- Kind regards, Niek Otten Microsoft MVP - Excel "jjk" wrote in message oups.com... Hi, The following texts return true for IsNumeric: 121d1 13124324d7 2892392385d1 and so on It returns true for a string with a set of number followed by d and a single number. I found this to be a strange occurance. Is there a fix or a workaround? Thanks, Jayant |
#11
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Niek,
It is the VBA function IsNumeric from the Information class. Regards, Jayant |
#12
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Of course, thanks
-- Kind regards, Niek Otten Microsoft MVP - Excel "jjk" wrote in message ups.com... Hi Niek, It is the VBA function IsNumeric from the Information class. Regards, Jayant |
#13
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
IsNumeric is a VB / VBA function
IsNumber is the Excel Worksheet Function "Niek Otten" wrote in message ... As far as I know, there is no function IsNumeric in Excel. Looking at the Upper/Lowercase mix, it might be a User Defined Function. Please tell us more about the function, what you expect it to do how you've used it before, etc. -- Kind regards, Niek Otten Microsoft MVP - Excel "jjk" wrote in message oups.com... Hi, The following texts return true for IsNumeric: 121d1 13124324d7 2892392385d1 and so on It returns true for a string with a set of number followed by d and a single number. I found this to be a strange occurance. Is there a fix or a workaround? Thanks, Jayant |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable autoformat of "true" and "false" text | Excel Discussion (Misc queries) | |||
Check if cells contain the word "Thailand", return "TRUE" | Excel Worksheet Functions | |||
change "true" and "false" to "availble" and "out of stock" | Excel Worksheet Functions | |||
Typing "true" excel 2007 change it to "TRUE" | Excel Discussion (Misc queries) | |||
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next | New Users to Excel |