GB, TB, calculations

tb582

New Member
Joined
May 21, 2007
Messages
35
I'm trying to calculate some disk space numbers, here's how my excel sheet is formatted:

I want T1 to be able to hold a value either in MB, GB, TB I should be able to specify in U1 if its MB,GB,TB etc. Any ideas on how to do that?

Column O has a number which I must mutiply T1 by and that value should be stored in GB/TV in column P. Whats the best way to do that?
 
If I understand what you want correctly, Custom Format column P with this pattern...

[<1000000000]0.00 \M\B;[<1000000000000]0.0 \G\B;0.0 T\B
 
Upvote 0
If I understand what you want correctly, Custom Format column P with this pattern...

[<1000000000]0.00 \M\B;[<1000000000000]0.0 \G\B;0.0 T\B

That doesn't appear to work, here's what I have right now:

[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"

but it doesn't go to TB, so my cell currently has 1803.89 GB when that should now read in TB.
 
Upvote 0
You can only have three, and you've chosen KB, MB, and GB. If you want MB, GB, and TB, use

[<1000000000]0.00,," MB";[<1000000000000]0.0,,," GB";0.0,,,," TB"
 
Upvote 0
That doesn't appear to work, here's what I have right now:

[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"

but it doesn't go to TB, so my cell currently has 1803.89 GB when that should now read in TB.
You are right, it does not work correctly because I forgot the commas. Try this instead...

[<1000000000]0.000,, \M\B;[<1000000000000]0.00,,, \G\B;0.00,,,, \T\B

or, since your posting seems to indicate you like quote strings instead of using the back-slash "escape" character, this...

[<1000000000]0.000,," MB";[<1000000000000]0.00,,," GB";0.00,,,," TB"

By the way, Excel won't allow both KB and TB in the format field... apparently that is too many conditional fields for it.
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top