Excel 2007 :: Sorting Pivot Table Columns By Column Field Label (date)

Jun 30, 2014

I have a pivot table with multiple row fields and multiple column fields. One of the column fields is a Date and I need some VBA that will auto-sort the columns into ascending order by the Date column field.

E.g., if the first four column labels are "2-Jun-2010, 13-May-2009, 16-May-2013, 17-May-2012" then i want the sort to arrange them as "13-May-2009, 2-Jun-2010, 17-May-2012, 16-May-2013".

Note: This is the left to right order of the columns i'm talking about, not the top to bottom order of the rows, or the data in the rows but specifically the column labels.

I've tried googling a solution and I can find a variety of code that deals with sorting the data in the rows in all sorts of ways, but nothing on how to order the columns.

i'm using excel 07, and the source data for the pivot table has the Date field formatted as custom "dd-mmm-yyyy". This can be changed if necessary.

View 5 Replies


ADVERTISEMENT

Excel 2007 :: Calculated Field To Get Percentage Of Two Columns In Pivot Table

Oct 2, 2013

I'm having an issue getting the correct results from a calculated field in a pivot table in Excel 2007.

In column A I have "Business Name", in B I have a sum of the amount of lines a customer has, and C is a MAX of the number of employees the customer has at their location.

In one example I have a business with sum 50 lines and max 30 employees but when I try to make the calculated field 50/30 (should equal 166%) i get 9.2% instead.

The reason appears to be because there are 18 types of lines the customer has and 18 x max 30 = 540 and 50/540 is 9.2%. In the attached example it's all the same business location so the total number of employees (30) is the same for each row and each row in the raw data is a set of lines with similar features.

I attached an example. CalcFieldProblem.xlsx

View 1 Replies View Related

Excel 2007 :: Source Date Sorting Into Format Used For Pivot Table / Chart?

Sep 24, 2011

I am stuck trying to sort data that looks like the following, into a format that I can use as source data for pivot tables/charts.

Excel2007ABCDEFGHIJK2MalayMalayMalayMalayMalayMalay
ChineseChinese3MaleFemaleFemaleMaleFemaleFemaleMaleMale
436-4536-4536-4525-3525-3525-3536-4536-455
DateArticleContentLapseCurrentCurrentCurrentLapseLapseCurrentCurrent612-SepRelieving 40 years - Oct 15, 1972
Thick Haze continues to blanket MalaysiaHistory42712-SepRelieving 40 years - May 5, 1972
All Sharifah wants is a pair of legsHistory1222812-SepA man and his agonyHistory3223912-SepA lesson on Sept 16History22Sheet2

I will need to group Data multiple ways. However, I cant work out a good way to sort it. Can I have a suggestion on layout that I will be able to arrange data appropriately.

View 2 Replies View Related

Excel 2007 :: Pivot Table Calculated Field

Mar 19, 2009

I believe that I am finally getting the hang of pivot tables and VBA ... pretty nice. Now for my latest frustration - calculated fields.

I have a pivot table created which compares two years of data. The problem seems to be that this data is from the same data field (PINSAL) even though it shows in two columns (year 2007 and year 2008).

1 - I need to subtract the 2007 figure (column C) from the 2008 figure (column D) in a calculated field called DollarVariance

2 - I need to divide DollarVariance into the 2007 figure to create a calculated field called PercentVariance

This seems easy to do if I had two different variables used to create the 2007 and the 2008 data but it is the same datafield. Can I use column letter? Can I use the column name assigned by the pivot routine (12 - 2007 and 12 - 2008)?

View 9 Replies View Related

Excel 2007 :: Pivot Table - How To Display And Use A Field

Jan 26, 2012

I have a table of data which I am analysing in a Pivot Table. For the majority of the data, the Pivot works very well: however I have a small issue, but it subsequently means the Pivot is useless.

Within the table array that I am referring to, there is a column of data of "Days per employee for a given period". The rows of data within the table array relate to every absence entry per employee, but this final column of data always contains the same figure (although can differ from employee to employee).

When I put the data into the Pivot, I can summarise the absence(s) as a simple sum. However, this final column of data should not be summed, since it is already the sum figure.

This figure though needs to be part of the Pivot, since I need to report on the percentage of absence days per type over the given period. So, the simple representation of =absence day(s)/worked days does not work... well I cannot get it to work. Additionally I have tried features like % of, but nothing.

I am using excel 2007.

View 5 Replies View Related

Excel 2007 :: ERROR - Pivot Table Field Name Is Not Valid

Nov 3, 2012

Excel 2007

No empty rows
No empty cells
No calculations in cells

Field names look fine - no punctuation no merged cells

If I select one column - any single column I can generate a pivot table but not with multiple columns

View 4 Replies View Related

Excel 2007 :: Pivot Table Calculated Field With Reference

Nov 18, 2012

I have a set of sales data and need to create a run rate which is simply = Total Sales/Selling Day

Selling day changes most days.

I put the calculation into my pivot data but it's summing up, (instead on 12 I get 720) so I changed this to Average so I get the right figure in the Pivot but when I then use this field, it doesn't use the Average amount, it uses the summed figure.

So what I need is Total Sales/X

X = Cell Reference

View 2 Replies View Related

Excel 2007 :: Sorting Names In Pivot Table

Jan 3, 2012

I have created a pivot table using a family name in row labels. The names appear in alphabetical order unless the person's name is the same as a month or day of the week. The result is that I have Mr Sun and Mr May at the top of my list, rather than listed alphabetically. Sorting the list does not solve the problem. It switches Mr Sun and Mr May, but does not included them in the main list. Is there a setting I can use that will stop Excel 2007 thinking that these words are something that they are not?

View 4 Replies View Related

Excel 2007 :: Pivot Table - Daily And Monthly Field Grouping

Oct 17, 2011

I'm using Excel 2007 and am having an issue with grouping/ungrouping fields in pivot tables.

I have 2 separate pivot tables, both from the same named data source, but summarizing different data selections. Both tables include the date field, I am trying to produce both a daily and a monthly table, but whenever I change the grouping/ungrouping of the date field setting on one table, the other table changes to the same grouping.

Is there anyway to have one table with an ungrouped date field and one table with the grouped to month date field?

View 1 Replies View Related

Excel 2007 :: Formatting Pivot Table Field To Days / Hours And Minutes

Jun 19, 2013

I have data sheet that has a field minutes. I a pivot table I have the Average Minutes per category. How it the pivot table can I show the Average minutes as Days, Hrs, Minutes? I am working in Excel 2007.

View 1 Replies View Related

Excel 2003 :: Pivot Table With 1 Row And 1 Column Field

Dec 3, 2012

I have:

Excel 2003ABCD1StockDatePriceReturn2MSFT31-Dec-1027.91-6.97%3MSFT31-Dec-093054.32%4MSFT31-
Dec-0819.44-45.39%5MSFT31-Dec-0735.619.22%6MSFT29-Dec-0629.8614.19%7MSFT30-Dec-0526.15-2.13%8MSFT31-
Dec-0426.72-2.37%9MSFT31-Dec-0327.37111.84%10MSFT31-Dec-0212.92-21.98%11MSFT31-Dec-0116.5652.77%12MSFT29-

[Code] .......

and would like:

Excel 2003ABCD1Sum of ReturnStock2DateBAINTCMSFT331-Dec-970.83851.14150.5659431-Dec-98-0.33350.68793.2921531-
Dec-990.27041.77732.3668629-Dec-000.59270.4606-0.6286731-Dec-01-0.41240.04620.5277831-
Dec-02-0.1493-0.5049-0.2198931-Dec-030.27741.05841.11841031-Dec-040.2285-0.2702-0.02371130-

[Code] ...........

Code:
Sub codedPTable()
Dim pt As PivotTable
Dim strField As String
Dim WSD As Worksheet
Set WSD = Worksheets("Data")

[Code] ..........

Only prints this:

Excel 2003ABCDE1Sum of ReturnStock2BAINTCMSFTGrand Total3Total1.99894.69867.331214.0287Sheet2

If you have a more compact macro than what I tried to change above even better (the data is in the simplest testing format).

View 4 Replies View Related

Excel 2007 :: Pivot Table - Max Number Of Columns?

Nov 9, 2011

I'm using Excel 2007. My pivot table seems to be limiting me to 256 columns in the Values/Data area. In researching below I believe that I should be able to have 16,000 columns in my Pivot Table.

[URL] The "Big Grid" and Increased Limits in Excel 2007

PivotTables Maximum rows displayed in a PivotTable report is 1 million.
Maximum columns displayed in a PivotTable report is 16,000.
Maximum number of unique items within a single Pivot field is 1 million.
Maximum number of fields visible in the Fields list is 16,000.

View 7 Replies View Related

Adjust Column Label Selection Multiple Pivot Tables Based On One Pivot Table

Aug 16, 2013

I have a pivot table in the first sheet which includes the field "Date" as a column label.

In the remaining sheets, except for one, there are pivot tables based on the same underlying dataset which also include the field "Date" as a column label.

I would like to adjust the selection (i.e., exclude some dates) from the column label in the first sheet and see if it is possible to make the same adjustments automatically to the pivot tables in the remaining sheets as well.

note that the field "Date" is used as a Column label, i.e., it is not a Report filter.

View 3 Replies View Related

Change/Move Pivot Table Row Field To Column Field

Apr 23, 2008

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 3 Replies View Related

Data Field Of Pivot Table To Go Across Columns

Oct 17, 2007

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
____B84
____C68
____D5
Q109A 64
____ B 73
____C58
____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 7 Replies View Related

Pivot Table Calculated Field Based On 2 Columns?

Jun 9, 2014

I have a Table with 2 columns "Due Date" and "Completed Date". The pivot table from the table gives the count of each column. I want to have a calculated column giving the % complete, ie. "Count of Completed"/"Completed Date"*100. When I attempt to create this formula (using Pivot Table Options > Fields Items and Sets > Calculated field), I get a DivZero error, even though both columns are not zero. How do I create such a calculated column?

View 3 Replies View Related

Pivot Table Not Sorting By Date

Dec 27, 2012

I have a birthday list with name, client, birthday. I want to create a pivot table that groups by month. Report layout is tabular. Then within that month, name, client & birthday (in date order). So my end result would look like;

January Jim Jones Company 1/4
Then rest of January names 1/15

Etc.

Right now, I can't get the birthday to sort by date within the month.

View 1 Replies View Related

Pivot Table And Date Sorting?

Jun 12, 2014

I am having the hardest time trying to get my pivot table to sort right. I downloaded data over a 7 year period and its sorted by months (January-2005 etc). The issue I am having is excel is putting it into this format

January-2005 January- 2006 ......... February - 2005 February-2005.

I need it to sort chronologically

jan 2005, Feb 2005, March 2005...... Jan 2006, Feb 2006 etc.

What do I have to do to get this fixed. I would rather do not have to do it manually each time I need this type of data.

View 3 Replies View Related

Pivot Table Display Field Date On Each Line

Nov 16, 2005

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
Man_____1_________16
_________2_________22
_________3_________25
_________4_________33
_________5_________48
Woman__1_________16
_________2_________22
_________3_________25
_________4_________33
_________5_________48

Result needed

______Group____Average age
Man_____1_________16
Man_____2_________22
Man_____3_________25
Man_____4_________33
Man_____5_________48
Woman__1_________16
Woman__2_________22
Woman__3_________25
Woman__4_________33
Woman__5_________48

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

View 9 Replies View Related

Excel 2007 :: Lookup To Return Column And Row Label?

Jun 13, 2013

I have the below data. I'm trying to create a lookup that would return the Month and Year in another cell. For example, I have in another cell the min of all the data, I want to get the month/year in the cell below it with lookups. I've tried INDEX/MATCH, but not getting the results I want.

Excel 2007ABCDEFGHIJKLMN3JanFebMarAprMayJunJulAugSepOctNovDecYTD420134.47 (0.35)0.86 4.98 520121.27 (2.29)(0.27)1.55 4.61 (2.33)2.07 1.38 0.62 (0.60)2.50 0.12 8.63 620111.41 3.69 3.97 2.49 2.06 3.14 (2.97)5.83 (1.26)(1.30)0.34 (0.36)17.04 720103.34 2.24 1.59 (0.33)7.70 0.63 (0.26)2.00 2.78 2.81 3.01 7.96 33.47 820098.51 3.12 (1.95)(7.30)7.91 8.94 2.90 0.41 0.66 0.67 1.39 3.10 28.36 920084.09 1.60 6.83 8.65 4.42 6.79 11.01 8.16 1.03 18.41 17.74 7.01 95.74 1020072.08 (0.62)6.02 (0.30)4.74 (2.28)4.04 (1.12)1.29 0.89 11.58 1.79 28.11 1120064.87 (1.83)4.56 5.04 2.19 0.53 3.55 6.00 (0.68)2.76 2.82 4.74 34.55 1220052.43 3.17 1.71 4.44 5.78 5.84 (2.61)5.21 0.04 6.34 1.87 5.76 39.98 132004(0.22)4.98 2.86 (0.52)4.80 3.22 3.45 1.97 2.77 2.61 25.92 Portfolio Summary

View 9 Replies View Related

Sorting By Company And Date In Pivot Table

Feb 1, 2008

I have attache a file to use as a reference, the real file is over 10 000 rows long.
What I need is to be able to quickly make a summary of each company within a certain period (let's say monthly) and be able to calculate the sub total of the GST column. Every report that's created than needs to be saved and put into a seperate file e.g 'TFQ Sep 07'. I understand I need to use a Pivot Table but can some one just give me quick example of how I would do this?

View 2 Replies View Related

Excel 2007 :: Sorting Only Part Of A Table

May 11, 2014

I'm selecting only some rows in a Table trying to sort only these rows (e.g. rows 11 thru 75 in a 200 row table), but when I hit Sort Excel always overrides my selection by selecting all the rows in the table instead. The same thing happens in VBA. I'm using Excel 2007.

View 12 Replies View Related

Excel 2010 :: Pivot Table - Value Field - Multiply

Apr 25, 2014

I have a Pivot table showing costs of several types of items.

The issue is, the cost of an item is not in U$, it is in amounts of the unit value (example: Unit value of an item (cell A1) = U$500, and Item Cost (cell B1) = 2, the total cost is U$1000).

So instead of showing just the Item Cost (U$500) in the pivot table, I need to show 500*2 (A1*B1) which would be U$1000.

Can this be done in Excel 2010?

I don't want to create a new column with that multiplication, because I'm doing a monthly cost for the items.

View 3 Replies View Related

List Values From Excel Pivot Table Field

May 13, 2003

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 9 Replies View Related

Excel 2007 :: Sorting Across Columns

Oct 3, 2011

Excel 2007 - Sorting across columns

Need to sort part of an Excel worksheet across multiple columns.

For example data is:

ABCDEF1
Machine
4394264394294394434399834399842
Model
TD860TD400TD860TD620TD6203
Pgm
OPTABCOPTEP2EP24
Start
5/31/119/1/115/1/096/15/092/1/085
End
2/28/158/31/125/31/114/30/108/31/09

I need to sort it first by Pgm, within Pgm by Model, and within Model by Machine. I do not need to sort on Start or End

The results should look like:
ABCDEF1
Machine
4394294399834399844394264394432
Model
TD400TD620TD700TD860TD8603
Pgm
ABCEP2EP2OPTOPT4
Start
9/1/116/15/092/1/085/31/115/1/095
End
8/31/124/30/108/31/092/28/155/31/11

After selecting the data to be sorted (columns B,C,D,E,F), I tried using "Sort Left to Right" under DATA-SORT-OPTIONS but it doesn't seem to work.

View 3 Replies View Related

How To Keep A Column Visible When Collapsing A Field In Pivot Table

May 21, 2013

I am collapsing a field in my pivot table and it is hiding all detail behind it. The column that precedes it is a description of the account number. How do I keep the description visible when collapsing a account number.

View 1 Replies View Related

Excel 2010 :: Pivot Table Sorting With VBA?

Apr 10, 2013

Using Excel 2010

I have a workbook with multiple sheets.Sheet1 is named "UPC" and is a giant database for my workbook containing 80,000+ rows and 12 columns.

Sheet2 is named "Scan" and uses a bunch of index-match formulas. Basically, you scan a barcode and it auto-populates across the row all the information it pulls with that particular UPC from the "UPC" sheet. One of my columns, "QTY Scanned", in the "UPC" sheet has a countif formula to keep track of how many times that item was scanned on the "Scan" sheet.

Sheet3 is named "PSlip" and has a big button on it that you press and multiple macros go into overdrive. First macro takes all the rows from "UPC" with a quantity greater than 0 in the "QTY Scanned" column and copies it to the "PSlip" sheet.

Second macro takes that data and makes a pivot table.This is all clothing, pants, shirts, jackets, etc...When my pivot table is created, my Column Label is Size. When the pivot table is created, it automatically sorts it in ascending order, so it goes from numbers to letters.

This is great for pants because the size is in reference to a waist size; 24,25,26,27, etc...

HOWEVER, shirts, jackets, and other tops are not in a numeric size: they are in a Text format. XS, S, M, L, etc...

Sometimes we only scan pants for an order, sometimes only tops, sometimes both.

Is there a way for the pivot table to recognize when tops are in included and automatically sort the sizes?

I still want the numeric values at the beginning, but once the text starts it automatically sorts in this order:

XXS, XS, S, M, L, XL, XXL, MT, LT, XLT, XXLT, 1X, 2X, 3X, 4X, 5X

View 2 Replies View Related

Excel 2013 :: Power Pivot DistinctCount If Another Field In Table Is Greater Than Zero

Apr 21, 2014

Using Excel 2013.

I am trying to get DistinctCount from a field if another field in the same table is greater than zero.

PowerPivot DAX -COUNTIF

[Code] .....

The count returned includes all not just values greater than zero. How can I get just values greater than zero?

View 1 Replies View Related

Excel 2003 :: Can Index Through Pivot Table Page Field List?

Nov 1, 2011

I've created a pivot table and I'd like to index through each "value" in the page field and then copy the results to another sheet, one sheet per field returned.

I can't figure out if it's possible to index through the list though. Is it possible?

View 4 Replies View Related

Excel 2010 :: Pivot Table Add Calculated Field Based On Certain Text In Report Filter

May 29, 2014

Any way to create a calculated field in an Excel 2010 pivot table that will find all the Transaction Types (Report Filter) with "transportation" in them and make the field Quantity 0 and leave all other quantities the same? I do not want the quantity of transportation added in twice and may not have the flexibility of adding a column to the raw data.

I used the formula below in a calculated field and it does not match the values using the added column to the data file.

=IF(ISERROR(SEARCH("*transportation*",'Transaction Type')),Quantity, 0)

I am trying to get the sum of Quantity field to equal the AdjQuantity field using a calculated Pivot field and not add a new column to the data.

View 2 Replies View Related







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