Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default pivot table - dragging fields

I select a check box for a field in order to have it moved to the values area
of my pivot table;
however the field is numeric, sometimes it is moved by default to the row
label area
(sometimes it is moved by default to the values area for the same pivot
table : I can not find what the trigger is)

how can I avoid this or how can I drag "in bulk" all fields from the row
label to the values area ?
thanks !
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default pivot table - dragging fields

Good morning,

version : Excel 2007 SP 1 MSO

I want only column fields (no problem) and fields in the value area.
when dragging a second field to the values area, automatically a "Values
field" is added (to the column label area, I drag it then to the row field
area)
so far so good

then I want, by selecting the check box of the fields, add other fields to
the value area. sometimes they are adde to the row area (I don't want that,
I want them in the value area)

do you know any vba code to move them "in bulk" or better (because moving
them in bulk will force me to move every field up or down ...) find a way
that by clicking the check box of the fields, they are moved to the area I
want (defined in advance).

THANKS FOR YOUR HELP !!!


"Roger Govier" wrote:

Hi

I am not fully understanding your problem.
Which version of Excel are you using?

You can only move a filed at a time, but to any area of the PT.
You cannot move all "in Bulk" (without using some VBA code).
You cannot have all fields in the data area, there has to be at least a row
or a column field.

--
Regards
Roger Govier

"Raf Rollier" wrote in message
...
I select a check box for a field in order to have it moved to the values
area
of my pivot table;
however the field is numeric, sometimes it is moved by default to the row
label area
(sometimes it is moved by default to the values area for the same pivot
table : I can not find what the trigger is)

how can I avoid this or how can I drag "in bulk" all fields from the row
label to the values area ?
thanks !


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default pivot table - dragging fields

THANK YOU VERY MUCH !!!

"Roger Govier" wrote:

Hi

Excel will default to the Row area, if ALL the data in that field is
Numeric.
If there are any text values, or any blank values, then it will default to
adding the field to the Row area.
If you right click on the field label, you have the options show as to which
area you want the field allocated.

The following code will add all fields to the Data area and set their
property to Sum
You will then need to pull any fields you require to the Column or Row area.

Sub AddAllFieldsToDataArea()
Dim pt As PivotTable, pf As PivotField
Dim ws As Worksheet, i As Long
Application.ScreenUpdating = False
Set ws = ActiveSheet
For i = 1 To ws.PivotTables.Count
Set pt = ws.PivotTables(i)
pt.ManualUpdate = True
For Each pf In pt.PivotFields
With pf
.Orientation = xlDataField
.Function = xlSum
End With
Next
pt.ManualUpdate = False
Next i
Application.ScreenUpdating = True
End Sub

Copy the Code above
Alt+F11 to invoke the VB Editor
InsertModule
Paste code into white pane that appears
Alt+F11 to return to Excel

To use
Select sheet containing the PT's
Alt+F8 to bring up Macros
Highlight the macro name
Run


--
Regards
Roger Govier

"Raf Rollier" wrote in message
...
Good morning,

version : Excel 2007 SP 1 MSO

I want only column fields (no problem) and fields in the value area.
when dragging a second field to the values area, automatically a "Values
field" is added (to the column label area, I drag it then to the row field
area)
so far so good

then I want, by selecting the check box of the fields, add other fields to
the value area. sometimes they are adde to the row area (I don't want
that,
I want them in the value area)

do you know any vba code to move them "in bulk" or better (because moving
them in bulk will force me to move every field up or down ...) find a way
that by clicking the check box of the fields, they are moved to the area I
want (defined in advance).

THANKS FOR YOUR HELP !!!


"Roger Govier" wrote:

Hi

I am not fully understanding your problem.
Which version of Excel are you using?

You can only move a filed at a time, but to any area of the PT.
You cannot move all "in Bulk" (without using some VBA code).
You cannot have all fields in the data area, there has to be at least a
row
or a column field.

--
Regards
Roger Govier

"Raf Rollier" wrote in message
...
I select a check box for a field in order to have it moved to the
values
area
of my pivot table;
however the field is numeric, sometimes it is moved by default to the
row
label area
(sometimes it is moved by default to the values area for the same pivot
table : I can not find what the trigger is)

how can I avoid this or how can I drag "in bulk" all fields from the
row
label to the values area ?
thanks !

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot table fields jodieg Excel Discussion (Misc queries) 2 March 30th 07 02:32 PM
Pivot Table - Dragging multiple items into data field J@Y Excel Discussion (Misc queries) 1 January 12th 07 12:52 AM
number of fields in the row fields in pivot table UT Excel Discussion (Misc queries) 0 April 13th 06 01:17 AM
Pivot table # of fields Dino Excel Discussion (Misc queries) 3 November 2nd 05 09:43 PM
Pivot Table Fields smck Excel Worksheet Functions 2 October 27th 05 03:39 AM


All times are GMT +1. The time now is 04:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"