Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Excel


Unable To Drag PivotTable Fields

The issue is that for every pivot table in any file running on my machine, I am unable to drag the column or row values to change the sort order - I.e. if the row is Jan/Feb/Mar/etc., I can't drag Jan down to the middle or rearrange them - it will sort by ascending or descending value just fine, but simply won't allow me to rearrange - the 4-way arrow doesn't appear where it should when mousing over the fields. I can drag fields on/off and from/to the column/row/data sum areas, but I simply cannot re-arrange the order of the values (and yes, the Autosort checkbox is set to "manual" in field settings.)

View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Unhide All PivotTable Fields
In a pivot table the user is able to select multiple entities to hide in the 'Hide Items' field of the PivotTable Fields window. I would like to create a macro (or edit a macro in the VB Editor) that willl reset all 'Hide Items' in the PivotTable Fields window...effectively unselecting any previously hidden entities.

View Replies!   View Related
Link PivotTable Page Fields
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")
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 Replies!   View Related
Group & Hide PivotTable Details Of Certain Fields
I have a pivot which under a Main product, there are a few sub products. I have act, budget, forecast etc figures but mainly want to only show the Total Act and not the rest, see the highlighted brown columns which I do not want to show in the pivot.

Then I want to group the clients, salesperson together so that the details can be hidden.

This is a small example. I have a large pivot table with lots of teams and salespeople and clients and a few main products with a few sub products within it. Grouping it manually is going to be very difficult and would appreciate if there is some way to automate it either via pivot capability or VBA.

View Replies!   View Related
Pivot Tables & Formula: Build A Pivottable And Let Users Move The Fields Around
I'm trying to do at the moment is build a user interface for some Excel Data. Now, the natural way to do this would be to build a pivottable and let users move the fields around, and this is how the thing has worked in previous iterations of the workbook. It seems now, hoever, that we're trying to cater for users for whom pivot tables are just a little too much and to summaries data based on listboxes etc.

What I'm interested in knowing is whether there are ways of interacting with PivotTables beyond the GETPIVOTDATA function - is there any way, for example, to select different field items to show based upon an input from elsewhere? How does one tell a pivottable what to do from outside the pivottable?

View Replies!   View Related
PivotTable Code: The PivotTable Field Name Is Not Valid
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 Replies!   View Related
Possible For Count & Sum In PivotTable
Is it possible to have both SUM and COUNT values on one PivotTable?

View Replies!   View Related
Name New Sheet Used For PivotTable
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 Replies!   View Related
VBA: Create PivotTable From A DAO Recordset
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 Replies!   View Related
Automate Autofill For PivotTable
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 Replies!   View Related
Values Appear Twice In PivotTable Row Labels
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 Replies!   View Related
Count Of Associated Items In PivotTable
I need to make a pivot table with data from 2 columns. The data has columns named Unit Type and Name. There are 9 different unit types and over a hundred different names. I need to find a way to make a table that counts however many times the name VACANT shows up for each unit type. Is this possible using a pivot table?

View Replies!   View Related
Refresh All PivotTable In Workbook
I am trying to run a macro inside a Worksheet_Change event.

Private Sub Worksheet_Change(ByVal Target As Excel. Range)
If Not Application.Intersect(Target, Range("Mon_Data")) Is Nothing Then
If Target.Value > 0 Then
Sub Refresh_PivotTables()
' Refresh_PivotTables Macro
' Macro recorded 10/1/2008 by JackChappers

as you can see, i put the macro within the worksheet_Change event so that, when data is changed on another sheet (target.Value >0), the Macro is run (the macro, by the way, refreshes some Pivot Tables).

The refresh Refresh_PivotTables Macro works on it's own, but when i use it like this, i get the message:

"Compile error:

Ambiguous name detected: Worksheet_Change"

If it makes any difference, i also have another Worksheet_Change event above performing another action. I think that may be the problem, if it is, how do i run them both without the error?

View Replies!   View Related
Hide PivotTable Columns
Hide values in Column layout on pivot table i only want to show th total value as its based on quarter figures not per month and this way it looks like Quarterly totals are broken down per month and has to have 200 a mont whenits in fact 200 for the complete quarter, how can i had the 200 for each of the month and just have the total per country? This is what my pivot table looks like

county Month Quarterly totals

UK June 200
july 200
August 200

Uk Total 200

View Replies!   View Related
Adding Columns Within A Pivottable
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 Replies!   View Related
Preserve Formatting In PivotTable
I have made a pivot table and in Pivot table option Merge labels for colum b. I the problem i am facing is once i give this the next colum text filed is automatically arranged in center. I want the next colum as left alignment. Once i delete some rows in the data then if i refresh it automatically align the next colum to center. I have given the preserve formatting as well as i have un selected the autoformat colum.

View Replies!   View Related
Simulate Drag Or Autofill
i need a macro that will simulate the little corner crosshair that you drag to fill in and increment formulas. i need to fill down on sheet 2, columns a thru m a number of rows equal to sheet 1,column b, count -1.

View Replies!   View Related
Drag Copy Formula Down
I have tried absolute and relative on the formula in A5 of this sample data below to get A6 to equal D2 and so forth down the sheet. Nothing works except typing in the formula for each cell....

View Replies!   View Related
Stop Drag And Drop Across A Row
How can I stop drag and drop across a row but you can drag and drop down a column.

View Replies!   View Related
Drag Formula But Skip Every Other Row
I am trying to link the cells up in a new workbook the problem is the data I need is setup in a way the formula needs to skip every other row.
For example:

View Replies!   View Related
Vlookup And Drag Down Cell
I would like cell D2 (on Sheet1) to default to the value of "EACH", unless the value is found on Sheet2 (column C). If it is found on Sheet2, then I want it to match the unit beside the respective upc code (see Col Q on Sheet1, and Col A on Sheet2) . Then I would like to be able to drag down cell D2 and all cells on Sheet2 would match and any that do not match, would be filled with "Each". Desired results are shown in attached example file.

View Replies!   View Related
Drag The Formulas In Columns
I have data from F1 to AG1...I am unable to create a formulae & drag in excel in a column like

=H1.....If i drag after is reflecting as

View Replies!   View Related
Drag A Macro Across Cells
is there any way where instead of selecting a cell one by one and run a macro, i can just drag the cell with the macro across other cells like how a formula runs?

View Replies!   View Related
Shortcut To Drag Down A Formula
i have a formula that needs to be dragged down 65,000 rows in excel is there a quicker way of do it than with the mouse?

View Replies!   View Related
Drag & Drop Between Workbooks
When I drag a text file from my desktop into an existing Excel worksheet it automatically creates a new workbook. I'd like to know how to modify this such that I can drop the file into my existing worksheet (and not have a new workbook create) and then run some VBA macros on it.

View Replies!   View Related
Error Extracting Pivottable Data With VBA
I try to extract datas from a pivottable (so one data source) which could change.

The items of one field are changing (given by the user through Inputbox): "batch"

The items of the second field ("type plate") are at each time visible (the macro make them visible to have the complete information concerning the "batch")

So I want to extract values and labels from one particular pivottable (the one I display), selecting several batches. But the problem is that some of the items have no value, so disapear fron the table) even if they are visible. As I extract the value on each item (see code below) I get an error message saying "runtime error 1004 application-defined" when the macro read "valeur".

Dim pt1 As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Dim pj As PivotItem
Dim i As Double
Dim valeur As String

I tried to go through this problem using "on error goto solution" but it works only one time, and after same error message

How coud I avoid to calculate "valeur" with the Items (pi) not displayed ?

View Replies!   View Related
PivotTable Error: Field Name Is Not Valid.
I successfully created two PivotTables two days ago, but when I added more rows of data to the source worksheet I could not refresh either PivotTable view. So after much frustration, I deleted both worksheets and again tried to create a new PivotTable using the wizard. I keep getting this error, and have no idea what it is telling me so that I can go about fixing it:

"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."

View Replies!   View Related
Sum Total Of Calculated Field In PivotTable
i have a database of monthly sales of a regional distributor and im using a pivot table to manipulate my data. i want to show only what account makes a positive sales for a specific product and i want to get the total number of accounts who have the positive sales. there are multiple entries in my database, the condition is if an account have positive sales of a specific product regardless on how many times the account bought the result should be 1 (meaning one buying account)

i've tried to use a calculated field in my pivot table, i get the correct result per account but when it comes to grand total its not getting the sum of the total number of accounts. here is the sample of what i need to get..

you can see that there are multiple entries but it shows only 1 per account when it has at least 1 positive sales of a specific product and 0 if it hasn't any sales/negative... and for the total it adds the number of accounts to get the total number of buying accounts..

View Replies!   View Related
Show All Items Of PivotTable Field
I have a section of code that takes SO long, but I have to have it. Bascially, I need a pivot field to be set to "All", but there HAS to be a faster way. Here's my

Sub FloorCompareSetter()
Dim pt As PivotTable
Dim pi As PivotItem
Set pt = ActiveSheet.PivotTables("PinPointPivot")
' Speeds up code dramatically
pt.ManualUpdate = True
'Set the floor comparison for managers, coaches, and reps
' Make sure all PivotItems along line are visible
For Each pi In _
pi.Visible = True
Next pi
pt.ManualUpdate = False
End Sub

Auto Merged Post Until 24 Hrs Passes;Also, note that I have used other techniques to speed up the process:

With Application
. ScreenUpdating = False
.EnableEvents = False
.Calculation = xlManual
End With

View Replies!   View Related
Tab Names In Formulas...drag And Paste?
I have a workbook which contains 12 sheets, 1 for each month of the year. I also have over 100 sheets, 1 for each agent that covers their stats for each month of the year based on some of the cells from the monthly sheets.

I am trying to drag the formulas over but it will always just refer to January, instead of January and then next cell refers to the February tab, etc, etc.

View Replies!   View Related
Drag Vertically And Copy Cells Across?
I am trying to link from one spreadsheet to another and drag the cells down to copy the forumula, however I want to drag vertically on Sheet 1, and Copy the values horizontally from sheet 2.

For example, in sheet 1 I link cell A1 to equal cell A1 in Sheet 2. If I drag down the formula in sheet 1 A1:A10 then it will copy the values in cells A1:A10 in sheet 2.

Now what I want it to do is for me to drag the formula in cell A1 down to A10 in sheet 1, but for this to return the values of A1:J1.

View Replies!   View Related
The Hyperlink To Increment As I Drag The Cells Downwards
I would like to copy a large selection of hyperlniks down a column of 200 plus cells and would the hyperlink to increment as I drag the cells downwards.

Is there a simple way to copy and paste down a large selection of cells, so that I do not have to edit each hyperlink individually

Have enclosed example.

View Replies!   View Related
Listbox Multiselect Drag & Drop
I've finally gotten the code down to drag an item from one list box and drop it into another listbox, but only for one item at a time. The list boxes are on a user form and I am using Excel 2002.

how to select multiple items in ListBox1, drag them to and drop them into ListBox2?

View Replies!   View Related
Range Stays The Same When I Drag The Formula!!
I want the range to stay as i put it without it +1 when i drag the formula down my spreadsheet, below is the formula im using (for a creche in case your wondering)

=IF(G5<A8,"Baby",IF(G5<A16,"Wobbler", IF(G5<A24,"Toddler",IF(G5<A30,"Playschool","Please use DD/MM/YYYY FORMAT"))))

G5, A16, is taken from a list of dates down the side so i need these to remain constant otherwise my formula goes out.

View Replies!   View Related
Drag Drop Treeview Node
I was trying to drag a node onto a worksheet and for that node to remain in the treeview control.

I have found out that if I hold the CTRL key then the node remains on the treeview.

Does anyone know how I can implement this action in my code so I don't have to keep pressing the control key?

View Replies!   View Related
Drag A Cell Without Adding To The Contents
I have an inventory sheet where I occassionally have to create more rows with the same information. So I will create rows and then copy and paste info into them. What I would like to do is be able to drag the information by clicking on the lower left corner and populate the cells that way. The problem is that if there is a number in the cell then it will automatically add to it. For instance, if I try to drag the contents of cell labeled klaraid 1112 then it will add incrementally to this in the cells below.....1113, 1114 and so on. If there are no numbers in the thing i'm dragging then it works fine. How do I drag cells with numbers without it adding to the contents incrementally?

View Replies!   View Related
Click And Drag A Cell Or Row Of Data
I understand how to click and drag a cell or row of data but is it possible to click and drag a group of rows of data? I have 12 rows of data that will repeat itself every 12 weeks. I can "save & paste" easily enough, but just curious if there is a way to click and drag 12 rows of data so that they remain the same for every group of 12 weeks.

View Replies!   View Related
Drag A Cell In Vba Using Relative Reference
I need to drag a cell using a macro and using relative reference.
i.e. drag activecell to activecell.offset(1,-1)

View Replies!   View Related
Drag & Fill Series Only In One Particular Sheet
I am not able to drag & fill series only in one particular sheet, in other sheets this function is working fine.

View Replies!   View Related
Allow Drag & Drop For UserForm Image
I am looking to if there is anyway to move an image box using a mouse drag and drop action. I have put together a little example of what I am trying to work with and was wondering if anyone on here had any tricks to make this work.

I realise the drag and drop method only applies to the textbox and listbox but have seen some old code that can simulate the drag and drop by creating a border of some sort to illustrate where the image box is going to be placed and final just setting the properties of that image box to where the border is placed.

In the example type in a size in the width and height textboxs (I used 3000,3000) and then what I want to do from there is move the white box using the mouse within the blue box.

View Replies!   View Related
Drag-and-drop To Trade Cells
I have a spreadsheet where I often have to exchange pairs of cells. I currently do this by dragging Cell A to a blank portion of the sheet, dragging Cell B to Cell A's former location, then dragging Cell A to Cell B's former location. I was just thinking that I might be able to use VBA to allow me to drag Cell A to Cell B and have them "trade places".

I don't even know what events are involved in the dragging process so I don't know where to start.

View Replies!   View Related
Drag Formula For Reference Change
Is there an easy way to drag all the references to a cell in a formula quickly e.g If i have a formula like this is;

=IF(A1>0, A1+1,A1-1)

and want to drag all the references to the cell A1 to another cell in one go as opposed to one at a time?

View Replies!   View Related
Breakdown Details Of Chosen PivotTable Item
Let's say I have pivot data in the form of:

| Major Category | Minor Category |
toys | balls |
toys | puzzles |
toys | blocks |
clothes | shirts |
clothes | pants |

I want to loop through every minor category and display it and its major_category on a different worksheet. (I'm doing more than this, but for simplicity sake ...

View Replies!   View Related
Prevent PivotTable Refresh Showing New Data
I have about 10 pivot tables that only have one Pivot Field Item Selected (i.e., Jane Smith) with dates as column fields and a sum for data items. Everytime I refresh the pivot tables and there is a new person in the data tab (which is the data the pivot table is referenced to), the new name populates in the pivot table. I am sure I could include all of the names in one pivot table, but there is a long explanation why I only keep one name per pivot table in this particular workbook.

Attached is an example. As you can see, when you refresh the pivot table, the new name (Jason Smith) which I added to the data tab, will be included in the pivot table.

I am trying to figure out if there is way either with VBA or without VBA to prevent all of the pivot tables in the workbook to not select any new Pivot Field Items when I refresh the pivot tables.

View Replies!   View Related
Changing Source Data Of An Existing PivotTable
I'm trying to change the source data of an existing PivotTable so that it is linked to a raw data source in another workbook. The workbook it pulls the data from changes every month so I made this flexible code that is meant to pull the raw data every month:

Sub ImportNewSource()
Dim Filt As String
Dim FilterIndex As Integer
Dim Title As String
Dim FilePath As Variant
Dim ThisPivot As PivotTable
Dim FileName As String
Dim ShtNum As Integer
Dim LastRow As Long

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.

When I do it manually, it works just fine. There aren't any changes to the PivotTable field or anything like that so I'm stumped. I've tested the range that has the source data and its selecting the proper range and when I do it manually it works fine.

View Replies!   View Related
‘The PivotTable Report Will Not Fit On The Sheet. Do You Want To Show As Much As Poss
Since I'm making a PivotTable with my macro, when it runs I always get this...

‘The PivotTable report will not fit on the sheet. Do you want to show as much as possible?’

I always choose yes, because in the end the user isn't going to use all of the data, they will be narrowing it down. Anyway, this comes up a few times througout the macro. Is there something I can put in the code that, if pop up box, always choose yes?

View Replies!   View Related
Multiple Condition Sum Across PivotTable & Another File Range
I need to find a value in a pivot table with a range of values over 12 months (Book5) when 3 criteria are met, Branch#, LOB# and Month#. Sum(if() works for the 1st month, but I do not know how to do the coding when the month changes.

Attached are copies of the two files I am working with and my coding so far....

View Replies!   View Related
PivotTable Total Cell Field Reference
What code can I use to reference the total cell at the end of a field called "Calls Offered" in the data area of a pivot table called "PivotTable2"?

View Replies!   View Related
Reformat Single Column Data For PivotTable
I have a worksheet of data collected from on online list of names and addresses all in one column. I'd like to pivot the data so I can sort it, etc. Unfortunately, the entries are not the same length (meaning some have five rows some have six or seven, etc. I have created an only file so everyone can see the issue.

a href=[url]

View Replies!   View Related
Pivottable Total Include Hidden Items
I am using Excel 200o to create a PivotTable but am having problems wiht the Totals. Is it possible to create a PivotTable that includes hidden items in the Totals (row)? I tried the Subtotal Hidden Page Items option but this seemed to do nothing to the Total or subtotal.

View Replies!   View Related
Don't Overwrite Existing Cells On PivotTable Refresh
When I use a macro to refresh all pivot tables, I get a whole bunch of messages popping up, asking me if I want to overwrite the existing cells. Is there a way that I can say no to all of these messages automatically?

View Replies!   View Related
Copyright © 2005-08, All rights reserved