Hey,
I have this formula: =TEXT(CONVERT(G4,C4,"Gibyte"),"#,##0.00#######")&K$1
K$1 is either GB or TB
In one example the calculated value is: 640.00GB
In another example, using Tibyte instead, the calculated value is: 0.625TB
I need decimals in only some cases. But I'd prefer 640.00GB to be shown as 640GB, and 1.00TB to be shown as 1TB.
I can change the TEXT format to #,##0.######### but this results in 640.GB and 1.TB
So, how do I either make the . optional, or have 2 different TEXT formats: if all the decimals are 0, use something like #,###0 and if any decimal is not zero, use the current format - I know IF funciton, just not how to detect for 'all zero decimals'
Thanks
I have this formula: =TEXT(CONVERT(G4,C4,"Gibyte"),"#,##0.00#######")&K$1
K$1 is either GB or TB
In one example the calculated value is: 640.00GB
In another example, using Tibyte instead, the calculated value is: 0.625TB
I need decimals in only some cases. But I'd prefer 640.00GB to be shown as 640GB, and 1.00TB to be shown as 1TB.
I can change the TEXT format to #,##0.######### but this results in 640.GB and 1.TB
So, how do I either make the . optional, or have 2 different TEXT formats: if all the decimals are 0, use something like #,###0 and if any decimal is not zero, use the current format - I know IF funciton, just not how to detect for 'all zero decimals'
Thanks