VLOOKUP Vs Pivot Table
In creating a new sheet to allow for multiple piece of information to auto fill; I am struggling on a small VLOOKUP issue. On my parts information page (where the info is being pulled from) I want to be able to separate out data based on the manufacturer while still leaving enough open/blank space for future additions. My issue is that with VLOOKUP every time I add to the current list(s) of data, I have to re-sort to alphabetic in order for it to work right. This means that the separation I am looking for disappears for the most part. Maybe I am doing something wrong or I am missing something, which if so, do Pivot Tables work better for this situation?
How my sheet is working is the user can pick from a list of items, click a button and the item is then transferred to another page, when it transfers the corresponding cells on the transferee page will auto fill with the rest of the info in those cells, thereby displaying not only the item picked but all of the realative data with it.
View Complete Thread with Replies
Related Forum Messages:
VLOOKUP, IF Condition And Pivot Table
Have following table:
No. Be Country
1 D GB
1 C DE
2 B DE
2 A GB
I want to present it as follow:
1 D C
2 A B
Did not solve it with a pivot table. Not either with VLOOKUP combined with IF. I am thinking in the direction: If 1 in the first column and GB in the third, return the D. But I am not getting it right.
VLOOKUP Against Pivot Table In Macro
one part requires a pivot table to split two seperate pieces of data. the macro is running fine until this point when i get the AddFields method error (run time 1004). the Visual Basic error is as follows:
ActiveSheet.PivotTables("PivotTable1").AddFields RowFields:="Employee", _
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Lab Hrs")
.Orientation = xlDataField
.Caption = "Sum of Lab Hrs"
.Function = xlSum
ActiveWorkbook.ShowPivotTableFieldList = False
ActiveCell.FormulaR1C1 = "Int Lab Hrs"
ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-25],Sheet1!C[-26]:C[-24],3,FALSE)"
is this basically a write off or can anything be salvaged to make it run correctly. the pivot table will always use the same columns etc. every month it is run.
Nesting VLOOKUP In IF/vice Versa & Pivot Table
I've attached a sample/equivalent workbook of what I'm working on which will hopefully make it clear(er).
>There are two worksheets/month. Both worksheets (represent 2 different categories) are structured the same, two columns: model code & $ amount. >The model codes change (in # and actual model), between categories and month.
>The data for each month rolls up into a year-to-date summary worksheet, with 4 columns: Model (includes all models YTD, each only listed once), category1 YTD, category 2 YTD, & Total YTD).
Previously this had been done by manually entering any new models for the month into the rows in the YTD summary sheet. And the totals for each model (highlighted in yellow in the YTD tab in my sample) were just done by an adding formula, with the new month's data manually entered into each individual cell at the end of the formula (...+X). I know there's a much better way to do/automate this! (there are a lot more models than I've put in my sample aka it's way too time consuming manually).
My problem is twofold:
1. (main issue) I have been trying to do this using various IF statements nested in VLOOKUPS, and vice versa, but the issue that arises is for models in the summary sheet that don't exist in a given (month's) table. I want the value for those models (for that specific month) to be zero, but I cannot figure out how to get that to work in my formula. The only piece that works for me thus far is =VLOOKUP(A3, 'Jan Cat1'!A2:B18, 2, FALSE), but I've tried nesting it in IF statements, nesting IF statements in it, using ANDs & ORs, no avail.
I'm not even sure any of these options are the best ways to reach what I'm ultimately trying to do. A pivot table may be better? But I will need to keep/preserve the summary sheet for each month (so there cannot just be one big updated master pivot table).
2. If I could find a way to automate/refresh & update the row of models each month, it would be the sprinkles on the icing of this cupcake.
Vlookup (name Range Change Dynamically When The Pivot Table Is Refreshed)
I have the following vlookup formula in my spreadsheet.
IF(ISNA(VLOOKUP($A2,'Purchase Order Pivot Table'!$5:$500,67,FALSE)),0,VLOOKUP($A2,'Purchase Order Pivot Table'!$5:$500,67,FALSE))
It works perfectly for my current requirement, but it looks at data in a pivot table which is created from a dataset. If I name the columns in the pivot table so instead of looking at column 67 it looks at a name range will this name range change dynamically when the pivot table is refreshed? If not how can I get it to.
Change The Date On One Of The Pivot Table And Pivot Table Match
I have data that develops 3 to 4 pivot table each day. I would like to know if there is a way to change the date on one of the pivot table and have the other pivot tables date change to match with the first pivot table. At this time I am going to all 3 or 4 pivot table to select the correct date. The date is in the page position of the pivot table. I have attached a small sample of the data and the pivot tables.
Months To Be Sorted In Ascending Order In Pivot Table, Want To Use Multiple Colors In Pivot Charts
My input data for Pivot table has a column named "Month". The month values are like April 07, April 08, Nov07 in random order for period between Jan 07 to Aug 08.
When I create a pivot Table, this column is sorted alphabetically (April 07 is followed by April 08) but I need it to be sorted in the ascending order with respect to month (April 07 is followed by May 07).
I further use this data to plot a Pivot Chart. There is another issue here. I want to use separate colors for each series. I do not know how to achieve above 2 things.
Refresh Pivot Tables Linked To Pivot Table
I currently have several pivot table that's linked to a single pivot table(let's call it X) in the same workbook. I'm doing this to limit the file size because the data in X comes from a text file that has millions of lines. However, it's such a pain every time I need to update the tables because simply clicking "refresh" does not update those tables that are linked to X with new data. I would have to instruct the wizard in every linked table to point to X every time. I'm trying to write a small program to re-point to X for each of those other pivot tables whenever i refresh data. However, after trying to record the steps to do this I'm still unable to run these
ActiveSheet.PivotTableWizard SourceType:=xlPivotTable, SourceData:= _
How To Mimic A Pivot Table Without A Pivot Table
I have a list of items and their associated quantities, many items appearing multiple times. I need a concise list that summarizes each item and sums all of its quantities.
The obvious solution is a pivot table. However, I update this list frequently and for some reason the pivot table is difficult to update. is there a function or simple vba code that I could put into this workbook that would work better than my unflexible pivot table?
Count Pivot Fields In Pivot Table
I am trying to find a way to count the total number of pivot fields in a pivot table so I can remove ghost pivot items that are no longer in the pivot table data. My code for this subroutine is as follows;
Dim ghost As PivotItem
Dim pt As PivotTable
Set pt = ActiveSheet.PivotTables(1)
pt.ManualUpdate = True
For Count = 1 To 10
On Error Resume Next
For Each ghost In pt.PivotFields(Count).PivotItems
pt.ManualUpdate = False
My code makes an assumption that I have 10 Pivot Fields or less. It would be nice to actually know the number of Pivot Fields so my "For Count" Loop would be more efficient. In otherwords;..............
Import Data From Access Table To Pivot Table - Enable Auto Refresh
I have enable Refresh on Open for my excel pivot table, but user need to click "Enable Automatic Refresh" , only solution i came across is to change the registry setting. Which i dont have access to edit registry(admin disable the access).
Alternate solution i try to use Access macro to automate the process and use Outputto save it as a excel file A. Then use excel file B to update pivot table from excel file A.(as excel A data is always latest)
The problem is i will get "....A file name already exist...do you want to overwrite.." prompt.
Which defeat the automate process.
Any other solution to enable the automatic refresh on open the excel workbook?
Or Access can overwrite the exist file or save it as another file name with timestamp ?
Apply A Filter In A Pivot Table And Extract Results In A Table
I have made a pivot table and I dlike to identify with a macro the documents with net value over 1000. Then extract these values next to the respective sales documents in an are near the pivot table somewhere. The fields are called Document and Sum of Net value. Of course the pivot is very variable one time it has 3000 records and another 5000.
Pivot Table An Extract Of Each Data Contained In This Table
i have a pivot table an extract of each data contained in this table.
[img]Count of NAMdate
Pivot Table: Table That Shows As A Header The URL
I want for my set of data. The attached .xls is pretty straight forward: the first column is a list of people (identified by their customer number) and the second column is the URL they visited.
Since many people went to multiple pages, there are dupes between the two columns, but all of the rows are unique. What i am looking for is a table that shows as a header the URL (just one) and then the list of people that went to that URL under the header. So it's really just one column of information. It seems like a perfect task for a pivot table.
VLOOKUP With INDIRECT (become Dynamic As The Table Array Part Of The Vlookup Will Change)
I have a Vlookup which I want to modify so that it can become dynamic as the table array part of the vlookup will change.
So the basic vlookup is as follows:
but the data I am looking for wont always be in the range M60:P73.
So I tried to make it dynamic by doing the following:
The idea being that U1 and V1 would be numbers that can change so in this case U1 would equal 60 and V1 would equal 73
This vlookup is giving me #N/A and no matter how I modify it I cannot get it to work.
Pivot Table With Dynamic, Updatable Chart, But Not A Pivot Chart!
My boss wants me to design a dynamic, updatable chart in Excel 2003. I initially made a Pivot Chart based on a Pivot Table which worked perfectly, but it doesn't look professional enough when printed (or viewed) and she wants me to approach it a different way.
So, I created a graph based on the data in a Pivot Table, and used dynamic ranges as the source for the graph series so that the chart updates when the criteria fields are changed for the Pivot Table. I then added two combo boxes (ie data validation lists) to the Chart sheet, and wrote VBA code so that whenever the combo box values are changed, the Criteria fields for the Pivot Table on the 2nd sheet are updated accordingly, and this in turn causes the graph to be updated as well.
This solution also worked perfectly, but now I've been told to create the graph without macros.
Does anyone have any suggestions? The requirements/details are as follows:
1. The Pivot Table is on sheet "PIVOT", and the graph is on sheet "GRAPH"
2. The Pivot Table has two criteria - School Name and Year Level
3. On sheet "GRAPH" there are two data-validated fields, School and Year, which only allow the selection of valid Schools and Year Levels
Is there any way to make the Pivot Table update when values are changed in the fields on the CHART sheet so that the chart also updates, but without using code nor a Pivot Chart?
% In A Pivot Table
I am trying to add a column to a pivot table that shows the percentage of another column.
I have Sales and Returns listed for my company's products in the pivot table columns.
Lets say the numbers are: Sales are 10 and returns are 4. I show both columns and want to add a 3rd column that shows 40% (4/10).
Does anyone know how to do this in the pivot table? There are plenty of percentage options, but none to do this simple one.
Value 0 In A Pivot Table
This dataset I have has empty cells, but there is a formula in these cells.
When I make a PT from that dataset, the cells which are empty in the dataset do show up in the PT, as zero's.
Say in the first column of the table are employees, in the second column is a number that is of interest. I want the employees with a number of interest that has value of zero not to show up.
Is there a way to leave those rows out of the table?
Pivot Table - Subtotals
I have a seemingly very simple question but even though I've worked a lot with pivots I can't find the answer.
clientcode Amount countries
a1 1.000,00 kenia
a2 2.000,00 kenia
b3 1.000,00 kenia
b4 3.000,00 kenia
b5 2.000,00 kenia
c5 1.000,00 senegal
c6 3.500,00 senegal
c7 4.000,00 senegal
c8 5.000,00 senegal
Lets say I have a list like this and I want to count the number of clients (3) or countries(2).
I can only get the total of rows per client but not the subtotal 3 for the number of clients.
a - 2
c - 4
Pivot Table - Percentages
I am trying despeartely to finish this out. Here is the deal. I created a pivot table (see attached). The issue is that I need the numbers in the red boxes to be a percentage of the total number below - so the 2 should be a percentage of the 9 (22%) and the 3 should be 100% and the 7 should be 78%. I cannot seem to get this to work. Also, there are multiple rescue groups that need this and each needs to be the % of its own total number of animals.
Pivot Table :: How To Get The % Data Above A Particular Value
I have a excel sheet with following 4 columns
Transformer earth resistance:
Now how can I get answer of following queries in Pivot table. (Excel 2007)
1. % of a particular capacity of transformers in a division say % of 400 capacity transformers in all divisions.
2. % number of transformers having Transformer earth resistance value above a particular value in all divisions. Say % of Transformers having Transformer earth resistance above 2.6 in each division.
Sorting In Pivot Table
I have created a pivot table that contains the following data:
Date as in 5/1/08, 6/1/08, etc
With counts in the cells
I can sort on Country name and get an alphabethical list by country name showing teh numbers for each date
However I want to sort by the largest to smallest number that shows in the date column 01/01/08
Is there a way to sort on that colum-while moveing all the numbers in the other date columns along with it?
Count In Pivot Table
I have created a pivot table from a spreadsheet that had around 27 rows for each employee (i.e: each paycheck the employee received). The pivot table turned out great, but I need to know how to make it count how many employees are in each department and show it in the table.
Alternative To Pivot Table
I have a worksheet that has 5 columns of data, all of which are text. I am looking for a way to present/display the data in a manner similar to that of a pivot table. I'm pretty sure an actual pivot table is no good to me since I'm dealing with text, but I'm looking for something that is functionally the same.
In other words, I would love to be able to "pivot" my data and display the different relationships between the different columns. If a pivot table would display text in the "data items" field, that would be perfect..
Pivot Table- Sumif
I was wondering if any one could guide me how to use SumIf or any other functions while creating a pivot table from excel data in a very presentable manner.
The data shows - sales in qty to various customers for the month of may. Important columns need to be reported are Item, Qty.
On the second tab (in the attached sheet) i am showing the format how i want. I need to sumif by item code and put the total in the respective company column. I could manually do this by SumIf but if I want to do this for month by month for 4 months then how would i do it quickly.
Is there an easy way report for 4 month's comparative figures to make an analysis to see whihc company orders whihc product and the so on.
Updating PIVOT Table
I have created a dashboard based on a number of pivot tables. (Using GETPIVOTDATA tags)
One of the fields in the Dash tab is Week which is a drop down menu of 1-13. (GLA Dash C3)
I have two pivot tables in seperate tabs. (BottomQuartile1 and BottomQuartile2) both have Week as Report Filter.
At the moment when I change the week in Dash from 4 to 5 i have to manually go into the two BottomQuartile tabs and alter the week to match.
Is there anyway I can automate this process so that when i update the week in Dash it will update the Week in the other two tabs?
Dynamic Pivot Table ....
I have a spreadsheet the includes data validation, auto fill fields using formulas and conditional formatting all over the place. The user will be adding rows of data whenever applicable, so I want to create a dynamic pivot table that will update automatically. I think I've done it properly, Insert - Name - Define. In the Refers To field, I've added:-
I've then based the Pivot Table on the defined name. For some reason, when I add a new row of data, the pivot table doesn't update, I have to do it manually. When I go back into Sheet1 and click in the Refers To field, there is an extra "blank" row showing as included in the data range (screen print attached) Is my OFFSET wrong, or does it have anything to do with the fact each row (down to line 300) contains formulas and #N/A's?
More Than One Column In Pivot Table
my table has the following fields: Zone (north, East, west, south), depots in each zone (D101, D102 in North and D201, D202 in South),product code (S101, S102...S100) then sales data for three stores 1, 2, 3.
My original table has the depot code, zone it belongs to and sales of each of the product made to each of the store per depot.
In the Pivot table, I shall need to show Branch and the Product codes on the row-side, and require store codes 1,2,3 to appear on the columns. The data area thus needs to be a summation of D101, D102 for North (for each of the product-codes) and D201, D202 for the South region.
I am unable to display 1,2,3 as separate columns.
Pivot Table Error
Upon opening an existing file, I receive the following error: Unable to Read File….I then click OK, Enable the macros and upon doing so, the following message appears: Excel Table Report on [Sales] Sheet1 was discarded due to integrity problems.
I have two Pivot tables on the report – Pivot8 and Pivot1 – two separate worksheets but using the same source data. I have placed a button on each worksheet to enable the user to refresh the Pivot Table. Pivot1 is the table that is being discarded and when I click the button on Sheet1, the following Run time error 1004 appears: Unable to get the Pivot Tables property of the Worksheet class….when I select Debug, here’s the code with the bolded section being the point of error:
ActiveCell.FormulaR1C1 = "=NOW()"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
Pivot Table Update
I've created a pivot table that summarizes sales and gross profit on a quarterly basis and YTD basis by Market and store. I have a drop down in my source data file which changes the month. I go to update the pivot table and it no longer recognizes the data fields because the headings change to the subsequent month. Is there a way to not have to recreate the pivot table every time a run a new period? See below. Once I run August and then refresh the data it will not recognize these fields any longer.
Pivot Table Ranges
I have just created a pivot table, however, i have just put the range to the cells that have data in them. The problem is, is that i want to make the cell range bigger, but the cells that i want to include do not have data YET, but will in the future. I have tried creating the pivot tables including the cells with no values, but it ends up puting 1 into the pivot tables cells for some reason.
Sub Grouping In Pivot Table
The attached is the format of a pivot table i have made from a data. MY primary group is the REGION inside the region i want to group as per the LOCATION HEAD.
This report automatically sorts as per the location id.
How is it possible under region i want to group according to the location head and total. i DONT WANT TO CHANGE THE SEQUENCE OF THE COLUMS AND THE FORMATTING
Too Many Items For Pivot Table
I have a database table with selling prices. I want to get a count of number of customers by sales price range.
My nose says this is what a pivot table should do but there are too many sales prices and the pivot table craps out. How do I get them into ranges as above and then count them?
Creating Pivot Table
I would create a field in Access that would have the Names of the Counties (for my Row Labels) and I would create a field that would contain Years (for Column Labels) rather than using each individual date from my database. I want to be able to do this on the run in a Pivot Table.
For my Row Labels I am using the Municipalities in Wisconsin. Each one is assigned a number such as: 67-251, 67-015, 67-123. The "67" identifies the County and the "251" or "015" identifies the City, Town or Village. We need to use the whole number for the Rows but we only want to use the first 2 Digits to sort by the County. 67 is Waukesha County as is 40 Milwaukee County. I want to total the county's using the first two digits of their name. The field is called "SC" and it's a 6 char text field.
For my Column Labels I have many different dates that span a period of about 15 years. I would like to only use the Year for my Column Labels. And that year would accumulate all the dates for that County for the year I want to use..
In the end I would like to be able to get a Count of Permits for each County by Year. I would also like to be able to specify only certain years that I might want to see data for. Every time there is a date in the "First" field that is a count one home for the "SC" field.
I used to be really savvy with Quatro Pro, most people don't even know what that is anymore. In that program I had a line of text where I would enter the criteria that I was interested in for my Table. Such as 51, 40, 45, 60, 67 would be the counties I want to use. 2000, 2002, 2005 would be the column values I want to use.
Utilize A Pivot Table
I have a working spreadsheet that utilizes many many formulas in many worksheets. I am utilizing the sumproduct function in many of the formulas. The problem is that it takes forever to run and update this report. I think I can utilize a pivot table except I have one small issue.
I would like to create a Macro that would run through my Details worksheet (contains all of my raw data) and seeks out certain criterias and issues a 2.5 or 3.5 result into a new column. Column C contains Make names. Column B contains Model numnber. I would like the 2.5/3.5 result to be recorded in column Y.
Fujitsu - Any model number that starts with MH
Seagate - Any model number that starts with ST9
IBM - Any model number that starts with IC2
IBM - Any model number that starts with HT
Hitachi - Any model number that starts with DK2
Hitachi - Any model number that starts with HT
Hitachi - Any model number that starts with IC2
Western Digital - Any model number that Ends with UE
Western Digital - Any model number that Ends with VE
Western Digital - Any model number that Ends with BEAS
Western Digital - Any model number that Ends with BEVS
If any the the above Make/Model criterias match I would like 2.5 to be recorded in the Y column for the row. If the Make/Model criterias do not match I would like 3.5 to be recorded in the Y column for that row.
Pivot Table Filter
I have a list of names and a count column, So it counts how many times the names have appeared from my raw data. Simple.
Using excel 2003 what i would like to do is filter the pivot table so it only shows people with a >1 count.
Now in excel 2007 this is really easy and i can just apply a >1 filter. I can't work out what to do in excel 2003.
Pivot Table And Crosstab
how a crosstab query works in ms access. Below is a visual. IN my source material, the columns are Category, Commodity, Supplier, and Dollars. I need to be able to get only the top 5 suppliers in descending dollar rank in the columns adjacent to the pivot table, as displayed below. Try as i might, i have been unable to get this to work using a pivot because i don't know how to limit the supplier columns to only the top 5.
One Pivot Table From Two Worksheets
I have two worksheets. One shows imports, the other sales.
I might import Item A at a price of $1.00 and a few months later Item A costs $1.25. I got 100 at $1.00 and 40 at $1.25.
I have sold a total of 110 items.
What I want to do is make a pivot table from both worksheets. I want it to show that I imported 140 units of Item A at a total cost of $150.00 yet I have only spent $112.50. My arrangement with the source vendor is to pay AFTER the product is sold. So I owe $112.50 to the source vendor.
I've tried copy and paste of one sheet into a 3rd new sheet and then copy and paste the common information PLUS Quantity Sold from the 2nd sheet into the 3rd.
When I make the pivot table, and I can not get Item A to multiply 100 x $1.00 and 10 x $1.25. It shows sales of 100 and sales of 10. I can get it to show costs of $1.00 and $1.25. But I can not get it to multiply, as the figures are one two different lines.
Pivot Table Averageing
I have a pivot table which has a date and a count of items recieved on that date.
Just a question, is there a way for a pivot table to average the amount of recieved items to add a line at the end of the month which gives me an average over the past month for the various items the pivot is counting?
Automate A Pivot Table
I have a workbook that starts blank everytime time its opened, and at the push of a button launches a macro that imports some data, sorts and formats it. All good so far.
I am able to create a pivot table (using the wizard) to analyse the data I am left with and display the desired results, but I would like to be able to automate this process, so that the table 'appears' when the original macro has done its work and sorted the data.
I have tried (cheating?) recording a macro of the pivot table wizard, but it fails to run and I am not capable of fixing the programing. Is there an easy way to automate the pivot table process or a macro that can be written that will work?
Pivot Table Show All
I am trying to form a macro in VBA that will basically uncheck the "Show All" function of the Pivot Table filter user interface, and then select only the one PivotItem that I want. In context, I have about 50+ different project numbers, each with a different worksheet and its corresponding pivot table. Here is what I have so far:
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Project #")
For Each pvtitem In .PivotItems
pvtitem.Visible = False
With ActiveSheet.PivotTables("PivotTable1").PivotFields("Project #")
.PivotItems("525064").Visible = True
When I try to run it, it gives me the error: "Unable to set the Visible property of the PivotItem class". It looks like the error occurs in the loop part of the macro.
Changing Name Of Pivot Table
I seem to have a small problem with a Pivot Table on a file that we get weekly. I've built a macro to run across the file to format it and refresh. The problem is, sometimes it fails because the Pivot Table is listed as "PivotTable1" and sometimes it comes through as "PivotTable2".
I'd like to amend it so that regardless of it's name, it can be renamed to "MainPivot" or something similar.