Spreadsheet design - excel

I'm designing a file which will calculate a set of certain numbers for each account. Each account has at the moment 5,000 buckets (rows) and 20 selectable criteria (columns). I the future both will grow. I have now 70 accounts, hence use 70 sheets with identical calculation, but the number of accounts will also increase in the future.
Now, this design is terrible, i had to go and change the formula in all 70 sheets. Is there another way of designing the workbook? The rows and columns headings will always be identical for all accounts, but the number of rows and columns may change as well as the number of accounts. I researched the topic and there are lots of guidelines as to how not to design. Well I need a recipe of how to do it. Can someone please advise? PS I can do basic/mid level vba.

Initially, I would recommend writing a macro that would produce the current "template" (ie, column headers and formulas), and running that on any new sheet for new account creation. Then, when the data model changes and you need to change columns/formulas, you can change the template creation macro to match the new model and do a quick:
For Each sht in ThisWorkbook.Worksheets
CreateTemplate(sht)
Next
to change all the existing sheets.
If you structure the sheets so that doing that doesn't mess with your source data, you can keep them all tidy without a lot of work.

Related

Transferring data from one excel sheet to another

I will preface this by saying I have not much experience with excel.
I'm looking to see if there is a way to input data into one sheet and simultaneously transfer the data to different cells in another. The sheets are not formatted the same. The sheets are used for tracking shipment data. Sheet 1 is for a shipping manifest of contents and the second is used as a master tracker to tell what items were shipped when, quantities, truck #, location # etc.
Is this possible given they're of different formatting?

Recording data from one excel sheet to another automatically, but keeping even if deleted from master sheet

I have an excel spreadsheet I use to keep track of candidates I'm hiring at work.
This spreadsheet is becoming very large so what I want to do is have 2 sheets:
1) current candidates (candidates who are currently in the process)
2) historic candidates (candidates who are currently in the process and candidates who have previously been in the process).
I could manually add to both sheets, but what I'd like to do is manually update only the current candidates sheet, have the historic candidates sheet automatically update with that data, but when I delete data from the current candidates sheet I want it to remain in the historic candidates sheet.
It's the retaining data in historic candidates I'm having most difficulty in finding a solution to.
You're going to need a macro to do this. It's the only realistic method to actually copy data between different locations, rather than just linking the values.
The good news is that a macro that does this automatically as you enter data in the "Current" sheet would not be difficult to create, and there are many free guides available to walk you through the process.
If you don't want to go the macro route, the alternative would be to work backwards - put all of the data into a single sheet (the "Historical Candidates" sheet), with a flag you can change to mark whether they're a current candidate or not, then use any of the various tools available to filter data to pull a list of current candidates over to another sheet.

Restrict sorting to defined range for Excel

I need to distribute about 100 spreadsheets to different users, and get their feedback on each row.
I have say 120 columns by 2,000 rows, and that's 240,000 cells.
I want to lock down these 240,000 cells, so any sorting on the sheet does not happen unless the sorting is applied to the full 240,000 cells.... this is to prevent unexperienced users from selecting only a few columns or a few cells and apply the sorting, and corrupt the data. Anyone with best practice on this? I am afraid I will get fired if I do not find a solution... thanks to you all, gurus.
Embed a pivot table and use some slicers to automate the sorting. Link to the data on another sheet and then hide that sheet so the actual data cannot be directly accessed. If you have SharePoint, publish the workbook and just enable the one sheet with your "UI" on it by way of Browser Options in the backstage.

VBA to update multiple sheets from main spreadsheet based on department name

I have a spreadsheet that is used to track audit scores for 9 different departments in a plant. The 9 departments are broken down to 117 different area locations. Once a month I add a new column and update the scores. What I would like is a seperate sheet for each department with the audit scores updating automatically when I import the original data in. I'm new to VBA programming and this may be over my head a little bit, is there a way to do this?
Why not using a pivot table in each tab ?
You'll only have to use the "actualize" command once ( Data-->Refresh all) whenever you're adding a column.
The thing you have ot be careful with is to set-up you master table as a list (Home tab-->Format as a table command ) or else the pivot table will not take account of an added new column.
Without seeing the actual data and the format the it is currently in...
Assuming that you make a separate sheet for each department each with a row corresponding to its respective area...
I would utilize a class to hook the application's events and update each sheet on the Worksheet_Change event. Chip Pearson provides an excellent example of this concept here and I'm sure that a cursory search of SO will turn up quite a few examples as well.
From that point it is a matter of identifying the imported data and it's corresponding location in the workbook.
If you have an example I would be happy to look at it...

Create new sheets based on roster and auto calculate completes

Okay, Im setting up a spreadsheet that will track employee progress. Im new to vba and macro programming in excel but am not foreign to programing in general. Any assistance would be greatly appreciated. What I want to do is as follows.
Start off with 3 sheets (roster, log, Total) The log sheet will have all the tracking metrics of each employee.Total will Total each employees log sheet together and roster will be a dynamic employee list. As a new entry is created in roster then I want to copy the log sheet and rename it by the name put into roster and add the new (named) sheet into the Totals calculations.
For arguments sake just say that each log sheet only has a numerical value in a1 and total is just tallying all log sheets a1 fields. Roster contains just a first name in column A and no other data. (Given direction I should be able to expand the concept to a more intricate set of sheets.
Additionally it would be interesting to be able to remove a name from roster and have the said log sheet be deleted and removed from the totals formula... :D
Again Thanks for any assistance.
I have seen people try to make excel work like a database and it is ultimately doomed to failure. As this is a green field project I would start it right and use some sort of database. The choice is yours depending on your skillset, hardware available and what it will be used for. A good starting point would be good old MS Access, it is quick to learn and in the right hands very powerful. If it is going to be higher use then maybe look to a server based data store such as SQL server and write the front end in anything you want (Access, vb.net, asp.net etc)
The point here is choosing the right tool for the right job, spreadsheets have their place but databases they are not

Resources