I hope this is clear enough - please comment if additional information is required.
I have been asked to design an Excel / VBA tool which will display information on to a Summary worksheet based on user preferences. The home screen will ideally contain a top section having a number of checkboxes and dropdowns allowing the user to choose what information they would like to see: Finance, Activity & Customer Info. If the user selects Finance & Activity, this information will appear in 2 tables beneath.
The user will also see subsections i.e. Finance will include Balance & Arrears and like the above, the user can choose 1 or many of these to view information.
The dilemma I'm having is that the information is spread across different workbooks and I'm finding it difficult to find a quick and efficient method to extract data and output it to my worksheet. At the moment, I'm manually completing the process by conducting VLookups (each has a unique key) to create a Master spreadsheet and using pivots to display the information. This is too time consuming and isn't very visually appealling.
I'd like to use VBA to automate this process and have instant access to the information in the master spreadsheet based on user preferences.
It's also worth noting that this will be shared with users completely unfamiliar with Excel so I'm trying to veer away from the Drag & Drop Pivot Table approach.
If anyone has any suggestions on how I could create this system, you would be adding years on to my life.
Well, this is an extensive VBA macro that you need. I will give you some guidance on how you can start coding it.
The main idea here is to copy all data from other Workbooks and paste them in different sheets of the Workbook you are using to visualize the data and then hide these sheets. In this way, you can interact with all the data using only one Workbook.
So how do you do this? I recomend the following link:
https://www.excelcampus.com/vba/copy-paste-another-workbook/
To hide sheets use Sheets("sheet name").visible = false
To unhide sheets use Sheets("sheet name").visible = true
For the purpose of maintaining data updated, one way could be setting the macro to run when opening the file.
Check this link: https://support.microsoft.com/en-us/office/automatically-run-a-macro-when-opening-a-workbook-1e55959b-e077-4c88-a696-c3017600db44
Or you could just have a button to update.
Note: I've coded some VBA macros on Stackoverflow to move data between Workbooks that could maybe help. You can find them in the answers section of my profile.
Related
I've searched all over but have yet to find someone who has been able to asnwer this.
I'm in the process of trying to create a macro to streamline requesting days off, so to help modernize the payroll sheet while still allowing it to be compatible with the legacy system.
I want to have this sheet be the input:
And then the macro (activated from a button click)
would copy that data, find the associated employee, then paste to fit with the legacy system as shown below:
So the macro would match the respective employee of each entry, and paste the respective entry to the next entry in the log of the employee. Any idea of how to go about this?
I am completely lost and not sure where to start.
Maybe you could show your code and ask a concrete question about it? Because there's no problem in VBA to copy-paste any Range of Cells (or it's values, or it's formats etc.) with any logical conditions you need. MSDN has a clear example: https://learn.microsoft.com/ru-ru/office/vba/api/excel.range.copy
I am new to this stackoverflow and i can say that its a very interesting and resourceful website.
I need to share a workbook on a network and as you already know the workbook must not contain any table or XML maps but i prefer to use a table because it is an expandable range. Information are extracted from this table via formulas.
Is there any work around possible to share the workbook with the table included?
I do not want to use formula for an expandable range in order to maximize the efficiency of the workbook because there are already lots of formula in the workbook.
Besides what is the maximum number of users that can access the workbook at the same time, with each user having access to only one worksheet
Thanking you in advance for your precious help.
Best Regards
Jack
Here has:
Note first and last entries in the image.
And that it was the first hit to the Google query Excel 2010 spec
so please see also the first bullet point here.
I have an Excel sheet which is used for bug-tracking. Each client has their own .xlsx and each application for that client has its own sheet within the .xlsx. So multiple Excel files with multiple sheets, all in the same format.
All sheets have the same headings and some columns have data validation and conditional formatting. Occasionally, however, the layout/headings or values allowed in data-validated cells, etc. must change and I have to go through each sheet and manually make the changes.
Is it possible to have a master sheet from which other sheets will inherit headings and heading styles with all cells under particular headings having data validation and conditional formatting?
(Before this is suggested, I used to simply put everything in one sheet and use filters to show a particular client/application, but this became impractical when sharing and versioning the sheets with multiple people)
The term you are looking for is a template. You create the template and give that to your 'clients' to track bugs. If you make an update to the template and give it to the client, they can just copy/paste data into the new form.
In my opinion, you're going about this the wrong way. Excel is a spreadsheet programme, while it CAN be used as a 'list' of sorts, it is a poor choice for bug tracking. If you're stuck on Office applications, use an Access database or something that can actually give you a 'front end display' separate from the 'back end data'. There are many free bug tracking software programmes on the internet. Set one of them up and just have your clients log a bug there.
Using a template and then getting the clients to copy+paste the old data is one way, but its not exactly the safest method.
If you did want to distribute a new template to your users it would be a good idea to add some import functionality. So VBA handles copying the old data across.
If you (personally) could do the changes to the template manually, then you might also be able to create a workbook+macros to "patch" the source (or a copy of the source) data in-place.
With either approach you'd probably need to add something to the source workbook to keep track of what version they have and make sure they they import from and to the correct version to prevent unhappiness in the future.
Could you show an example of a change? before and after etc
Currently we have a Excel VBA application, which consists of 25-30 Excel sheet (and all of those sheets all hidden and we do background processing on them and display it to VBA forms UI), and we have developed a UI using VB forms. But problem we are facing is whenever we click on Save button using this code:
ThisWorkbook.Save
But this saves entire workbook not an individual sheet, so even if we make changes in single sheet it saves entire workbook and this save processing makes very slow (since it needs to save all excel sheet containing lot of data unnecessary, even if there is no changes).
My question is is there any way we can save "only one sheet in a particular excel sheet" not an entire excel file?
Note: I am a Java developer and I worked on VBA before, But it was years back, and I have forgotten bit. Any guidance would be appreciated. Or any pointers on how to handle this situation would be appreciated. Please let me know if you need any more information, I can edit this question.
What I have tried already? I did a lot of research from yesterday, I searched in previous questions on SO, but didn't get any useful information. As per my research it says we cannot do this. Am I on right path?
The short answer is no. You cannot save a single worksheet at a time.
You may want to try to reduce the amount of data in the workbook. Try storing data in several workbooks and when it is needed, open that specific workbook, make the needed changes, and then close it.
If it is necessary to have access to all data at once then consider using access or some other database.
It is also possible that the sheets have "blank data". Cells that don't contain anything in them but excel thinks they do so when saving it tries to save way more than needed.
Assuming that it is the active worksheet that you want to save then you could do something like this:
ActiveSheet.Copy
ActiveWorkbook.Close True, "path"
This copies the active worksheet which creates a new workbook which will become the active workbook. Then just call the close method on that and give it a file name.
I think you should consider splitting your application into multiple workbooks:
The workbook that contains all the logic, user forms and programming code. This workbook handles all other workbooks as well as the displaying of it. Potentially, this could be even an "Application Specific Addin", that stays dormant but activates as soon as any of it's subsequent workbooks gets opened. For this architecture approach check out the section on "Application Specific Addins" in this link.
This workobook/add-in can also hide the other workbooks, so that the user will not notice it's multiple workbooks.
One or multiple data workbooks: Depending how interlinked the data is, you can separate this, e.g. in a "Sales data" workbook which contains the large database, as "Base data" workbook, that contains all the smaller data (e.g. products or stores tables).
This way, you can reduce the saving to the "relevant" sheets. However, of course this requires quite a bit of reprogramming - but it's worth the effort, as for instance it also allows to provide updates/bug fixes without having the transfer the data between versions, as you only need to distribute the the file with programming logic. :-)
I have a macro that stops users from deleting rows and columns and i need to apply to between 100 and 200 excel workbooks. These sheets will be accessed daily by a large number of users in 2 different offices from a shared drive. Is there a fast way to apply the effects of this macro to all of these books at once?
Yes it's possible to add code or a module to a workbook programmatically. This article can help you get started. Let me know if you need more help. http://vbadud.blogspot.com/2008/10/programmatically-add-macro-to-excel.html. Also, you'll need to make sure your macro security settings trust access to VB project. This article explains how to do that: http://support.microsoft.com/kb/282830