Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Matt Thompson
 
Posts: n/a
Default Add kilobytes to megabytes in the convert function

I always have to re-write the formula to convert kilobytes to megabytes to
gigabytes. It would be nice if excel had this availible out of the box,
maybe in the convert function.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions
  #2   Report Post  
David Billigmeier
 
Posts: n/a
Default

It shouldn't be that hard, multiply by increasing powers of 1024 (2^10) for
going up in memory, and divide by increasing powers of 1024 going backwards.
For example:

5402 Kilobytes in Gigabytes is equal to:

5402/1024^2 = 0.005151 GB

1 Gigabyte in Kilobytes is equal to:

1*1024^2 = 1,048,576 KB

--
Regards,
Dave


"Matt Thompson" wrote:

I always have to re-write the formula to convert kilobytes to megabytes to
gigabytes. It would be nice if excel had this availible out of the box,
maybe in the convert function.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions

  #3   Report Post  
David Billigmeier
 
Posts: n/a
Default

Here is a UDF you could use as well:

Function ConvertMem(n As Double, from_mem As String, to_mem As String)
from_mem_num = getMemNum(from_mem)
to_mem_num = getMemNum(to_mem)
ConvertMem = n * 1024 ^ (from_mem_num - to_mem_num)
End Function


Function getMemNum(mem_string As String)
getMemNum = Switch(mem_string = "b", 1, mem_string = "k", 2, mem_string =
"m", 3, mem_string = "g", 4, mem_string = "t", 5)
End Function

--
Regards,
Dave


"David Billigmeier" wrote:

It shouldn't be that hard, multiply by increasing powers of 1024 (2^10) for
going up in memory, and divide by increasing powers of 1024 going backwards.
For example:

5402 Kilobytes in Gigabytes is equal to:

5402/1024^2 = 0.005151 GB

1 Gigabyte in Kilobytes is equal to:

1*1024^2 = 1,048,576 KB

--
Regards,
Dave


"Matt Thompson" wrote:

I always have to re-write the formula to convert kilobytes to megabytes to
gigabytes. It would be nice if excel had this availible out of the box,
maybe in the convert function.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA function for "Mean" using Array as argument ASokolik Excel Worksheet Functions 21 March 28th 06 10:05 PM
IF function to blank without getting #value in sum function Brad Stevenson Excel Worksheet Functions 5 May 26th 05 10:26 AM
CONVERT Function Disappered in Excel Gord Dibben Excel Discussion (Misc queries) 3 April 13th 05 07:59 PM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
How do I use Excel's convert function for apothecary weight? S Code Excel Worksheet Functions 1 November 19th 04 08:13 PM


All times are GMT +1. The time now is 03:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"