PivotTable - Adding Page Filters

Aug 11, 2014

First, the code:

[Code] ....

My problem is with this part here:

[Code] .....

I need it to filter on anything beginning with 2613, not just 261302. Unfortunately, I do not know all the possible inclusions or I could just add them individually, so I need a wildcard to add to this filter and I have never done that.

Thus, I ask how to write a wildcard filter that will work in this pivottable.

View 1 Replies


ADVERTISEMENT

Link PivotTable Page Fields

Nov 20, 2006

I have a workbook with three sheets. The first is a list of employees with their managers. The second is the data about those employees (who they sold product to, and how much, on what date). The third is the PivotTable with the employees' sales. I have the Customer name in the Row field, and the amount in the Data field. I have two page fields - the Manager's name and the Employee's name. The example that I'm using so as not to violate my NDA is a Northwind knockoff. That's why the names probably sound familiar.

What I want to do is have the second pivottable page field (Employee) change, so that when I choose a manager's name, only the employees who report to that manager show up in that page field. I have a named range called "allEmp" (all employees), one called "buchanan" (all the employees who report to Steven Buchanan), one called "fuller" (all the employees who report to Andrew Fuller). (File attached, btw).

Private Sub Worksheet_Calculate()
Dim mgrRange As Range
mgrRange = Range("allEmp")
Range("$b$1").Select
Select Case ActiveCell.Value
Case "Andrew Fuller"
ActiveWorkbook.PivotTable("EmpSales").PivotFields("Employee").CurrentPage = Range("fuller")
Case "Steven Buchanan"
ActiveWorkbook.PivotTable("EmpSales").PivotFields("Employee").CurrentPage = Range("buchanan")
Case "Susan Erickson"................

View 6 Replies View Related

Listbox Result To Pivottable Current Page Field

Aug 10, 2007

I am thinking of using a listbox so a user can select a product to graph. What I want to know, in VBA, is how do I use the selection the user makes and use it in a pivot table current page field? The listbox returns a number whereas I want the text. I can use the number when it is linked to a cell and a vlookup to get the text but how do I get the text into the current page field?

View 2 Replies View Related

Adding Columns Within A Pivottable

Jun 19, 2007

I have a data worksheet, which contains about 20,000 lines of journal entry info. There is a separate column for debit and credit, not one "amount" column. On another worksheet, I am aggregating the data to review the impact for this series of journal entries over a time period (12 months). Thus, my pivottable contains "Accounts" in the "ROW" and "Period" in the "COLUMN" sections of the PivotTable Layout. The "Debit" and "Credit" fields are then summed in the "DATA" portion of the PivotTable.

My issue revolves around getting the actual impact for each account for each time period. Essentially, I need an extra column inserted between each time period that sums the debits and credits for that period. Do I need a macro for this (not any experience with macros)? My file is way to big to share, so let me know if a pared-down sample would work.

View 5 Replies View Related

Adding Sort Filters To Multiple Selected Columns

Nov 14, 2009

I have a row of sub-headings at row 12 that require Sort Filters. My problem is that I need the filters on selected columns only. It seems that with the standard filter button I get all or nothing.

View 8 Replies View Related

PivotTable Code: The PivotTable Field Name Is Not Valid

Aug 3, 2007

The code I'm using that results in the following error message: "Run-Time Error '1004':

The pivotTable field name is not valid. To create a pivottable report, you must use data that is organized as a list with labeled columns. If you are changing the name of a pivottable field, you must type a new name for the field." Here's the code, I've seperated it into each sub hoping that will make it easier to read:

Option Explicit

Sub main_prog()
Call td_metrics_import
Call pt_td_metrics("Pivot_Page1", "PivotTable1", "PivotTable2")
Call pt_td_metrics("Pivot_Page2", "PivotTable3", "PivotTable4")
Call create_graph
End Sub...............

View 8 Replies View Related

Advanced Filters - Having Multiple Filters And Conditions (Unique Count)

Jun 7, 2006

I have a problem with the attached spreadsheet. I have certain letters (A,B,C etc.) that are shipped to various regions. I would like to have a count on top to count the total number of orders, but one that also counts the total number of unique orders. However, this unique count has to be dynamic and must be able to adjust accordingly to the filters (by default, if no other filters are applied, should be 15). For example, if I apply the "Ship To" filter to Canada, the total number should be 19, but the unique count should be 12. If I change the "Ship To" filter to US, the total number should be 9, and the unique count should be 7. I've tried to use the advanced filters but if I apply the unique entries filter, it is only a one time calculation. Also, the advanced filter gets rid of my other filters.

View 5 Replies View Related

Adding A Page To The Workbook With A Name

Dec 30, 2008

I am trying to do a macro and I want to add in a worksheet. I use the code

"Sheets ("Template") .Add"

but I keep getting an debug error. I did this in another macro but cannot find it. I need to add a specific name at the start of adding in a sheet as the sheet number increments change based on how many times you have run the macro. I know this is a silly format issue but I could not find anything in my book or searching this forum.

View 3 Replies View Related

Adding Page To Multipage Userform

Mar 30, 2013

I have a UserForm which has a multipage with 2 pages, each page has many controls and associated code. I now need to add a third page but cannot get the code supplied to work.

VB:
Sub AddNewPage() Dim NewPage As Page Set NewPage = frmColEd.mpCust.Pages.Add(, , 2) NewPage.Caption = ThisWorkbook.Sheets(2).Text frmColEd.Show End Sub

frmColEd is the name of the user form and mpCust the name of the multipage on that user form. I keep getting a 'Type Mismatch' on the SetNewPage=.... line no matter how I change it.

View 2 Replies View Related

Excel 2007 :: Adding Page Break With VBA

Mar 25, 2011

I have been trying to write a macro to add a page break in Excel 2007, but I have had no success.

A friend recomended:
Columns("CC:CC").Select
ActiveWindow.SelectedSheets.Vpagebreaks.add Before:= ActiveCell

This has not had any affect when I have printed.

View 3 Replies View Related

Adding Sound When You Select A Page Of A Wook Book?

Sep 14, 2008

how would i go about adding sound when you select a page of a wook book?

View 6 Replies View Related

Collecting Amounts Of Time For Various Tasks And Adding In Separate Page Via Menus

Dec 10, 2013

I would like to create a menu representing "tasks" where an amount of "time" can be designated per option for my employees to select and fill. I would like this information to then be tallied elsewhere so I can keep track of our efficiency.

So far, I've created a table where a "time" input is nested beside each "task" drop down menu, I would like these inputs to be added up underneath the same category on the budget tab.

For example: If I work Monday, Tuesday and Wednesday doing tiling.. I would like the budget to reflect those accumulated hours (throughout the week) nested under "tiling".

Here's the file, what I'm trying to accomplish [URL] ............

View 1 Replies View Related

Page Break Preview It Shows The Page Numbers In The Centre Of The Page

Jun 9, 2009

When I view a sheet under Page Break Preview, it shows the Page numbers in the centre of the Page. While I am aware that it would not print the page number I was wondering if there is an option to remove/hide the page numbers.

View 3 Replies View Related

Pivot Filters To Change Simultaneously With Other Pivot Filters?

Jul 1, 2014

I have 3 pivot tables and with 3 filters each (they are all the same filters). I just want to change 1 of the filters for each of the pivot table (meaning the other 2 stay the same for all of the pivots). Is it possible to have a filter change automatically to match a filter in another pivot?

View 9 Replies View Related

Put In Error Handling In Case The Format Of The Page Changes Or The Internet Page Is Unavailable

May 18, 2006

I have some code that parses an html table. I want to put in error handling in case the format of the page changes or the internet page is unavailable. I am testing without an internet connection and the run time error is not being branched off to the error handler and is fatally ending the macro. This is true also if I raise an error manually.

Private Sub ParseInjuryPage()
On Error Goto ErrorHandl
Dim strPage As String
Dim webIE As SHDocVw.InternetExplorer
Dim myURL As String
Dim tableBeg As Long
Dim tableEnd As Long
Dim RowBeg As Long
Dim rowEnd As Long
Dim cellBeg As Long
Dim cellEnd As Long
Dim strBeg As Long
Dim strEnd As Long
Dim myCell As Range
Dim rowNum As Integer
With Sheets("INJ")
Set myCell = .Range("A2")
.Range("A:F").Value = vbNullString
rowNum = 2
Set webIE = New SHDocVw.InternetExplorer
myURL = "http://www.sportsline.com/nfl/injuries"
webIE.Navigate myURL
Do Until webIE.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop
strPage = webIE.Document.body.innerhtml...................................

View 6 Replies View Related

Creating A PivotTable Using VBA

Apr 30, 2014

I am unsure if this is supposed to be in the PivotTable or VB section, but given it is VB code I expect here is better.

[Code] ......

I can confirm the SourceData exists, and can be used to create a pivot table without error. Only when I try to RUN this code does it kick out saying, "Invalid procedure call or argument".

View 3 Replies View Related

Name New Sheet Used For PivotTable

Oct 8, 2007

In the macro I am writing I open a pivot table which as you know creates a sheet. I would like to name that sheet. My problem is that the default name(number if you will) changes every time I run my macro so I am unable to define which sheet I want to give a name.

View 2 Replies View Related

Possible For Count & Sum In PivotTable

May 20, 2008

Is it possible to have both SUM and COUNT values on one PivotTable?

View 3 Replies View Related

Can't Move Page Breaks In Page Break Preview

Mar 26, 2006

I suddenly can't adjust my page breaks in any Excel spreadsheet while in Page Break Preview. Is there some option to turn it on and off?

View 7 Replies View Related

Print To Fit All Rows And Column On One Page And Take Up Entire Page?

Oct 16, 2013

I have a sheet that changes the number of columns based on data from other sheets. This is the only sheet in the workbook that I will print out every day. I have it set right now to fit all columns on one page, however sometimes this will result in the bottom 1/3rd of the sheet not being used. If I use fit all rows on one page, then some of the columns will get cut off. Is there a way to scale in both directions? My guess is there is not, but I thought I would ask because it would work great for me if I could.

View 4 Replies View Related

Printing One Page Grayscale And One Page Color With Code

May 21, 2009

I have a report that I use and right now I have a command button that prints the report x2. What I would like to do is to have it print one in color and one in grayscale. I could do this I think with two different buttons, but I would like to utilize just one. I tried creating a macro but it did not pick up the fact that I changed the properties to black and white.

View 2 Replies View Related

Countif Formula: Take Data From One Page And Graph It On Another Page

May 1, 2009

I am looking for a formula that will take data from one page and graph it on another page. The data I am trying to graph is arranged like so:

A B

1 q 2009.05.01
2 w 2009.05.02
3 w 2009.05.01
4 q 2009.05.01

I am looking for something that will look at column A and if the answer is "q" and then look at column B and if the answer is "2009.05.01" Excel will take that and count it in a specific cell on another page. In the case above, I want Excel to give me the answer of "2" in a designated cell.

View 3 Replies View Related

Change Start Page Of Multi Page UserForm

Jul 23, 2006

Is it possible to Change Start Page Of Multi Page UserForm Based on 8 CommandButtons. on a WorkSheet, for example.

CommandButton1
UserForm1.MultiPage1.Value = 0
CommandButton2
UserForm1.MultiPage1.Value = 1
CommandButton3
UserForm1.MultiPage1.Value = 2
CommandButton4
UserForm1.MultiPage1.Value = 3

Could I use 1 multipage UserForm Instead of 8 UserFoms. Is it better to use 1 multipage UserForm with 8 pages or 8 UserForms. I dont know if this make sense or not?

View 2 Replies View Related

Transfer Specific Data On Each Page To A Different Colum On That Same Page

Mar 15, 2007

I have a workbook that has 9 different tabs in it. Once all the information has been completed throughout the workbook, is there a code that could transfer specific data on each page to a different colum on that same page? I need to do this for 9 pages at one time. The information is listed differently on each page. I need to transfer data from the current data column to the previous data column once the entire workbook has been filed out.

View 2 Replies View Related

Remove Page Numbers In Page Break Preview

May 18, 2007

how to get rid of the page numbers that appear when using page break preview mode. The page numbers appear in large grey font in the middle of each page and sometimes makes it difficult to read cells. Can I use this view with all the same functionality without that one feature?

View 3 Replies View Related

Macro To Print Page Based On Active Page

Jun 29, 2007

I need a macro that will print a hidden page that is linked to the page I have active.

It needs to be able to find the correct hidden page that corresponds to the active page because there are multilple pairs of the hidden/visible pages. The name of the hidden page is the same as the visible one with "printout" added to the end. When created, the sheet code names are sheetn and sheetm; n and m being consecutive numbers.

View 3 Replies View Related

Hide PivotTable Row Labels?

Feb 4, 2014

I have a PivotTable with data and I want to hide the row labels (in blue) that's in the first row.

See image:[URL]

PivotTable.jpg

View 4 Replies View Related

Values Appear Twice In PivotTable Row Labels

Jan 31, 2010

I have a PivotTable that is summarizing a data table. In the configuration panel, I've dragged one column ("C92") to the "Row Labels" area. Likewise, I've dragged the same column to the "Values" area, where it defaults to "Count of C93". So far, so good.

I should mention that my values in column C92 are the whole numbers 0-7 and the string "NA". But in the output chart, each of these values is listed twice! And each count of each value is different! I'm attaching a cut-down version of the spreadsheet that shows this behavior.

View 2 Replies View Related

Automate Autofill For PivotTable

Dec 22, 2009

I have a document that is exported from an SQL database. Once I have the data I need to throw it into a PivotTable to analyze it. However, the export doesn't fill every cell with the information - instead displaying the cell value once until a new value comes up. Therein, there are often a number of blank cells underneath each entry.

I can overcome this by going into the document and autofilling each cell that doesn't have the information in it. However, some of the reports are very large and it is quite time consuming.

What I'm after is for a bit of VBA that will autofill the cells until it hits another new cell value then autofill this down until it hits another new cell value, etc.

I have attached a dummy copy of the report - one sheet, Raw Data, shows the data as it is exported and the other, Autofilled, shows how I would like the data to be displayed after the code is run.

View 2 Replies View Related

VBA: Create PivotTable From A DAO Recordset

Sep 24, 2009

I have been creating pivot tables (from the active workbook) with ADO for a while and its working great.

I just tried to switch to DAO and adapted my code accordingly but the new code fail at:

Code: ....

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved