It now seems necessary to take my 50MB workbook and split it into 3 separate workbooks. Ultimately, when this program is moved to different computers, these 3 files will need to be moved together in order to function (of course). Is there a way for all of the links and conditional formatting to remain absolute? That is, all the files will be in the same folder, so a path would not be needed or wanted, just the workbook name and the sheet/cell reference.
If this is not possible or practical, am I missing something? Is there another way to do what I want to do, which is allow a very large spreadsheet to run on less powerful machines?
As long as the files are in the same relative locations, the links should update automatically. As far as I know, for the files in the same folder, it's not an issue at all. The same with going down the folder path. Problems might start when going the other way, so I'd keep them in the same folder.
Conditional formatting might be an issue though, but you could try linking just the conditions to the workbook you're trying to format.
To speed up the spreadsheet you can try manual calculations. I don't know how your spreadsheet looks like or how slow are the machines you're talking about, but that helps in most cases
P.S. Sorry for an answer when it should really be a comment, but I don't have enough reputation yet to do so
Related
I'm creating instructions for my collegues to execute data transformations form a table xls. to a file .txt. I'm not so expert... so excuse for my questions that probably are very simple.
I have a BIG problem for me. My collegues have different versions of excel and, for security and privacy boring questions, they must use the macros only in their pc... so I need to understand:
There is a way to insert absolute paths for the VBA references into the project VBA?
There is a way to verify which references are used in my project?
thanks
I have come to a problem that I had kind of sorted, but it came back to haunt me.
I have a set of Excel files with information (origin) that feed an aggregator/wrangler/chewer in Excel (workbook) and then I have a set of files, one for each subsidiary (output), that have the same structure (sheets, hyperlinks, headers) but only get the relevant info for that subsidiary.
Right now I have everything automated, I download, prepare the information and update the origin files, then the only thing I need to do is open and save all the other documents (aggregator/subsidiary exports) and I do it with VBA.
In order to distribute the subsidiary files I have to come up with something that can have the same structure as an Excel workbook, but doesn't have the links to the aggregator, or the subsidiaries won't be able to see the information as there will be #REF errors everywhere (even on some sheets headers).
The solution that I put in place was exporting the files as MHTML (Single File Web Page), as it managed to keep the sheets and hyperlinks and everything as intended, while only needing to "open [subsidiary file].xlsx & save as [subsidiary file].mht", but then I came to learn that it is only possible to open this file type in IE, which not everyone has access to.
Then my problem is that I need an alternative to this solution while using only "plain" solutions as the IT department won't allow me to use anything more than standard administrative tools (standard MS Office suite).
I tried to replicate the subsidiary files by copying and pasting every sheet, but then I cannot come up with a way to keep every formatting (mainly header width) as intended when pasting as "values", or as "values and source formatting", and this approach doesn't escalate well.
Do you know of a way of saving the file as is but without the formulas, or preventing them from updating when the file reopens (even if you say no to "update links" prompt sometimes some cells ate updated, don't know why), or some different approach?
The idea is to generate a file that no matter who the user is, and does, is able to see the information, and cannot screw the file/info in it, and if possible keeping it "easy" to update with a "simple" macro.
Kind regards,
Flávio
I could not find an answer to this, neither on Stack or on the wild web. I have a sheet where I need users to be able to use Text to Columns, however, I also need to protect the sheet. Everything works fine if Excel automatically does this (from Text to Column "short-term memory"), but I cannot access the option when protection is enabled.
It is not that any text is spilling onto locked cells, it's just that the option is greyed out after protecting the sheet. I would appreciate a non-VBA answer as I do not want to use macros on a shared file (the server is extremely slow and even normal excels take ages to save). However, if absolutely necessary, can you ninjas please tell me how I can set it up so that this problem is solved with the least possible performance hit?
P.S.: I am pretty new to VBA (practically uninitiated, I prefer R for everything). Also, the shared server is basically a network folder, so it is not likely that it will cause any issues other than being super-sloth.
If you protect a sheet, then only unlocked cells can be edited, that is, users can change the cell manually.
That is the core and purpose of sheet protection.
In a protected sheet you will not be able to perform a text to columns manually.
Whether or not the file lives on a server is totally unrelated to using VBA for a solution.
The real question is: What are you trying to achieve? Your question is about running Text to Columns on a protected sheet, but if you step back from that particular approach, there may be other ways to achieve what you really need to do.
I have a 60mb excel file that has all of the "sins"... Array formulas, VBA and conditional formats. It crashes all the time and it's now being suggested that it's too big. There are about 20 worksheets and 3 of them are 15mb in size and each have about 35,000,000 active cells. Is this why the sheet crashes?
Yea I have this problem also.
This is a compilation of hat works for me. Some of this may be relevant, some may not.
Turn off automatic calculation. If you are desperate about this, then turn it off while doing the rest of the list but turn on afterwards
Make a backup. Everytime something on this list works, make a new backup. Excel has no brain, make sure to use your own.
Remove empty-but-not-empty cells... Sometimes, for a number of reasons, excel finds it necessary to keep track of all possible rows and columns.
I fix this by recreating whatever chart I have made by copying the specific areas that are needed on new sheets and then delete the old one and rename the new one to match. Search/replace will fix formulas afterwards if they get buggered. You can also mark the rows/cols and right-click -> delete rows/cols but that may cause a total freeze so I prefer the former method.
Get rid of the array formulas. Seriously, they can in 90-something % of the time be replaced by a cleverer sumproduct, sumifs or index(match()) formula or by adding columns or doing things in 2 steps. They are resource hogs. Leftovers from a different age. The only time I accept arrays is when I know I have exhausted all possibilities.
Very important, save the files as x64 binary formats for the files (.xlsb). Do not use the "compatibility" format (.xlsx) and for the love of god, do not use regular .xls
Move all graphics to separate sheets, and better yet, separate files. Mirror the result data via vba, copy paste, whatever to separate files and have your conditional formatting, images, graphs, progress bars, gantts, whatever there.
I hope it's not inappropriate to post this.
After some stalling and perhaps some skepticism, I replaced all of the array formulas in my sheet. There were approximately 1,500,000 cells affected by array formulas and I didn't relish the thought of redoing this. BUT WHAT AN UNBELIEVABLE DIFFERENCE! The sheet now runs faster, better and very reliably! I'll never use an array formula again. Thank you!!
Everyone !
it is my first post here and as a novice I hope my question will make sense.
I'm a french intern working for a large firm and was assigned to the making of an "automated report" (I know, another one...).
The situation is pretty messy, each department generate reports for themselves with little to no constraints concerning the name, layout, size and data contained inside. (meaning that from one month to the other, each department may add or suppress an indicator, change the disposition of the data etc.)
I work for the performance and strategical division and need to create a four-table Excel file which would ideally be able to get the relevant data from the different files issued monthly. I cannot change the way files are updated on the intranet and my boss is clearly illiterate when it comes to computing.
Is it even possible for me (I do not know how to use VBA yet but I am a fast learner) to do this, while being transparent to her (zero or really easy manipulations), and adapting to the changing data-files format ?
Thank you in advance for any answer and sorry if i am not explaining myself properly.
I wish you all a great day !
Jules
In which formats would all the arbitrary files be?
In VBA you can open quite many file types and read the data if you just know the format and how data is organized.
If those files are in Excel files too, you can use Workbook.Open;
Dim wbReport As Workbook
Set wbReport = Workbooks.Open("ArbitraryDirectory\\ArbitraryfileName.xlsx")
Then use that workbook just like your main workbook;
OneOfYourFourTables.Cells([Row], [Column]) = _
wbReport.Sheets("TheArbitrarySheet").Cells([Row], [Column])
Or use Range objects and/or Copy methods. (I generally like to loop around the Cells()).