Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default an excellent time waster

Open a new blank workbook, go to the VBA immediate window and type cells = 1. This will fill every
cell in sheet1 with a number 1. Save the file as number1.xls and close the file.

Open another new blank workbook, go to the VBA immediate window and type cells = "a". This will
fill every cell in sheet1 with a letter a. Save the file as lettera.xls and close the file.

Now bring up the windows explorer and look at the size of both files. Why is the file with the
letter "a" bigger than the file with the number 1? I thought a number takes up more bytes than a
single letter.

As a control experiment, try running the following procedure twice, once with a number and once with
a letter. This fills every cell in the entire workbook. You may want to defrag your drive and
and/or turn your cpu fan on high. This procedure will put quite a strain on your puter's ticker.

Sub fillworkbook()
Dim i as Worksheet

For Each i in Sheets
i.cells = 1
Next i

End


  #2   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default an excellent time waster

Sure is a time waster but if you are interested in how Excel BIFF files are
structured then take a peek here....

http://sc.openoffice.org/excelfileformat.pdf

--
Cheers
Nigel



"Jeff" wrote in message
...
Open a new blank workbook, go to the VBA immediate window and type cells =

1. This will fill every
cell in sheet1 with a number 1. Save the file as number1.xls and close

the file.

Open another new blank workbook, go to the VBA immediate window and type

cells = "a". This will
fill every cell in sheet1 with a letter a. Save the file as lettera.xls

and close the file.

Now bring up the windows explorer and look at the size of both files. Why

is the file with the
letter "a" bigger than the file with the number 1? I thought a number

takes up more bytes than a
single letter.

As a control experiment, try running the following procedure twice, once

with a number and once with
a letter. This fills every cell in the entire workbook. You may want to

defrag your drive and
and/or turn your cpu fan on high. This procedure will put quite a strain

on your puter's ticker.

Sub fillworkbook()
Dim i as Worksheet

For Each i in Sheets
i.cells = 1
Next i

End




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
Time calculations for Scheduled Time vs. Actual Time Worked The Caterer Excel Discussion (Misc queries) 1 November 29th 09 08:08 AM
straight time, time and a half, and double time Jeremy Excel Discussion (Misc queries) 3 September 23rd 08 09:03 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
When i put A in Cell A1 i need excellent to come up in B1 brad Excel Discussion (Misc queries) 2 December 14th 07 03:01 PM
Excellent=1, Good=2, etc. Kmarie Excel Worksheet Functions 6 May 21st 05 01:27 PM


All times are GMT +1. The time now is 05:01 AM.

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"