Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Without formatting, numbers are condensing after 5 decimal places.
Now I can format this to show all the numbers formatted to 10 decimal places, but I don't want the trailing zeros.
Is it possible to do this with only formatting functions? I'd rather not use string functions to remove the excess zeros.
=ValueLoop(1,10) | Desired Result |
---|---|
1 | 0.1 |
2 | 0.01 |
3 | 0.001 |
4 | 0.0001 |
5 | 0.00001 |
6 | 0.000001 |
7 | 0.0000001 |
8 | 0.00000001 |
9 | 0.000000001 |
10 | 0.0000000001 |
Thanks.
=Num(0.00200, '##')
Is this not the same as applying no formatting? I'm still getting e notation after 5 decimal places.
Apply Num(X,'##')
where X is expression used by you above as Num(1/pow(10,ValueLoop......,'#.#########')
Use
=Num(0.00200, '(dec)')
This seems like it technically should work, but it seems to be manipulating the actual results somehow.
Use this
=Num(1/pow(10,ValueLoop(1,10)),'#.'&Repeat('#',ValueLoop(1,10)))
Thanks Pratyush, but I need a way to format the decimals in general, not just for this valueloop example.
Unfortunately, I think I'm going to have to use string functions to remove the trailing zeros.
This is the best I could come up with:
Replace(RTrim(Replace(Num(1/pow(10, ValueLoop(1,10)),'#.##########'),'0',' ')),' ','0')
Try this may be
=Num(Num(1/pow(10, ValueLoop(1, 10)), '##.##############'), '##.' & Repeat('#', FindOneOf(Mid(Num(1/pow(10, ValueLoop(1, 10)), '##.##############'), Index(Num(1/pow(10, ValueLoop(1, 10)), '##.##############'), '.')), '123456789', -1)-1))