Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determining File Size


:(
To calculate the size of a file, say, Tester.xls, we use:

Format(FileLen("Tester.xls")*0.0009767,"0") & "KB"

Can someone explain the use of the the factor* 0.0009767* (rather than
the customary .001) in converting the bytes into Kilo Bytes?


David


--
davidm
------------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=477045

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determining File Size


Thanks Leith and Bob for the explanation. By the way, isn't it strang
that a "kilo" for once doesn't denote 1,000?

David

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=47704

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 690
Default Determining File Size

I think the program considers 2^10, or 1,024 to be a kilobyte. instead of
1,000.
Therefore, the ratio 1 kb / 1024 , equals 0.0009765625.

HTH. :)
--
Dana DeLouis
Win XP & Office 2003


"davidm" wrote in
message ...

:(
To calculate the size of a file, say, Tester.xls, we use:

Format(FileLen("Tester.xls")*0.0009767,"0") & "KB"

Can someone explain the use of the the factor* 0.0009767* (rather than
the customary .001) in converting the bytes into Kilo Bytes?


David


--
davidm
------------------------------------------------------------------------
davidm's Profile:
http://www.excelforum.com/member.php...o&userid=20645
View this thread: http://www.excelforum.com/showthread...hreadid=477045



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Determining File Size


Diana,

So by logical extension, can I construct *I mega-byte* as:

I mg = 1 million bytes (approx)
= 1 Kb (Excel's) x 1,000 approx.
= (2 ^10 )bytes x 1,000 approx
=(2 ^10 )bytes x 2 ^10
= 2^20 bytes
= 1,048,576 bytes ?

Hence, to convert N bytes to Megabytes, the correspondin
multiplication factor
could be 1/1048576 = 9.5367 x 10^

--
david
-----------------------------------------------------------------------
davidm's Profile: http://www.excelforum.com/member.php...fo&userid=2064
View this thread: http://www.excelforum.com/showthread.php?threadid=47704

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
File Size With Macros Has Increased From Its Origina Size Fred Excel Discussion (Misc queries) 1 April 26th 08 12:24 AM
how to set sheet size to reduce file size LJ Excel Discussion (Misc queries) 1 November 26th 06 02:35 AM
Unable to open excel file and when view the file size show as 1 KB Kamal Siva Excel Discussion (Misc queries) 1 March 7th 06 03:23 AM
Determining the size of a range. Dave the wave Excel Programming 3 June 30th 04 01:47 AM
How to get the size of the excel file, a sheet size (in bytes)? bookworm98[_13_] Excel Programming 1 January 28th 04 02:59 PM


All times are GMT +1. The time now is 02:26 PM.

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

About Us

"It's about Microsoft Excel"