Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Reduce File Size By Use Of Macros

I still cant figure out how to write macros. If someone could help me out with this I would appreciate it.

Currently I have a worksheet that is 20mb.

This file contains what takes up most of the space. I repeat this line many times throughout the worksheet.

Once again it is a zero eliminating code.

If someone could reduce the number of formulas for me, I think I could figure out how to adapt it to repeat throughout the sheet.

View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Reduce File Size :; 50 MB
I have xls file size 50MB

I want to reduce size kindly give me some tips to reduce size.

View Replies!   View Related
File Size - Reduce
I currently have an excel file with lots of formulas on quite a few pages and these are carried down for so many records - its sort of a template to generate information from/to certain sheets for many other purposes.

- is there any way to compress the file (without actually zipping it) as it must remain a working document?

View Replies!   View Related
Reduce File Size
My excel file has grown to 23Mb. It has around 10 worksheets and a similar number of userforms. Because the file is large, it slows down the VBA code when it encounters a save command. Is there any way I can improve this? Do userforms use alot of memory or is it the length of code? There are a few images on the userforms but the images are less than 1 Mb in total when all added together.

View Replies!   View Related
Reduce File Size :: Without Zip Function
Is there a way to reduce the Excel file size considerably? This excel file is huge with many sheets. I do not like to use Zip function.

View Replies!   View Related
Reduce File Size Using Macro To Perform 500,000 Calculations
I have this formula that checks a line of values to see whether it is within the constraints of a separate list of values.


View Replies!   View Related
Workbook Containing Macro To Reduce File Size Locks Up When Shared
I've been having trouble recently with my workbook file size growing rapidly due to copy and paste commands and such. I found a very nice macro to reduce file size called ExcelDiet located at [url]
Option Explicit

Sub ExcelDiet()

Dim j As Long
Dim k As Long
Dim LastRow As Long
Dim LastCol As Long
Dim ColFormula As Range
Dim RowFormula As Range
Dim ColValue As Range
Dim RowValue As Range
Dim Shp As Shape
Dim ws As Worksheet

Application. ScreenUpdating = False
Application.DisplayAlerts = False

On Error Resume Next

This code works fine until I share the workbook. Can anyone take a look at this code and provide some information as to why this might be happening?

View Replies!   View Related
How To Reduce Formula Size/improve Efficiency
how to reduce formula size/improve excel efficiency?

I have a really complicated formula with lots of COUNTAs, VLOOKUPs, IFs, etc etc etc which returns a variety of values, ZEROs (for blank cells being referenced), and #NAs.

I would like to turn all ZEROs and #NAs into ""s without repeating this super long formula over and over.

I am curently using:


View Replies!   View Related
Will VBA In Place Of A Function Reduce This Workbook Size
I know that VBA doesn't always slim down workbook size and calculations are calculations whether in VBA or Formula format; but in this instance, do you think VBA would be a better choice? This workbook is currently enormous in size and slow, and I think I can slim it down if I used the right VBA procedures. However, Im not certain what those procedures would be.

On two seperate worksheets in a workbook, I have a column that contains a formula that references a third sheet.

Sheet 1 = "Order"
Sheet 2 = "Turn-in"
Sheet 3 = "Bank"

Ok, here's the scenario: On the "Order" sheet, I have a list of orders from my company; on the "turn-In" sheet, a list of turn-ins. The "Bank" sheet lists ALL transactions (ORDER AND TURN-IN).

On both the turn-in and Order sheets, the formula is pretty much the same; it references a different column on the bank sheet, but does it the exact same way. Ok... The Order sheet lists all order from the company by order number (column A); the formula uses that order number and finds the transaction on the "Bank" sheet and returns the order cost as the result. however, the order numbers on the bank sheet have a 5 digit prefix on them (the prefix is the same on all orders, its used by the bank but only orders with my 5 digit prefix are on the list sent to me and pasted to this sheet. So all orders on bank sheet have the same prefix)

The below formula is in Cell C10 on "Order" Sheet; Column C lists the Cost reported by the bank. The formula below references the Bank sheet database, looks for an order number that matches the order number in A10 (Adding the prefix of course), and returns a cooresponding cost for that transaction.


I know this seems long for what it is, but it has to add the prefix, and then match the order number, and reference the cooresponding cost.

The kicker, this forumla is in more than 10,000 cells; 6,000 on the order sheet, and 5,000 on the turn-in sheet. Of course the references are a little different, but the principle is the same for all of them.

Is there a way to do this in VBA to save space and resources? This formula is really dragging.

View Replies!   View Related
File Size... Vlookups Resulting In 90MB File
I have created a monster Excel file that contains loads of vlookups and is 95MB and extremely slow.

I guess that vlookup creates tables in the background, hence the file size. Does anyone have any ideas on how to decrease the file size while keep the vlookup functionality?

View Replies!   View Related
Fatal Error: Allowed Memory Size Of 33554432 Bytes Exhausted, Saving Without Macros 2007
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/eforum/public_html/search.php on line 1155. I have following macro, what worked just fine in 2003. Now I'm working with 2007 and I can't set up the Microsoft Visual Basic for Applications Extensibility library. Here's the

View Replies!   View Related
File Size Too Big?
I have a workbook which has a file size much bigger than I would expect. To test it I inserted one blank worksheet and deleted everything else. I have removed a macro that was embedded in the workbook. I have removed all protection etc. I would now expect the file to be similar to a new workbook (circa 13k) but it is still 782kb even though there is absolutely nothing in it.

View Replies!   View Related
File Size Reduction
I am working on a spreadsheet that pulls data from an external pivot table.

The spreadsheet is 25 columns wide by 72 rows. I have 15 worksheets currently but need to add another 7. The current file size is 22MB and I keep getting a NO MEMORY error message.

I am not using any fancy formulae just references to an external pivot table.

View Replies!   View Related
Does A File With VBA Grow In Size
I created a new form for our field personnel to complete daily. They are telling me that over a few weeks the file grows in size. The file size is 335KB starting out end up in a few weeks being 3.5megs. Now they add on some other sheets and things which undoubatbly make the file size larger but I am wondering if there is anyway thet VBA could somehow make the file bigger as the open it each day over a few weeks? They are not adding in any VBA, they are only using the code which is provided, which is accounted for in the 335kb. It seems unlikely but i thought i would ask.

View Replies!   View Related
File With The Size 20MB
I created a new excel file with filtering and after i saved the file , i found that the size for this excel file is 19 MB, so is this normal size for an excel file or there is a problem in this file and i have to fix it

View Replies!   View Related
File Size/Formulas
I have a workbook that permits the user to enter data in no sense of order. From the original I am working for, there could be over 1500 rows of data. I then created a new worksheet to accept the unordered data to be sorted by a customer and date. I then created 20+ new worksheets within the same workbook, that will accept via an IF statement, the data for each customer. The problem as I see it is as the formula runs, I need to delete the blank rows on each of the 20+ worksheets. This is fine and the customer is happy with the set up. My problem is the file size. With just the formulas/worksheets, it is over 62 MG.

Is there a different formula/function I can use that won't require so much space?

View Replies!   View Related
Minimize Size Of File
My file is currently about 70,000 mb,consisting of 10 spreadsheets.

Can i decrease the size by combining the spreadsheets?

Also, will nested formula take longer to load compare to 3 different cells referencing upon each other?

list that tells us how much each and different formula affects the size of the file?

View Replies!   View Related
Reducing File Size
I don;t know if there is a way around this but we have a Excel workbook that holds around 14 worksheets taht is getting too large. It currently is around 2.5mb and we constantly use it as a template which is completed and emailed. Sometimes we have to email 4 of these all together and so teh email is too large, even zipping them has next to no effect on the size. The sheet that seems to causing the problem is one that has around 500 lines of formula across 20 columns. Most of these fields have conditional formatting and its this taht is boosting the size.

View Replies!   View Related
Insert Picture From File Increases File Size More Than The Picture You Inserting
I am putting together a price list in excel and using images and hyperlinks to jazz it up a bit - what I am finding is that if I insert a 25KB GIF image, the excel file grows in size by over 100KB

why is this disproportionate growth happening and is there a way around it - I dont want my Price List growing too large but need the images....?

View Replies!   View Related
Keeping File Size Down (2003)
I am about to undertake a fairly large spreadsheet development project. One of the key requirements is that the size of the spreadsheet be kept to below 4mb, preferrably below 1mb. This is due to an unavoidable restriction.

Although the spreadsheet will not have large volumes of data, it will contain approximately 30 sheets. There are no graphics embedded in the sheet. I imagine there will be a reasonable amount of VBA and/or forumulas in the sheet. Each sheet will basically be a data-entry form with a number of formulas. No sheet will have more than 100 rows.

Without knowing the full details of the spreadsheet, it is difficult for you to give a definite answer as to the size of the sheet, so I am simply looking for some helpful tips in keeping the size down.

Do formulas take up more space than VBA code? When I format cells, should I format the entire row, or just the range? Do features like sheet and cell protection take up a lot of space?

View Replies!   View Related
Workbook Growing In File Size
I have a workbook that I am working on that seems to be having file size growth issues.

All it is is 2 worksheets.

Worksheet 1- Columns A-S & 63 rows. That worksheet alone is 7mb.

no macros..No VBA..No formulas. Just straight text data with a handfull of auto-filters. I took the auto filters off and saved to see if that was the issue and it did not make a difference.

Worksheet 2- Columns A-S & 35 rows. This worksheet is almost 3mb.

Now I can make a change (when my computer catches up) to 2 cells and sometimes it will jump in size by 1mb or more.

View Replies!   View Related
Beating Down File Size With A Big Stick
I've got a spreadsheet which currently 7.06MB!

The bulk of the file (6MB+) is in one sheet which is a data store.

All headings are on row 1 and are duplicated across 4 times for ease of reading.

Columns A-D have the main data and comprise a total of 39751 lines and a lot of duplication (basically it is 30 items for 25 clients (identical setups) for 53 weeks.

Columns E-H is an average for 4 or 5 weeks (depending on the period) for each items for each client and takes up 9001 rows.

Columns I-L have the quarterly averages (i.e. average of 3 periods) and takes up 3001 rows.

Columns N-P have the data which is displayed on other sheets and takes up 750 rows.

Now, on columns B,F,J and N I have the name of the client in row 2 (for example) and then the formula "=A2" in row 3 and down. This is repeated for each client (29 formulas each).

Is there any way I can batter the size of this sheet down?

View Replies!   View Related
File (with Macro) Keeps Growing In Size?
I have a workbook that grows in size on every use. I import a text file, manipulate the data, manually export it and delete the data from the workbook.
So why does it continue to grow in size? By manipulating I mean, add rows and text to the new rows. Attached is a copy of the workbook in native form (have not ran the macro) and a sample file to import, the excel file is 59kb in size and the test file is 9kb in size. I have seen my original file grow to over 500kb from repeating the same macro on the same file many times or running many different files for testing.

There is a CommandButton on Sheet1, it will open a userform. Click in the largest textbox and it will open a file dialog box in "C:". Place the supplied text file in "C:" or some other folder of your choice as you can navigate to any folder or drive from the dialog box. The macros that add lines and or text are "JumpToLabelName" (this runs first) and "InsertRows" which runs second. These two macros do all the work.

Take note:
I store information in the Registry, "GeoMeasure" under "VB and VBA Program Settings" (Normal windows key entry). You can search for "GeoMeasure" and delete it if you decide to test run the file.

View Replies!   View Related
File Size Made Smaller
Is there a way of eliminating un-used rows & columns to bring your file size down.

I already know about eliminating unnecessary pages, and I've cleaned up defunct modules, etc., and anything else that's just clutter.

The Row & Column thing would be a big help.

View Replies!   View Related
File Has Grown In Size Exponentially
I have a spread sheet with a macro attached to it, approximately 500 lines of code and 3 sheets approximately 30 rows by 30 columns. it recently shot up from 130 KB to 15,000KB. Do I need to rebuild this thing from scratch or is there a way of finding where the fat is? I have tried clearing all columns beyond my active table area and all rows below my active area.

View Replies!   View Related
Minimize Macro File Size
I have an excel file that is about 1,400 kB in size. This file is the backend for a complex model with many inputs, and I now want to build a front end for it using userforms and VBA. However, when i created the first userform, my excel filesize blew out to about 7,000 kB. When I added all of my userforms (about 16 of them because there are lots of inputs, organised into categories), the filesize grew to 77,000 kB.

I have tried everything to reduce file size, including clearing all unused cells, avoiding pivot tables of any sort, and have also exported then re-imported all of my VBA modules and userforms. But the situtation stays the same: no userforms or VBA and my filesize is about 1,400kB, add in all the userforms, and filesize is 77,000 kB. Is there a way to keep file size down with userforms, or is that just the way it is? Is the only way to keep file size down to have a single userform, all questions on that one form, perhaps with visible and invisible controls depending on the 'page' of questions being viewed?

View Replies!   View Related
Saved File Size Not Reduced To Original
I have an Excell 2003 workbook with 6 worksheets and some VBA programmed macros in it.

With a small amount of data the .xls file size is 150k. Then I tested it with a much larger sample of data, which goes into one of the worksheets, resulting size 3MB. Later on I reverted to reading in the original small amount of data but the file size stubbornly sticks to 400k instead of reverting to 150k.

The old data is definitely not there anymore - I used this code to clear it:

View Replies!   View Related
With Sheet Background, File Size Is Huge
Is there anyway to put a background on a worksheet, without the file size of the workbook becoming monstrously huge? I have a small jpg file of our company logo, and I think that it would be a nice touch for it to be the background to our spreadsheet. But when I use this 50k file as the background, the workbook suddenly grows to a size of 7MB.

View Replies!   View Related
'Background' Insertion File Size/limiting?
I'd like to insert a picture background for multiple s/ sheets I've developed, however, even though the images I'm using are only 30kb's in size, it bumps my s/sheet file size from 900kb's to over 4mb's ! Is there a way I can stop this from happening, or, any way to restrict the background image to only a certain part of the worksheet as opposed to the entire thing?

View Replies!   View Related
Drop-down Boxes Make File Size Too Large
I'm using Excel 2007. I have a cell with a dropdown box that has the values 1 thru 10. When I save the file (as an Excel 97-2003 compatible .xls file), it's 17kb which is normal. I want multiple dropdown boxes going down the same column, so that every time the user goes to the next row, another dropdown box will be displayed. I copied the cell with the dropdown box, selected the entire column, and pasted the dropdown box.

This time when I save the document, it's over 2MB in file size. I've seen other spreadsheets with several columns of dropdown boxes spanning thousands of rows and they stay under 30kb. I don't know what they did differently to keep their file size small. Why is my file size so large and how do I fix this? Do I need to use a 'paste special' function?

View Replies!   View Related
Multiple Formulas Causing File Size Increase
I am working with 4 seperate workbooks where 4 different people enter data into cells. I have a 5th workbook that needs to have all the data from the 4 individual workbooks bought across so I can see all data. Like a master file. basically, in each cell of the master, I have the following code. =IF('[loans - 0708 - officer 01.xls]07-08'!B5="","",'[loans - 0708 - officer 01.xls]07-08'!B5)

I then have the code for each officer. As there are 24000 lines collectively for the financial year, the size of my master is 37mb, even when its empty, obviously cause each cell still have a formular in it. Is there ANY way to copy across the data from other workbooks without having to have every single correpsonding cell have this kind of formular to view the code? Also, copy it without having to open the other workbooks.

View Replies!   View Related
Get File Size (as KB Or MB) For Specified File
I am after some vba to return the file size in KB or MB for a specific file. eg "C:myfile.txt" = 0.18MB

View Replies!   View Related
Keeping Macros With File.
When I copy/paste an Excel 2003 file containing macros into an email and send and open into another computer, the macros are gone. How can I ensure the macros go with the file?

View Replies!   View Related
E-mailing A File In Macros
I have a couple of spreadsheets that I have to mail out monthly to the same recipients and I have figured out how to do that in the macro. However, an Outlook alert pops up warning me that an outside program is attempting to send a message and I have to approve the sending of it. I have tried using the Application.DisplayAlerts = False statement, but that apparently only suppresses the displaying of warnings and alerts in Excel, not the entire Office suite. Is there any way I can make this message go away and just send the e-mails w/o intervention?

Second, I have another spreadsheet which imports data from our UNIX system that I run twice a week. It analyzes, massages and reformats the data, then saves it to a text file, which then gets sent to the same recipients every time. Is there a way to send the text file as an attachment automatically through a VBA macro in Excel? If so, how? So far, I have been able to find help on how to send the entire workbook or a sheet within the workbook, but not a file other than the workbook.

View Replies!   View Related
Temp File Not Saving Macros
The form is completed by the project leader, then they hit a Command Button and it's sent to the Senior Manager. After the Senior Manager looks at it and approves it, he then sends it on to Admin (me!) so the project can get set up on all of our systems.
We recently upgraded to Office 2007 (yes, we are a bit late!) and now the Macro that sends the form to Admin no longer works. An example of the error is as follows:
Cannot run the Macro "FY06-10 PROJECTS 19-Jan-10 08-32'EmailtoAdmin.EmailtoAdmin'. The macro may not be available in this workbook or all Macros may be disabled.

Here is the code that I use to send it to the Senior Manager:
Sub MailtoSM()
Dim FileExtStr As String
Dim FileFormatNum As Long
Dim Sourcewb As Workbook
Dim Destwb As Workbook
Dim TempFilePath As String
Dim TempFileName As String
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set Sourcewb = ActiveWorkbook
Set Destwb = ActiveWorkbook

With Destwb
If Val(Application.Version) < 12 Then

FileExtStr = ".xls": FileFormatNum = -4143

View Replies!   View Related
Macros - Changin File Name Results In Bug.
I have a couple of basic macros that edit formatting in a sheet that I want to send out to various people. The problem is, when I change the file name of the worksheet - the marcos stop working as they refer to the actual original file name.

Could someone please advise if (I am sure it must be somehow) it is possible to emmend the Macros in some way so that they continue to work regardlesss of what the end user decides to name the worksheet.

View Replies!   View Related
Moving 2003 File With Macros
I've created a spreadsheet that I need to share. I've created a custom menu with macros. When I copy the spreadsheet, the macros refer to the original file with an absolute path. Is it possible to copy the spreadsheet to another location and have the macros use that path?

View Replies!   View Related
Delete Any Macros Which Exist In File With Vba
Is there anyway in which I can open a spreadsheet and then delete any macros which exist in that file with VBA?

For Example
Workbooks.Open "\sysdevwebwCorpAcctSuiteReportsNetProfit.xls"
''Delete Any Existing Macros Code''

View Replies!   View Related
Open File From A Macros To Get Some Data From It
1- how can i open an xls file from a macros to get some data from it?

2- how can i set a wait function, till i press a special button before macros will be able to continue.


View Replies!   View Related
Remove Macros To Email File
I would like to email an Excel file without the macros so the end recipients will only see the data and not be confused or excited about the prompt to enable/disable macros.

View Replies!   View Related
Changing The File Paths In Macros
I am running the macro below which changes details in my spreadsheet using details from an external table.

ActiveWindow.SmallScroll Down:=18
ActiveWindow.SmallScroll Down:=18
ActiveWindow.SmallScroll Down:=15

If I want to perform this process without having to change the directory to the t drive etc, how do I change the macro? Is there a way, that as long as each of the relevant sheets are in the same directory, i can point the macro there? Ie, as long as all saved together in My Documents or Desktop, the macro automatically looks there?

View Replies!   View Related
Put Together A Set Of Macros That Perform Certain Operations Within A File
I'm try to put together a set of macros that perform certain operations within a file. However I've got a bit stuck on the following, and I can't see where I've gone wrong:

View Replies!   View Related
Dynamically Changing Csv File Or Macros
I am trying to find a way to dynamicly change CSV files .What I want is to add another column to the table with the values that based on the pre programmed parameters. For example if i have A,B,C,D columns and rows 1,2,3,4,5,6,7 I need macros to add values in column E based on the values of column B(for example)
I want to be able to pre-set those algorithms.For example for value 1033 in column B I need macros to insert value 1.25 in column E in the same row,for value 951 in column B I need 0.3 in column E in the same row. Is it doable just in Excel?

View Replies!   View Related
Save File By Cell Entry And Keep Macros
would like to save a spreadsheet with the contents of a cell as the name. My problem is that I have several macros in the workbook and if I change the name of the file when I save, it won't run the macros when I reopen because the filename has changed. It presents me with an error saying it can't find the macro.

View Replies!   View Related
Security Alert This File Contains Encrypted Macros...
I just loaded Excel 2007, and then opened a workbook I wrote that made pretty extensive use of macros and code. I knew enough to first set up Excel via the "Trust Center" to allow ALL macros to run, against MS's, or more likely against MS's lawyer's, recommendations. btw, does anyone have a clue as to what "Trust access to the VBA project module" is all about? Apparently MS doesn't, for I have searched Help and the KB for it in vain. Anyway, I brought the old xls workbook in, then saved it as a macro-enabled spreadsheet, .xlsm. Then I open it, and uhg, a most distasteful surprise. Even though I specifically went in and set Excel to run all freaking macros, someone at MS has decided I am too stoooopid to make this decision, and all macros have been automatically disabled. OK, so let us click where it says "Options" on this warning bar.

A window pops up telling me that this file contains encrypted macros that have been disabled...". Do a search on that, again, MS, MS kb, even Google, and you are not going to find it (In quotes). There is ONE freaking option with a radio button now, telling me "Help protect me from unknown content" - again, I try a Google search, an MS search and an MS kb search... nothing directly addressing it; but I do the logical intuitive thing - there is a selected radio button there, so click it to unselect it. Click the idiot thing until the cows come home, darn it, it won't do a thing! I even tried an Alt-p as they have the "p" underlined - all that does is select the statement, it remains selected, tap the space bar, hit the space bar, stand on the space bar... First they disable all the macros. OK, I can live with going in and fixing that, but then deciding that I am too dumb to make that choice so don't allow me to turn them on in my own freaking code? Yes, it has been several hours and I am still pissed off beyond belief.

View Replies!   View Related
Open A File Programatically And Disable Macros
When I have a macro open another file, it always activates the macros in it. Is there some way to disable the macros?

View Replies!   View Related
Record/write Macros Independent Of A Specific File
I have recorded (i.e. manually as opposed to writing VBA code) a number of macros to perform a routine, however they do not work when I change the filename.

Could someone please advise on how to edit these macros (which reference a specific filename) so that they work when the file name is changed. The macros copy and paste values from different worksheets and then run another set of macros. However all macros and worksheets are located within one excel file

View Replies!   View Related
Security Warning About Macros When Opening 2003 File
I'm using Excel 2003 and recently when I open a file, it prompts out a Security Warning message about Marcros which at the end contains 3 choices: Disable Macros, Enable Macros, and More Info. I then click Enable Macros to open the file. Once open, I go to Tools > Marco > Run Marco (Alt+F8). A Macro box prompt out but the Macro list is empty. I try different choice inside the pull down menu "Macros in" but the Macro list is still empty.

Where can I find out the macro which triggers the warning message of Security Warning when opening the file? And how can I delete the macro if found useless.

View Replies!   View Related
File Print In Legal Size If I Have 56 Lines Filled In Then Print In Regular Letter Si
I am trying to have a file print in legal size if I have 56 lines filled in
otherwise print in regular letter size. Does anyone know how to write this
in VBA.

View Replies!   View Related
Reduce Length Of List ....
Let's take the following dataset:

View Replies!   View Related
How Do I Reduce Calculation Time
I am a big fan of huge files (30MB+) all interlinked with array formulas ...and lots of them. The problem calculation take literally 5 hours. (I have one file I try to calculate since cca 4 hours's at 63%)

I keep getting extra memory with no visible improvement on the processing time. Is there a trick out there that I can use? Something is clearly wrong.

I feel I will soon have to give up Excel, or my formulas, or my job ...

View Replies!   View Related
Copyright 2005-08, All rights reserved