Hi,
How can I count the number of zeros after comma
I mean
0.000406 has 3 zeros
0.376556 has 0 zeros
0.000000434005 has 6 zeros
Thanks
Hi,
How can I count the number of zeros after comma
I mean
0.000406 has 3 zeros
0.376556 has 0 zeros
0.000000434005 has 6 zeros
Thanks
Hi, Try thid UDF
Right click Sheet Tab , Select "View Code". Vb Window appears.
From the VB Toolbar select "Insert", "Module". (New window appears.
Paste code into Blank Window.
Close VB window.
To run Function enter in cell as :-
For string in "A1".![]()
Please Login or Register to view this content.
Regards Mick![]()
Please Login or Register to view this content.
Perhaps (assuming values are valid Excel numbers)
=MAX(0,ROUNDUP(-LOG(A1,10),0)-1)
where A1 etc hold decimal values.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Following on from DonkeOte's very neat idea ,how about:-
To include Decimal Number greater than 1
Mick![]()
Please Login or Register to view this content.
Mick, I'm not sure that would work given base 10 decimals - eg 1.01
(why I used ROUNDUP and -1)
A few alternatives for handling numbers >= 1 .. one might be:
=IF(MOD(A1,1),ROUNDUP(-LOG(ROUND(MOD(A1,1),15)),0)-1,0)
No doubt the above can be shortened (assumes 15 digit significance) ... but has added pre-emptive MOD test.
DonkeyOte,
I think you've cracked it now , nice solution
Regards Mick
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks