Hey,
Let's say I have this:
That will give me the exact byte value of 10GB. However, I want to step up to next "whole" byte; "whole" will depend on the unit in A1:
That will give me 800.5MB and 10.5GB in byte value, but I'd want those to be stepped up to 641GB and 11GB (possibly even 642GB and 12GB to avoid odd number) in byte notation. However it's not as simple as rounding to 1 decimal, since this one is allowable:
But this one isn't:
That should be rounded to 1.6TB in bytes.
This is for VM sizing, e.g. you'd never spec a VM RAM with decimals in (10.5GB) but you would give it 1.5TB. Out of interest I am obviously going based on 1024 (binary) instead of 1000 (decimal). Not sure whether this is the correct way or not. Some Hypervisors still require MB notation for RAM, e.g. 10240MB for 10GB.
(I'm being cleverer than shown in the CONVERT function to actually determine the source format (B, KB, MB, GB, TB, PB, EB, ZB, YB).)
Thanks
Let's say I have this:
Excel Formula:
A1: 10GB
B1: =CONVERT(A1,"Gibyte","byte")
That will give me the exact byte value of 10GB. However, I want to step up to next "whole" byte; "whole" will depend on the unit in A1:
Excel Formula:
A1: 640.5
B1: =CONVERT(A1,"Gibyte","byte")
Excel Formula:
A1: 10.5GB
B1: =CONVERT(A1,"Gibyte","byte")
That will give me 800.5MB and 10.5GB in byte value, but I'd want those to be stepped up to 641GB and 11GB (possibly even 642GB and 12GB to avoid odd number) in byte notation. However it's not as simple as rounding to 1 decimal, since this one is allowable:
Excel Formula:
A1: 1.5TB
B1: =CONVERT(A1,"Tibyte","byte")
But this one isn't:
Excel Formula:
A1: 1.57TB
B1: =CONVERT(A1,"Tibyte","byte")
That should be rounded to 1.6TB in bytes.
This is for VM sizing, e.g. you'd never spec a VM RAM with decimals in (10.5GB) but you would give it 1.5TB. Out of interest I am obviously going based on 1024 (binary) instead of 1000 (decimal). Not sure whether this is the correct way or not. Some Hypervisors still require MB notation for RAM, e.g. 10240MB for 10GB.
(I'm being cleverer than shown in the CONVERT function to actually determine the source format (B, KB, MB, GB, TB, PB, EB, ZB, YB).)
Thanks