I would like to know the best way to approach this problem. I want to search multiple sheets of data based on customerid and retrieve data from each sheet such as customer address(es), customer order(s), customer personal information, etc.
Options off top of my head is...
Filter Pivot Tables by customer but would I do that automatically for all sheets?
vlookup data into one sheet based on customer search term
Is there a way to use an SQL-type command to query data from sheets and display?
I would like to retrieve similar to a SQL query but without use of macros. I don't see a way to retrieve data from these different tables in an automated fashion.
Vlookup basically falls apart the moment you multiple data sets for the same key (for example, 10 order rows for 1 cust_id) unless you make some kind of complex formula to get all of the items and predict how many you need.
I've used 2 solutions for this kind of problem:
1: Several pivot tables on the same sheet, each linked to their respective tables. Unfortunately, the user has to select the same filter for each one as needed. This is still the cleanest solution and I recommend it.
2: Make a translation table (sheet) that glues all of the other tables together.
Each cell just points to the other sheet. Pivot this
For example, if you have table 1 as ID, NAME, ADDRESS and Table 2 as ID, ORDER you might end up with a giant sheet of formulas:
A1 as =Names!A1
A2 as = Names!A2
B1 as =Vlookup(Orders!A1...)
Fill down as needed.. use formulas on this sheet to link the data as needed. You're basically simulating SQL table joins and yes it is a pain but can be done! =) Provided any of this works for your data sets, in theory you could then make 1 large pivot table.
Related
When building a financial model that is set up using multiple unrelated tables, however on the same rows across the worksheet, I am having trouble with structuring formulas the same way as you would with a single Table in Excel.
The very first table is a summary table of different projects and columns with different characteristics of each project, and the subsequent tables for the same rows to the right are structured with months/years as table headers and financial information for each period. I am now trying to build formulas that summarize information in these tables by using SUMIFS formulas that take characteristics of the projects as criteria. Typically, this would look like:
=SUMIFS(BacklogTable[des.21],ProjectsTable[Segment],"Healthcare")
Under circumstances where all this data would be part of the same table, this would yield the result I am looking for. However, as these two tables are not connected in any way, the formula returns #VALUE.
I have noticed that referencing the same row of another Table works just fine. Standing in the cell of Table2 and referencing the same row of Table1 (Table1[#[Segment]]) returns the correct value from Table1.
Is there a way to modify the formula such that Excel can interpret criterias that stretch across an entire Table column and match it with the corresponding same rows of a different Table?
Screenshot of the problem
Data Relationships in Excel does not seem like a solution. The problem can of course be resolved by adding the same information in the summary table to every other table, but for future projects it would be nice to know if using multiple tables can be a way to structure large models.
I have a table that has some columns that are the result of a [power] query which has the key fields, some columns that are intended for manual data entry and some that are formula columns.
My problem is that when I refresh the query columns the manual input data associated with specific query rows don't remain on the same row.
To overcome this I use a query that first extracts the manual input data in the existing table together with the key fields, perform the new query and then do a table join at the end of the query to get the input data back in the correct record. (any input on alternative solutions welcome...)
For tables with no formula columns I could identify the manual input fields automatically using:
List.Difference(Table.ColumnNames(Current_Source_Table), Table.ColumnNames(Pre-Join_Query_Result)).
However, this would also pick up the calculated columns with excel formulas in. How to a distinguish these formula columns to exclude them? Preferably without having a naming convention that allows identification.
Many thanks,
Joe
Excel.CurrentWorkbook does not have information on where columns get their values from, so outside of naming conventions or other potential tricks I don't know, it is not possible to distinguish them.
I am trying to work with Pivot table with some calculation from another sheet then its range. Can it possible to add column inside pivot able or at end of pivot table with custom calculation.
Sheet 1 format
A B C D
Sheet 2 format
D E F C B
Sheet 3 format
D E F C B A
another option for this is How to make pivot table with different source of data in all sheet B is conman for everyone.I tried SQL query but it will not work until it will be in same format for all.
It will be helpful if you can provide some solution to the situation.
You can do it in both ways:
Calculated Fields in the Pivot Table: you can find a step by step guide at this link.
MySQL query to a database:
create three tables, one for each sheet
make sure that you can link the tables to each other (a common ID or something similar)
if so, you can join the different tables in the same query and make your calculation
I would say that the easier solution is to create calculated fields.
A database will be much more powerful but it might be out of the scope of your needs.
Edit after reading your file
It seems that you need to compare the balance according to three data sources:
Sap Data tab
Company Code ICR tab
Trading Partner ICR tab
Since you have in common the most of information, you might want to map all the data on the same page and then to do a PivotTable.
E.g. Add to Snap Data tab the information of Company Code ICR
Choose a unique identifier for the same item in both sheets (Document No.)
Choose the column you want to get
Add a column to your original tab
Use VLOOKUP function
If you need more details, leave a comment and I will include more elements to the answer
I have a very large excel file with approximately 200 sheets with fields. Each sheet is a ranking of a subset of values which was output from an R program. There are 2 versions for about each entry. The subset data is not in the original sheet - only the name of the sheet, and the summary table i'm trying to build. I'd like to automatically determine which range (sheet) the lookup queries.
The Manual answer is to sort, filter create a lookup and consolidate the summary data, copy the formula, find replace the range reference, fill, repeat. hopefully there is a solution rather than copy-pasting, editing, hundreds of times.
You may want to re-think the data architecture. If possible, let the golden rule apply to have data in one sheet and reporting on other sheets.
Find a way to have all the 200 sheet's data in just one sheet. You may have to introduce a few additional columns to distinguish each row.
Then you can start building reports on all the data, using Pivot Tables, or more sophisticated tools like Power Pivot.
With the next to nothing info you provide about your data set it is hard to suggest more concrete advice.
My previous post seemed to have been unclear so I am posting this again and will try to explain the problem more clearly using screenshots.
https://www.dropbox.com/s/4x8wktbdo7jc21m/excel-screenshot.jpg?dl=0
Now, let me explain the screenshots.
Let's take just one of the raw materials in the table, say Rosin (Column B).
Whenever we buy more rosin, I mention the quanity bought and the date(Column A)
and I have the total quantity of rosin bought at the bottom using the formula "=sum(b80:b91)".
You will also notice that the number of rows at present is 11 i.e. 80 to 91.
But we will still be buying more rosin, even when I have entered the data in these rows. i.e. when I enter the dates and the quantity bought.
The problem is that I'll have to keep inserting more rows in there after every few days.
And if I keep doing that then the column for Rosin(as well as for the other raw materials) will become so long that I'll be scrolling forever.
So, is there a way that I could just enter the amount of rosin bought and the date without having to insert more rows.
Here's a link to the excel sheet that I created - https://www.dropbox.com/s/iod5y7jae6grmyz/brc%20goods%20received%20STOCK11.xlsx?dl=0
If you think MS Excel is not the right tool for this, then please recommend the correct tool for this.
I was learning some python and know some programming basics - just for your information.
P.S. Hope I have been able to explain the problem clearly this time.
I admit that the excel sheet looks very confusing and haphazardly done, but I wanted to start doing the calculations and improve the looks of the sheet later on.
basically, you need to use pivot tables to organize and sum your data.
here is an example sheet done for you to illustrate how it is done in your case.
therefore, you need to put each distinct data type in different sheets. In my example, I have put all of the incoming chemicals into one sheet and created a pivot table for it in another sheet. you need to repeat this for chemicals used in a separate sheet, and create a pivot table in the same/separaate sheet. And finally, in another sheet, you can make a table of total chemicals at present, simply by refering to the data in your pivots tables.
Every time you update your data sheets, come back to its pivot table and click refresh to get the latest and update your data across the table.
you can look up some help across tutorial sites on how to create a pivot table, here is one from microsoft
the best solution here would be not to keep multiple tables which you plan to extend on the same sheet, i looked at your file and it is way too confusing and clogged up, separate all the datasets you have into separate sheets, give good descriptive names to these sheets. I noticed you use total rows below each dataset, what you can do(as long as you are in Excel 2007+), create the dataset and then format it as a table from the menu, which makes your data a lot easier to read and handle, it also gives you the option of total row, more to read up on these tables you can here: Format an Excel table