Redesigning an excel table through functions/makros? - excel

I have to work with a large excel sheet that I get as our accounting program output. My job is to make it presentable for the CEO.
I made macros that get me this far but it's still not in the shape he wants it. As it is a very large table I would be very happy to find a way to automate it because it takes me a long time to make it presentable by hand.
The job has some logic to it so I hope someone has an idea how this could be solved.
What I have got so far:
Picture 1
And this is what I want it to be - separated by company name, and summed by saldo.
Picture 2

Your picture1 table is a good start. From that data source create a PivotTable. Put in rows of PivotTable every column name except SALDO, which you should put in values field. Now select PivotTable=>go to Design tab=>Report Layout=>Show in Tabular Form. After you changed layout to tabular, remove all Subtotals except Company Subtotal. If everything done correctly, you should have something similar to picture below.

Related

Huge excel table - sorting into other excel automaticaly

What i want to do
I'm not too sure how to formulate my question so here it goes.
I am helping with a big 20k+ rows excel spreadsheet, that has data sorted by ID. What I want to do is sort that data by company name and export to another excel file.
What I would like to know is - what are the best methods to do that with least manual job, sounds weird, however I am helping my fathers friend and he does this manually every quarter.
My idea of doing this is by importing that spreadsheet into database and then exporting it as I like, however I feel that there is more simple way of doing that.
I'm not sure if I understand your question: 20,000 rows in really not that much (the maximum is about one million), and as far as sorting is concerned, I've made a small screenshot of how to sort an Excel table, based on company value and ID (sorry for the Dutch language), you might record this and turn it into a VBA macro:
Is this what you are looking for or do you need extra information?

Excel - Create an indented hierarchy list from a source data set

I'm trying to create an indented hierarchy list in Excel from a source data set.
The source data set has 3 levels (department, municipality and city).
I tried many different formula but honestly I cannot find the right system. Actually it's not even a matter of formula, what I'm missing here it's logic, honestly.
It would be easy to do it manually but since I have more 8000 rows it would be also pretty time consuming.
This is the format of the source data:
And this is what I'd like to achieve:
Any suggestion on how to proceed would be very appreciated.
Thanks,
Stefano
Create a pivot table with your categories in the row field and any
of them additionally as a data field.
Change the report layout to Outline form
Copy / Paste Values
I was able to accomplish this with a pivot table...

Calculated Field

I am trying to create a simple pivot table which will tell me how many community residents reported a particular problem, and what percentage of them reported each problem type. I have a data set with name, and then columns for each type of problem. Here's an small sample of the data set:
I have created a pivot table which sums each of these columns and also provides me the total number of people who reported any type of problem at all. Here's what I have:
I want to add a second column to this pivot table that gives the percent of times each problem type was reported. Sounds simple, but because of the structure of the original data set, I can't figure out how to do it. I can set up formulas outside of the Pivot Table which reference the table, but in doing so I forfeit the ability to graph the percentages on a pivot chart. Any ideas how to create a calculated field for this pivot table?
Just to be clear, what I want is something like this, except all contained in the structure of the pivot table:
Edit: I've changed the example of the data set. Here's an explanation of the pivot table. The values under the "# Reporting Issue" column are counts of all the 1's under each corresponding column in the data set. This meant that I had to add each row to the pivot table independently, as you can see here:
I'm open to the idea that I need to change the formatting of the data set, but I'm not sure of the best way to do it. This was set up initially because it allowed for easy compilation into a data table, but Pivot Tables seem to be a different story.
Hopefully this edit clarifies things.
You need to unpivot your data so that you turn it into a Flat File...something that the PivotTable can consume properly.
The easiest way is to use something called PowerQuery, which is baked in to Excel 2016 but available as a free addin from Microsoft for any other versions. Google PowerQuery Unpivot and you will turn up hundreds of tutorials, such as this one from my good pal Chandoo . PowerQuery looks slightly daunting at first to a first time user, but it is freakin easy once you get your head around how to use it. PQ is by far the best addition to Excel in years. PowerPivot being a close second.
If you can't install PowerQuery, then you can use your current data structure to make a 'staging pivot', and then drag the Values label that will appear in the Columns area to the bottom of the ROWS pane, like in this excerpt from a book I'm writing:
Note that my Year categories are equivalent to your Issues categories.
That will emulate the flat file layout you’re after. All you need to do then is turn this intermediate PivotTable back into a normal range, change that Values heading to Issue, and add a Count heading and you’ve got the flat file you need to build a useable PivotTable.
You can also use VBA. Google Unpivot VBA and turn up hundreds of results, including this blazingly fast code I posted some time back. (Look for the code under the —Update 26 November 2013— heading.)
You can also use the DoubleClick extraction trick.

Excel Timesheet Matrix to Listed entries

I'm tying to convert a matrix of data into a list of entries. I have found a few solutions that are close but nothing that I can get working completely. My challenges are I need 4 pieces of information from each row and I want it to be automatic. This Solution was close, but I need something That brings an extra two columns with it.I don't want to have to process the data once it's entered into the Grid.
I created something that works but I feel it's clumsy and there has to be a better way to do it. I have added a Sample Time sheet to my Google drive of what I have created. Essentially I enter the work order, description and pay code on the left. The dates are up top and hours hours worked are entered into the grid. I use a few simple formulas to make a list of every grid cell in the format my finance department needs and then bring it back into the main sheet to sort it. I feel this setup is fragile and it requires manual sort every time info is updated.
Can you help me get from the format on the left to the format on the right with 0 steps. The data arrangement on the left can be modified but the data on the right has to be exactly as show. Mostly I don't know what I'm trying to do is called. It took me longer than I care to admit to find the term "matrix to list." All suggestions are welcome.
Thanks
A Screenshot of the excel sheet for when the google drive link stops working.

Looking for guidance on VB Code for Excel that will create action between two dynamic tables in each sheet.

I am trying to create a spreadsheet that allows me to keep track of a customer with general details (name, phone number, address...) bu then also keep a very specific list of all the products they have ordered. I want to be able to run reports on frequency of all details including what has been ordered. I have a bit of programming experience but not a whole lot of Excel experience so I know how I would write a program but not exactly how to do it in Excel. My thought is to have one sheet dedicated to the general specifications of the customer and then a second sheet that keeps track of the orders per customer. I want to be able to click on a hyperlink or something of the sort that will take me to the second sheet and automatically fill in the customer name. I want the first sheet to have the guest information running horizontally in rows but then the second sheet would have the names running horizontally on the top row and the orders would go down each column under the names. This way it keeps all of my sheets tidy and allows for me to run the type of reports I'm looking for. The main issue I'm having is figuring out a way to create a link that will do the action I want. I understand how to program but don't know Visual Basic very well but if someone was able to offer a similar code I would be able to decipher it and change it to my needs. Or if someone has a more efficient thought on how to set up the spreadsheet I'm all ears! Thanks a ton!
what you need is to create a pivot table with a data model.
The instructions are longer then what it actually takes!
here are few tutorials about the subject:
youTube video
MSDN instructions
PS don't write code in Excel unless strictly necessary. If it's a data issue, use data model

Resources