Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Is there a function or command which will input the size of the file I am
working on into a specified cell. I know I can look in Properties but I need the file size to be entered into a cell which I can then link to a summary spreadsheet which will list about 200 files and their file sizes. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How about a little macro:
Option Explicit Function HowBig(Optional rng As Range) As Double If rng Is Nothing Then Set rng = Application.Caller End If HowBig = 0 If rng.Parent.Parent.Path = "" Then 'never saved Exit Function End If HowBig = FileLen(rng.Parent.Parent.FullName) End Function If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm ======= Short course: Hit alt-f11 to get to the VBE (where macros/UDF's live) hit ctrl-R to view the project explorer Find your workbook. should look like: VBAProject (yourfilename.xls) right click on the project name Insert, then Module You should see the code window pop up on the right hand side Paste the code in there. Now go back to excel to test it out. Put =howbig() in an empty cell msdrolf wrote: Is there a function or command which will input the size of the file I am working on into a specified cell. I know I can look in Properties but I need the file size to be entered into a cell which I can then link to a summary spreadsheet which will list about 200 files and their file sizes. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
reduce the size of a file | Excel Discussion (Misc queries) | |||
Is there any File Auto Save Function for Excel and Word 2007 (Bet | Excel Worksheet Functions | |||
VLOOKUP from closed file using INDIRECT function | Excel Worksheet Functions | |||
Importing .txt data files increases .xls file size | Excel Discussion (Misc queries) | |||
Weekly Transaction Processing | Excel Worksheet Functions |