I have a Bill of Materials that looks like this inside of it
But for various reasons my ERP will only allow me to export the BOM as an .xlsx that looks like this
Where each member item is tied to the member item above. These means when I make a pivot table and try to find the member items of just my product, it'll only give me Assembly 1 and 3 and then I have to do another pivot table to find 1 and 3 and so forth. Some of my BOM's are 6 levels deep and making a table for each sub assembly is not ideal. Anyone have any ideas of how to handle this? My thoughts are to use something like pandas and script it out, but I wasn't sure if there was a method inside Excel that I was missing that might cover this. My end goal is to recreate something like the first picture, although the nesting isn't necessary.
I would suggest to make a table as below in Ms Access.
Table
Then make a Query as below
query
You will get a result like this.
Query result
And copy this data and paste it into excel.
Make some rules in excel, and you will get the result you wanted to.
Related
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...
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.
I have this kind of data in excel sheet
I want to have this presented like this:
But dynamically. What do I mean with that?
Well if data change in first picture then data should be changed in second.
For example if I add another value entry for Client2 like this
Then the data in second table should be updated like this:
Is this something that is even possible with just using formulas or will I have to do some VBA programming to achieve this?
Use PivotTables to manage your data.
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.
I am working on an application where there is a desire to automate data entry as much as possible. The wish is to add a button to such entry forms for choosing an excel file to import. I have done this for one interface, and now I'm working on others. I'm looking for the best way to prevent duplicates are imported into a table. For the one I am working on now, it is a simple 2 column import. One method I have used before is to import the spreadsheet into a temp table. Then I can utilize a query to insert where <> . I just wonder if this is the best method to use.
Any thoughts?
Thanks!
Something like this should work. I can tailor it more if you list some more details of your projects.
From "External Data" on the ribbon, link to the excel file.
Then write the following query:
INSERT INTO table1
(
field1,
field2
)
SELECT
a.field1,
a.field2
FROM tableExcel AS a
LEFT JOIN table1 AS b ON a.field1 = b.field1
WHERE (((a.field1) Is Null));
Then just attach a macro to the button running the query above.
I ended up finding the solution that will work best. I can put an index on the 2 fields that are getting imported from the spreadsheet, into the table. Then before I issue the transferspreadsheet command, I will set warnings false, and set them true once it is done. This way, the user won't get errors for the indexes doing their job of rejecting duplicates.
Anyone see any problem with that solution? The only bummer is that if I imported to a temp table, I could get a count of items first and verify the count after insert, so I could report some info to the user in the process. Other than that, this means I don't need a temp table, and I can go directly into the goal table without worry about importing dupes.