Excel dependent list best way to sort 2000 records? - excel

I have a data set of 4 columns and around 2000 rows. I need to produce an easy to use dashboard type product so anyone in can filter down to find the relevant record. Think of it as filtering down eg country - region - city - contact person
I have mocked something up using dependent drop down lists using a much smaller data set but it seems hard to scale this up, is there a better way in Excel of doing this?

PivotTable example, where Data is shown in ColumnsA:E of the same sheet, but could be on a different sheet):
each of id, c, r, c, and p is in ROWS (in order). Each small + and - can be expanded/collapsed independently (in the example all are collapsed except D and elements within D).

Related

Comparing two tables of different size, with multiple columns in VBA

Looking to use VBA to compare two tables, with three columns each against each other. Beginner here and very lost.
They may have a different amount of entries each, and there may be some in table A that aren't in table B, and vice versa
Some of the individual Columns may match but trying to work out how to make sure all three columns are compared as one against all three columns in the other table
For example
xyz123 55.50 12/07/21 if compared with XYZ123 54.55 12/07/21 will show up as not a match, because the middle column is a different number.
Have attached a picture below. For the most part, and unlike the photo, each table will be in a completely random order, and its unlikely that there will be the same entry in table 1, row 1, as table 2 row 1
Ideally, I'm trying to create two new table to the right of the original tables, the first one being the entries table 1 has, that table 2 does not have. The second one being the entries table 2 has, that table 1 does not have.
Have attached an example below of the end result I'm looking for out of this. The four rows on the left are entries that the first table has but the second table doesn't, and the rows to the right are all entries that the second table has, but the first table does not.
I've tried to search on this but haven't found something that matches what I've got, and I'm struggling to adapt someone else's code to my specific problem
Any help on this would be greatly appreciated
Maybe not a direct answer to your problem but is this data also in a database somewhere or are you familiar with Ms Access? As you could open the tables in Access, and it is pretty easy to do this kind of thing with data bases.
If not, then yes, it is do able with VBA. Numerous ways of doing it.
The simplest is to scroll through one table a line at a time and compare it with every row in the other table and match or not. This will work with small tables and be easy and quick but for large data tables it would be wasteful and may take a long time to complete.

Pivot table with registers duplicate in 2 row

I have a question about how to summarize a list of data, I attached an image of how the data is presented.
The question is how to determine (summarize) the total of activities per unit considering that a person works in 2 units.
You could define that the person working in A / B does 50% of activities for each unit.
As the list of registers is very extensive the idea is to be able to automate, try with a PivotTable and did not give me result.
Any suggestions would be appreciated (xls, sql, etc).
data
http://ge.tt/381feDj2 -> Excel fILE
Am really not the best of people when it comes to Pivot Tables, but assuming i know what you are asking for.
1) Add one extra column (dummy) and just put 1 in it, this will be used to sum the number of events that the criteria occurs.
2) Select the whole table and then Insert=>Pivot Tables
3) Click Ok
4) Set Rows (fecha); Values (dummy); and the rest to Filters.
Then you can choose to filter your output the way you want. If you want A and A/B you can select multiple in the filter options.

Excel: Create lookup based on list of criteria

I have a little bit of an Excel problem and would be happy about any suggestions.
Long version: I have a dataset with raw data representing journal entries. The structure of this dataset can be seen here:
Now, what I want to achieve is to assign each row/each journal entry to a cost category (marketing, personnel, IT, depreciation, …) based on the values in the account number, type, and cost center rows, and, in a second step, break down the categories once more, eg. for labour costs, distinguish between direct and indirect labour costs.
The way my company does this right now is using an Excel sheet with several macros where the criteria are hardcoded in the VBA code to loop through the whole list, check if a row matches the criteria for a certain cost category, and if it does, copy the row to a new sheet (having one new sheet for each category), then using a second macro to break down the categories, assigning values to the “description”-column which is empty initially based on another set of criteria. Then, pivot tables are used on each of the new sub-datasets to calculate sums for each sub-category. These sums are finally used as input data for a management report (as seen in the image above) which is the ultimate goal of this whole ordeal.
Now, not only does this seem overly complicated to me and running the macros and manually adjusting the input ranges for the pivot tables takes forever, but also the criteria for allocating the costs can change quite often, and opening the VBA editor and changing the code is not really user-friendly.The initial idea was to maybe include some helper columns (one for each cost category) and somehow create an indicator variable being one of the entry falls in the respective category, and zero otherwise, and then use these columns for further calculations (e.g. for Sumifs and such).
The problem is that a) combinations of account number and type are not unique, so that one account number can go along with various types, and one type can go along with various account numbers, so the criteria can be something like C6 = 544300 OR 544700 AND D6<>110246, etc. And b) criteria can change, meaning sometimes a new account number or type is added that also has to be assigned to an already existing category such as labor costs, which would make it necessary to include that criterion in all the formulas for that particular cost category. So, is it possible to somehow create a criteria table for each category that serves as input for some sort of IF/SUMIF or lookup function?
Short version: I have a data set (can range from 5000 to up to 100000 rows, 8 columns) where I want to perform a lookup, but based on various criteria. And, in addition to that, it would be nice if the criteria could somehow be drawn from a separate list so that they can be modified fairly easily without having to change the formula itself. Is there a way to do so? Or do you think using the advanced filter might be the most suitable option?

Showing unique values in a column along with another value associated with each

I have an Excel table containing transactions of companies. It looks like this:
Customer Phone Item Price
==================================
Company1
Company2
Company1
Company3
Company1
I need to see the unique values of customer column.
The result I want is:
Customer Phone Item Price
==================================
Company1
Company2
Company3
Here is what I tried already:
Remove duplicates: To just get the unique values, I can use the remove duplicates of excel. However, since this is something I will be doing frequently, I would rather not have to make a copy of the table each time in order to delete duplicates.
Pivot table: A pivot table does this job perfectly. My problem here is that I need other column info as well (e.g., the phone number) which I want to appear in the column next to the company. [I haven't yet figured out how to do this in a pivot table (i.e., to show a value as text instead of sum or count etc.)] - This would be the best option for me.
As long as you don't have a super long table where the recalculation will kill you, you could just add a calculated column like this and then filter on value being 1:
=IF(COUNTIF($B$1:B2,"=" & B3) > 0,0,1)
If recalculation is an issue, you can use the same or similar method with VBA except paste static values.
PivotTables are well suited for this kind of stuff, so that'd be my first go-to, but PivotTables are also frustratingly difficult to adapt to uses beyond their envisioned use... so there's a steep decline in their usefulness as you stray from that.
Ultimately, you may want to consider a relational database paradigm, and/or using Access. That's one step up the sophistication ladder towards managing the kind of data you're talking about.

Excel Management for Inventory

Okay, hope this question will be clear enough that I can get an answer. Thanks for the help.
The situation is that I am downloading some information into two different spreadsheets which contains orders from two different stores.
The problem is that between these two stores the model numbers (SKU#) for a lot of items are different even though the product is the same. There is no changing that now. I do have a list of equivalencies. For example, I know that 00-XX-55 is the same in Store 1 as 22-FF-33. There isn't a logical equivalency so I would be setting them manually.
My question is if there is any way I can combine data from two sheets and set up manual equivalencies while doing this? Would excel allow me to manage the data in that way I can join the two unequal SKUs
You need a two-column translation table. Once you have this you can manage combined inventory because you can then determine the total inventory of a single item in both stores.
So in a solution do you want to translate all to the store 1 sku, the store 2 sku, or a third warehouse sku? I guess what I am driving at here is that there needs to be a superior synonym to sort of design around.
To build a translation table you would put the original sku (the sku that you will convert from, sort of the inferior number you do not want to go by for purposes of the summarization) into column A and the master sku into column B. We will call this sheet "converter".
You could either have:
A, B
00-XX-55, 22-FF-33
This could normalize everything to the 22- sku. Or you could do this:
A, B
00-XX-55, 123abc
22-FF-33, 123abc
This way if you want to normalize to a third value rather than either of the stores values.
In your inventory page col C is the sku column so in column D put =iferror(vlookup(C, converter!A:B, 2, false), C) and populate that all the way down. Now in each row you have the original and the master sku next to each other in C and D. If the sku was not found in the converter table then it would just use whatever value was in C. You can then build pivots tables using D to group them on.

Resources