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


Subtract Negative Numbers Within Pivot Table Data Field

Ive attached a spreadsheet showing what im trying to achieve. basically i have a scheduling objective, in which only a few slots (AA, BB, CC) are available. so the starting availability is fixed. for this example assume the starting values are 6,7, and 8 respectively. as 'bookings' are entered, im using the value of -1 against A, B, or C respectively, to indicate that AA, BB, or CC should be decreased by 1 unit of availability.

im trying to incorporate the subtraction within a pivot table. as you can see i am way off. the hypothetical formula logic that im trying to implement within the PivotTable would look something like this:

for A,B or C, sum all (-1) values for each instance of Date and Stage... this will give total bookings

add this total value to the starting values of AA, BB, CC respectively to get the new availability

View Complete Thread with Replies

Sponsored Links:

Related Forum Messages:
Subtract Positive And Negative Numbers
IF formula.

I am trying to subtract 2 numbers, and they are 4 different combinations of positive and negative numbers.

I wrote the formula as
=IF(A5*B5>0,IF(AND(A5*B54,458 2,367 (322)FALSE(1,277)1,751 FALSE

View Replies!   View Related
Use VBA To Change Pivot Table Data Field
Right, I have tried everything I can do (which is not so much) to achieve the following. Can someone please help?

I have a worksheet with about 300 rows of data. The columns are headed Name | Division | Department and then 8 different scores and a total score). I have created 7 different worksheets with pivot tables on them to display each division.

Now, here is what I would like to do. Each Pivot table should show the Name and 1! of the scores next to it. That is simple enough and works. But how do I create a macro that allows me to change which score to display based on the content of cell A1. I.e. If I write Effort in A1 I want the pivot table to show Name | Effort score. If I write Complexity I want the pivot table to change to Name | Complexity score.

View Replies!   View Related
Is There A Way To Add Text To The Data Field In A Pivot Table?
So i have a raw data dump that I need to put in a spacific reporting fashion. Excel pivot tables seems to almost do the trick. The problem is the information that I need to drop in the "data" field is text (peoples usernames) and when I drop it in I get numbers instead of names, and when I drill down on the number then I get the exact format I need but only for that line... Any ideas? I am using Excel 2000

If pivot tables will not work does anybody know of another was to get raw data in a mapping type of spreadsheet?

View Replies!   View Related
Pivot Table Field Not In Data Source
I am using pivot tables which were created by another (no longer contactable) and have found two fields in the field list which are not part of the source data i.e. neither are column headings but are used in the pivot table.

My questions are:

1. How are these field created?

2. How can I examine these fields for formulae (as I have found one of them returns an incorrect value)?

Field1 return a numerical value which is the difference between two columns
Field2 shows this as a % (but incorrectly)

View Replies!   View Related
Text In Data Field Of Pivot Table
I am struggling with data field in pivot table. Is it not possible to use strings in data field?

Here is a problem :-

A 11/1/2007 Y
A 11/2/2007 Y
B 11/1/2007 Y
B 11/2/2007 N
C 11/1/2007 N
C 11/2/2007 Y
D 11/1/2007 N
D 11/2/2007 N

Required op :-

11/1/2007 11/2/2007

I used pivot table to generate this output but in a data field I don't get strings; instead it shows 1 in place of Y/N.

View Replies!   View Related
Data Field Of Pivot Table To Go Across Columns
When i tried to drop another field into data field, by default, the new data field will appear below the field which was already in there. However, i would like the new field showing in an new column - horizontally - rather than showing in a new row.

For example:
Rather than the Pivot table appear like this:

Q108A 72
Q109A 64
____ B 73
____D 5

I would like the privot table present like the following format:

____ A_ B_ C_ D_
Q108 72 84 68 5
Q109 64 73 58 5

Is there setting I can change, so that the new field is added to a new column.

View Replies!   View Related
Macro To Add Data Field To Pivot Table
I've got a bunch of pivot tables with nothing in their data fields and I want to add two things to the data fields of each, but I keep getting this error as soon as I start my loop:

Run-time error ‘1004’: Unable to get the PivotFields property of the PivotTable class

Here's the code that is highlighted when the error comes up:

ActiveSheet.PivotTables("Master_" & Count).AddDataField _
ActiveSheet.PivotTables("Master_" & Count).PivotFields( Sheets("raw data"). Cells(1 + Count, 2)), _
("Sum of " & Sheets("raw data").Cells(1 + Count, 2)), xlSum

I recorded doing the first one by hand and it looks like this:

ActiveSheet.PivotTables("Master_1").AddDataField ActiveSheet.PivotTables( _
"Master_1").PivotFields("10/2 Spread"), "Sum of 10/2 Spread", xlSum

I don't understand why I'm getting the error because I added watches and my variables are all saying what I want them to say (Master_1, 10/2 Spread)...

View Replies!   View Related
Pivot Table :: Data Field Names And Growth %
I have excel 2007. My data sheet has columns for the sales for May 2009 and the sales for May 2008. Next to it is a column for the % growth between the 2 periods. When I put all this info into a pivot table and add the formula as below to the pivot table it shows the correct values for all the individual customers but not for the Grand Total line. Here it just shows a zero.

Can you also help so that the names on the data side of the Pivot table is the same as on your original sheet where it is reading the info from, and doesn't say "Sum of May 2009, but only says "May 2009".

Please show how you would work out the % Growth between the two different columns, as I tried it, and on the individual cell the data is correct but on the grand total line it shows it as zero and does not apply the formula.

I used the formula

=SUM('MAY 2009 H&B'/'MAY 2008 H&B'*100-100)

=sum(33,296,271 / 46,852,649 *100-100)

Result should be -29, but it shows zero

View Replies!   View Related
Hide Data Field Results In Pivot Table
I have used a pivot table with help from members here for a rota.

Now i am wondering if i can add a column to the original data which is hidden to times the number of hours worked by the hourly rate which is in another sheet.

The pivot table will be in an admin sheet with protected access so employees cant see it.

View Replies!   View Related
Copy Pivot Table Data To Worksheet & Name Them As Per Their Field Name
I've tried my best to describe my dilema. I import data in an SQL query from a mainframe. This data shows a job number, site address, job number and a length. Multiple lengths on the same site appear as separate entries. I use a pivot table to calculate a total length and also formulas to determine whether a site is in an East or West area. I then need to then be able to copy the 'East' jobs to an 'East' worksheet and the 'West' jobs to the 'West' worksheet. But, I only want a site to appear once with the total length.

View Replies!   View Related
Change/Move Pivot Table Row Field To Column Field
In building my pivot table my data that I want to show in the column area is showing up as rows stacked on top of each other. In the column section I'm trying to show Total Budgeted Amount next to Total Actual Amount but on the layout it's showing the two stacked on top of each other is there some kind of hidden key that I'm missing?

View Replies!   View Related
Pivot Table - Subtotal Of Negative Values
I have data in a pivot table that has some positive and negative values. At the end of the Pivot Table, it sums the values for each month and then a grand total.
I would like to also have it show the summation of all negative values per month. So it would be:Jan Total
Jan Negative Total
Feb Total
Feb Negative Total
Grand Total
Grand Negative Total
Is it possible to add such functionality?

Image for reference:

View Replies!   View Related
Pivot Table Field Lists
I have a pivot table Field, with 3 listed items, referencing data from 3 separate worksheets - named 2004, 2005, 2006. ( i renamed them from the original item1, item2 and item3, to 2004, 2005 and 2006. I have now redefined the range in worksheet 2006 by using the Pivot table wizard and going one step back. I have now got 4 listed items in my Field - 2004, 2005, 2006 and item4. I cannot rename item4 to 2006 unless I delete 2006. But do you think it's letting me do that???? So how do I remove unwanted items in a Pivot table field list?

View Replies!   View Related
Pivot Table Field List
on the pivot table field list-enable on the right hand side of the screen, only after that the needed fields can be dropped in.

Is there any other method to draw the pivot table?

View Replies!   View Related
Pivot Table/Calculate The Field
I have attached a simple test file. The data tab has two columns in the pivot range. The third column is _not_ in the pivot range, but is there to show the result I'm trying to get with the pivot.

The idea is to count the number of people whose entry dates are greater than 2/1/2009. My third data column gives a correct result, but a similar formula in the calculated field of the pivot table gives a completely wrong result (a date), where my goal is to generate a zero, a one, or a sum of zeros and ones.

It could be a formatting issue, but that would not explain why all the pivot results have the _same_ wrong answer.

I'm new to PTs and calculated fields, and expect I've made a naive mistake that an expert could easily spot.

View Replies!   View Related
Pivot Table Add Page Field
I know in Pivot tbale we could add calculated field into the data ,but I fail to put the added in the "Page","Row" or the "Column". Eg. in the sheet of data,I have a column " DATE",but no column for year.Is it possible to add year in the "page" without adding anything into the "data" sheet?

View Replies!   View Related
Inserting Field In Pivot Table
I have a pivot table that picks up the month an invoice was generated. Since I have several invoices for a few months in 2005, I would like to sum all the 2005 invoices into one column. I have the impression that I can insert a field within a Pivot table to sum all the amounts related to 2005.

View Replies!   View Related
Pivot Table Automatic Field Amendment
I currently have a pivot table linked into a excel query. This pivot table is refreshed everyday and looks at the following data:-

PAGE - Username
ROW - Date
DATA - Output

What I need to do on a regular basis is select the pivot table field Username and hide specific staff which are new to the table.

My question is can i create a code which will only show usernames from a given range e.g. Sheet 1 A1:A10 in this field?

View Replies!   View Related
Show Field Contents In Pivot Table
Can I do something so my pivot table shows Manager name in all appropriate cells (eg. agomes is A3:A4 and bschaefe in cells B5:B13)? ........

View Replies!   View Related
Adding A Pivot Table Field With RANK
I have a PT with multiple data fields that I want to Rank individually and then give those ranks a weight percentage. Once I have that weighted rank, then I can sort PT items based on the rank .....

View Replies!   View Related
Pivot Table Field List Doesn't Appear
The field list does not appear when I create a pivot table in Excel 2007. It works properly if I start Excel in safe mode. I have toggled the field list button in the PivotTable Tools show/hide ribbon and I tried repairing Office 2007 from the control panel.

View Replies!   View Related
Inserting A Formula In PIVOT Table Field.
inserting a formula in PIVOT table field....

View Replies!   View Related
Add Range To The Page Field Of A Pivot Table
I have created a system where users input data from a report into a spreadsheet, and after input it is sent off to various other workbooks depending on what was entered. I.e. The user is inputting test data on a location in a region. The regions make up the workbooks, and each location is a worksheet (While I can think of better ways to organise the data changing this is not an option here).

When the macro encounters a location in a region that hasn't been entered before it adds a new sheet based off the name of the location in the region's workbook, and creates a new named range for that sheet.

I'm running a pivot table in the central workbook, and I want to add the new named range to the page field when I create a new sheet. This is what I don't know how to do. EDIT: To clarify, the page field is choosing between which worksheet(via named range) is being shown currently.

View Replies!   View Related
Change Page Field In Pivot Table Without VBA?
Is there any way how you can change value in page field in pivot table using formulas? I know this can be done with couple of lines of VBA, but I need to create VBA-free excel file.

View Replies!   View Related
Clear Old Pivot Table Field Names
I am having a problem with Excel Pivot Tables using 'old' field names for new data that has replaced older data. i.e. i will type over data in a column but on the drop down menu's the old 'names' still appear but the new ones to not'

I have had an extensive search and am familiar with (and use) the 'clear old items' macro. Whilst this macro does work it is not helping me as the items in my drop downs do not need to be cleared but their names changed to my new data. The only way i can seem to get round this is to delete and re-create the pivot table from strach - very time consuming.

View Replies!   View Related
Pivot Table: Adding A Percentage Field As '% Of Subtotal'
In the attached Excel file, there is a pivot table.

In the Data part of the table, there are two columns. The second is the exact same field than the first one but expressed as percentage (Field settings/Options/Show field as "% of" + "Total".

The problem is: I don't want to express this field as a % of Total ('Grand total') but rather as a % of Subtotal (e.g. Danemark Total).

View Replies!   View Related
List Values From Excel Pivot Table Field
I have a Pivot Table with pivot fields and data. I would like, through VBA, to get the list of values that can be chosen from a given pivot field.

For example, a list would be Product1 / Product2 / Product3 .... I would like to read that list and put it into a drop down list in a form.

GOAL: I have several Pivot tables on the same sheet with similar fields and I want through macro to allow the user to update them all with one click.

View Replies!   View Related
Pivot Table Display Field Date On Each Line
I'm making a Pivot table and i'd like that the different field will be displayed on each line.

here is an exampe of what i have and what i want to have

______Group____Average age

Result needed

______Group____Average age

Where can i found the option to edit? if it's possible.

View Replies!   View Related
Pivot Table >>Field Settings >Subtotal = Automatic
I create a Pivot Table in Excel 2003, excel by default puts the field settings for each of the columns to Automatic, creating a Total for each aggreate column, which is very annoying.

I have to manually go in in each field and change field settings > None. for each column, since no copy and paste special function to make all the columns have same subtotal >none.

View Replies!   View Related
Capture Which Pivot Table Field User Changed
I have a code that i want to run after an item in a page field on a Pivot table is changed. I have put the code in the PivotTableUpdate event. However I would like the code to run only if the user changes an item on a specific page field i have set up on the pivot table layout.

So, if I have 2 page fields on my pivot table pf1 and pf2 :If the user changes an item in pf1 the pivot table data changes but my code within the PivotTableUpdate event doesn't runIf the user changes an item in pf2 the pivot table data changes, my code detects this page field has changed, and my specific code runs.

View Replies!   View Related
Listing Pivot Table Field List Fields
Is there any code or way to generate the compete list of fields that are selectable from the " PivotTable Field list"?

I have various cubes I need to check and compile the list of fields for each.

View Replies!   View Related
Dynamically Sort Generic Pivot Table Field
Is there a way to generically sort all pivot rows of a pivot table alphabetically each time the table is refreshed? I have a pivot table that pulls its data from a dynamic named range on a separate worksheet. As users add data to the range and refresh the pivot table the newly added items appear at the bottom of the table rather than alphabetically. I know how to specifically call out a pivot row and have it sort alphabetically (see code below) but I still want to allow users the flexibility of changing the fields and order of the pivot rows so specifically calling out a pivot row by field name isn’t going to work. I need to somehow add code that says: For each pivot row (1 to n, where n = number of pivot rows) sort each in alphabetical order.

ActiveSheet.PivotTables("ptDWDM").PivotFields("Project Name").AutoSort _
xlAscending, "Project Name"

So in the above code I don’t want the reference to “Project Name” to be hard coded.

View Replies!   View Related
Print Pivot Table Results Page Field ...
i have pivot table that has a field called "supp" is it possible to write a macro that will open up the "supp" drop down box select the first result .print the results of the pivot table. then goto the next selection in the same drop down box and print them results . repeat this until allresults have been printed.

when the pivot table is run weekly the results in the field "supp" will change

View Replies!   View Related
Print Pivot Table Results Page Field
in my Pivot Tables page field i could have 20 results. 10 could be customer identification codes
5 material codes, 5 a different material code, i called "inter", and the rest supplier codes, example i05,i05/1,i05/2, fo1,f01/1,f01/2 are both material codes,

what i want to do is have a macro /macros to select and print groups
as follows

1. (all)
2. inter
3 any containing the words i05 and f01 which includes i05/1 etc
4. then the rest

if any does not exsist ignor. if possilbe a macro for each or a drop down box to select

View Replies!   View Related
Macro Resetting Pivot Table Field To Count
I've recorded a macro that clears a worksheet, fetches data from an Access Table and then creates a new pivot table. The Pivot Table Fields are summarized by "sum" and this worked the first few cycles for the macro. Now it is returning the Pivot Table Fields summarized by "count". Can an option be inserted into the existing code to specify "sum"? Here is the

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"'raw data'!R1C1:R205C12").CreatePivotTable TableDestination:="", TableName _
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet. Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
ActiveSheet.PivotTables("PivotTable14").SmallGrid = False
ActiveSheet.PivotTables("PivotTable14").AddFields RowFields:=Array("Name", _
With ActiveSheet.PivotTables("PivotTable14").PivotFields( _
.Orientation = xlDataField
.Position = 1
End With..................................

View Replies!   View Related
Split Pivot Table Field Into Seperate Sheets & Not Allow Drilldown
My goal is to macro the creation of pivot tables into seperate worksheets based on each particular record in the "Office" (location). Ultimately, I will apply an email macro to send out each pivot table (and source data if necessary) to various recipients. I need to make sure that each recipient of a pivot table is limited to only drill into the detail for their particular "Office" and not able to view other location's information in the Source Data worksheet--is this possible, or do I need to create separate source data worksheets for each Office's pivot table in order to limit the viewing?

Items I need guidance on:
Creating a macro to breakout pivot tables into seperate worksheets based on "Office" locationPlease advise on how I can secure Pivot Tables so that the user can only drill into the information originally presented in the pivot table they receive and will not be allowed to view all of the source data.
Please find attached a file with my source data and an example of a pivot table for one of the Office locations (Chicago).

View Replies!   View Related
Print Linked Chart & Each Page Field Of Pivot Table
I have linked a graph to update from a pivot table. I would like to print a copy of a graph and pivot table for each item in the page field.
Can a macro loop through each page field and print?Is there a way to send them to the printer all at once? (I noticed the printer hangs when manually printing page by page)

I've tried "view all pages of pivottable" but then I lose the view of the chart. I tried recording the events but the number of items in the page field changes with each data update and I'm not sure how to write code to accept this.

View Replies!   View Related
List Values In Pivot Table Page Field Dropdown
I want to print one sheet for each of the values in a page field drop-down. I can do this by supplying the values individually (code below) but would rather determine the list of values dynamically. Can this be done?

Private Sub pbPrintAll_Click()
Dim cix As Integer
Dim Ctrct As String
cix = 3
While (Sheets("Database"). Range("B" + Trim(Str(cix))).Value <> "")
' Get value from database sheet
Ctrct = Sheets("Database").Range("B" + Trim(Str(cix))).Value
' Set CurrentPage value
Sheets("Customer P&L Pivot1"). PivotTables(1).PivotFields("Cust 1A_Name").CurrentPage = Ctrct
' Print formatted sheet
Sheets("Customer P&L").PrintOut
cix = cix + 1
' Reset Current Page value
Sheets("Customer P&L Pivot1").PivotTables(1).PivotFields("Cust 1A_Name").CurrentPage = "(All)"
MsgBox "Prints sent to printer."
End Sub

View Replies!   View Related
Pivot Table Query: Make A Pivot Table To Summarise The Data
attached is a spreadsheet 6 people in my area use daily(ive copied and pasted the sheet in question to a new worksheet, as the file was too big). Ive been trying for about 3 days now to make a pivot table to summarise this data.

View Replies!   View Related
Getting A "blank Field" In My Pivot Table
I'm using for my pivot table so I always end up getting a "blank Field" in my pivot table.


Col A

PswordTeacher MonthInfractions
2350538Obama h)Feb1
2350538Obama i)Mar1
2350538Obama j)Apr7

So when the above offset function is applied, it picks up the above 4 fields PLUS it adds a blank row to the bottom so it is actually picking up 5 fields.

View Replies!   View Related
Rounding Numbers In A Pivot Table?
Is there a way to use a rounding function with a Pivot Table.

View Replies!   View Related
Data Validation With Negative Numbers
I want to use Data Validation on a cell (H1) to only allow the value entered to be values between values in E1 and D1. E1 is a negative number.I tried naming E1 & D1 as a range (valid) and then did custom validation formula is =valid, but that allows me to put in anything.

View Replies!   View Related
Pivot Table " Cal Field " How To Get %
I hv make use of pivot table cal filed to get the profit in % variable.

my formula of profit in % = profit amt / sales.

when i get the result , only problem is the profit in % colume does not give me the result in %, i need to manually change.

it there any way i can set it in pivot table.

when i set the cal filed = profit amt / sales * 100% , i get 2 , but i want it to show 2%.
when i set the cal filed = profit amt / sales , i get 0.02 , but i want it to show 2%.

View Replies!   View Related
Formula To Make Product Of Two Negative Numbers Negative
I have a large dataset (24000 rows) that requires me to multiply two different columns of integers. In some cases, the two integers are both negative and multiplying them results in a product that is positive. I actually need that product to be negative rather than positive. I can't quite seem to figure out the best way to accomplish this.

View Replies!   View Related
Show Numbers Greater Than An Amount In A Pivot Table
Is it possible to just show numbers greater than an amount in a pivot table?

View Replies!   View Related
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 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 ?

View Replies!   View Related
Convert Negative Numbers With Negative Sign On Right
I have data that comes from a subsytem that places the negative sign at the right of the number, so it is recognized as text. I can get around this using find and replace and then a second step to multiply that by -1, but is there a formula that can do this for me?

I was trying if(right(A1,1)="-",TBD,A1)

View Replies!   View Related
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
SERVICENAM12-oct10-déc11-décGrand Total
Commercial-laura Totalgh11

custody-jonathan Totalgh1113

settlement-ludovic Totalgh11

SPQC-elodie Totalgh112

Grand Total1337

View Replies!   View Related
Create Pivot Table: Cannot Open Pivot Table Source File
I'm trying to write a macro that will create a pivot table, and am getting an Error code 1004: Cannot Open Pivot Table Source File "Sheetname". My code is below. I've tried to note what each section does, and it all seems to work well except for the Pivot Table creation.

View Replies!   View Related
Reference Cell & Add Amount If Positive & Subtract Amount If Negative
Im trying to set up an active running inventory sheet where: (A)the progressive daily sheet cells reference back to the corresponding master sheet cells fluctuating the master values, (B) the same progressive daily sheet cells reference back to a cummulative totals-cell based on whether I added or subtracted inventory. I want to make a copy of the blank "sheet 2" with all of the formulas and move it to the end of the workbook each day and enter new values which will reference back to the master sheet so that I can click on a date sheet and see an individual day's values or click on the master sheet to see the fluctuating inventory on-hand and the cummulative +/- totals of all days combined. I've got a couple hundred individual cells to reference. I've tried and tried but I can't make it work. Heres what I need to do:

I need to reference individual cells from "sheet 2,3,etc" back to a corresponding cell in a master sheet. But I need the values in each cell in "sheet 2,3,ETC" to increase or decrease the corresponding cell values in the master sheet. For example: If the value in the master sheet B5 is 200. Then in sheet 2, I enter +50 in B5, I need the master sheet cell B5 to increase by 50 to 250. I also need a way to decrease the cell value in the master sheet B5 if I enter a negative value -50 in sheet 2 B5. I also want to know if I can reference the same cell values entered in "sheet 2,3,etc cell B5" back to totals columns C5 for adding inventory or D5 for subtracting inventory in the master sheet where the master totals columns would reflect cummulative totals added or subtracted. For example: if the value in sheet 2 B5 is +50, then the value in Master sheet C5 would add 50 to a progressive total. But if the value in sheet 2 B5 is -50 then the value in master sheet D5 would add -50 to a progressive total.

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