Pivot Table - Easy way to add multiple Columns into Data section?

As with a previous question, I have a large set of data (20,000 rows and 
about 100 coulmns). I wish to select about 60 columns to place in pivot 
"data" (along with others into "Rows").

Is there a way to select multiple columns (say all 60?) and move into "Data" 
in one step? Are there add-ins that help with this? Doing all 60 is possible 
but slow and somewhat error prone.

Thanks in advance.
0
Utf
1/2/2010 3:30:01 PM
excel.misc 78881 articles. 5 followers. Follow

5 Replies
1617 Views

Similar Articles

[PageSpeed] 53

Hi Johnny

The following code should get you started on what you want to do.
In this example the first column of source data is added to Page area, the 
second column is added to the Row area then there is a loop to add 60 
columns to the Data area, ensuring that each is set to Sum and getting rid 
of the annoying "Sum of " which has to appear before each field name, by 
appending a space to the original Field name for use in the PT.

Sub CreatePivot()
    Dim wss As Worksheet, wsd As Worksheet
    Dim i As Long, j As Long, fname As String

    Set wss = Sheets("Sheet1")
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
                                   wss.Range("A1:CZ20000")).CreatePivotTable 
TableDestination:="", TableName:= _
                                   "PivotTable1", 
DefaultVersion:=xlPivotTableVersion10
    Set wsd = ActiveSheet
    wsd.PivotTableWizard TableDestination:=wsd.Cells(3, 1)

    wsd.Cells(3, 1).Select
    ' in this case the first 2 columns of source data have been added to
    ' Row field and Page field respectively
    wsd.PivotTables("PivotTable1").AddFields RowFields:=Array("Date", _
                                                              "Data"), 
PageFields:="Name"

    j = 2  ' set the start column as 1 less than where you wish to pick
             ' up data fields from
    For i = 1 To 60
                ' loop for 60 columns to add fields to the data area
                ' picking up the field name from the column header
        fname = wss.Cells(1, j + i).Value
        With wsd.PivotTables("PivotTable1").PivotFields(fname)
            .Orientation = xlDataField
            .Function = xlSum               ' force a Sum
            .Name = fname & " "          ' get rid of Sum of before field 
name
                                                      ' by appending a space 
to the source field Name
            .Position = i
        End With
    Next

    ' next part allocates the 60 data fields across columns instead
    ' of appearing under each other (if that is what is required)

    With ActiveSheet.PivotTables("PivotTable1").DataPivotField
        .Orientation = xlColumnField
        .Position = 1
    End With

    Application.ScreenUpdating = True
    Application.Calculation = xlCalculationAutomatic
End Sub


-- 
Regards
Roger Govier

"Johnny_99" <Johnny99@discussions.microsoft.com> wrote in message 
news:5B1D9D0B-B588-488F-BD2C-D6B10B1CEBEF@microsoft.com...
> As with a previous question, I have a large set of data (20,000 rows and
> about 100 coulmns). I wish to select about 60 columns to place in pivot
> "data" (along with others into "Rows").
>
> Is there a way to select multiple columns (say all 60?) and move into 
> "Data"
> in one step? Are there add-ins that help with this? Doing all 60 is 
> possible
> but slow and somewhat error prone.
>
> Thanks in advance.
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 4738 (20100102) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 

__________ Information from ESET Smart Security, version of virus signature database 4738 (20100102) __________

The message was checked by ESET Smart Security.

http://www.eset.com



0
Roger
1/2/2010 5:32:54 PM
Thanks Roger.

I presume this is not a nonprogramming solution here? I'd love to simply 
select column 1, ctrl, select column n (and take the range of columns) and 
add them all ... perhaps asking too much?

No prcedure or add-in solution?

Thanks,

"Roger Govier" wrote:

> Hi Johnny
> 
> The following code should get you started on what you want to do.
> In this example the first column of source data is added to Page area, the 
> second column is added to the Row area then there is a loop to add 60 
> columns to the Data area, ensuring that each is set to Sum and getting rid 
> of the annoying "Sum of " which has to appear before each field name, by 
> appending a space to the original Field name for use in the PT.
> 
> Sub CreatePivot()
>     Dim wss As Worksheet, wsd As Worksheet
>     Dim i As Long, j As Long, fname As String
> 
>     Set wss = Sheets("Sheet1")
>     Application.ScreenUpdating = False
>     Application.Calculation = xlCalculationManual
> 
>     ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
>                                    wss.Range("A1:CZ20000")).CreatePivotTable 
> TableDestination:="", TableName:= _
>                                    "PivotTable1", 
> DefaultVersion:=xlPivotTableVersion10
>     Set wsd = ActiveSheet
>     wsd.PivotTableWizard TableDestination:=wsd.Cells(3, 1)
> 
>     wsd.Cells(3, 1).Select
>     ' in this case the first 2 columns of source data have been added to
>     ' Row field and Page field respectively
>     wsd.PivotTables("PivotTable1").AddFields RowFields:=Array("Date", _
>                                                               "Data"), 
> PageFields:="Name"
> 
>     j = 2  ' set the start column as 1 less than where you wish to pick
>              ' up data fields from
>     For i = 1 To 60
>                 ' loop for 60 columns to add fields to the data area
>                 ' picking up the field name from the column header
>         fname = wss.Cells(1, j + i).Value
>         With wsd.PivotTables("PivotTable1").PivotFields(fname)
>             .Orientation = xlDataField
>             .Function = xlSum               ' force a Sum
>             .Name = fname & " "          ' get rid of Sum of before field 
> name
>                                                       ' by appending a space 
> to the source field Name
>             .Position = i
>         End With
>     Next
> 
>     ' next part allocates the 60 data fields across columns instead
>     ' of appearing under each other (if that is what is required)
> 
>     With ActiveSheet.PivotTables("PivotTable1").DataPivotField
>         .Orientation = xlColumnField
>         .Position = 1
>     End With
> 
>     Application.ScreenUpdating = True
>     Application.Calculation = xlCalculationAutomatic
> End Sub
> 
> 
> -- 
> Regards
> Roger Govier
> 
> "Johnny_99" <Johnny99@discussions.microsoft.com> wrote in message 
> news:5B1D9D0B-B588-488F-BD2C-D6B10B1CEBEF@microsoft.com...
> > As with a previous question, I have a large set of data (20,000 rows and
> > about 100 coulmns). I wish to select about 60 columns to place in pivot
> > "data" (along with others into "Rows").
> >
> > Is there a way to select multiple columns (say all 60?) and move into 
> > "Data"
> > in one step? Are there add-ins that help with this? Doing all 60 is 
> > possible
> > but slow and somewhat error prone.
> >
> > Thanks in advance.
> >
> > __________ Information from ESET Smart Security, version of virus 
> > signature database 4738 (20100102) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> > 
> 
> __________ Information from ESET Smart Security, version of virus signature database 4738 (20100102) __________
> 
> The message was checked by ESET Smart Security.
> 
> http://www.eset.com
> 
> 
> 
> .
> 
0
Utf
1/2/2010 7:04:01 PM
Sorry, no such feature available.
Code is the only way to automate the procedure

-- 
Regards
Roger Govier

"Johnny_99" <Johnny99@discussions.microsoft.com> wrote in message 
news:4856A3B2-5389-4A5F-B18C-AB43BF54CA2E@microsoft.com...
> Thanks Roger.
>
> I presume this is not a nonprogramming solution here? I'd love to simply
> select column 1, ctrl, select column n (and take the range of columns) and
> add them all ... perhaps asking too much?
>
> No prcedure or add-in solution?
>
> Thanks,
>
> "Roger Govier" wrote:
>
>> Hi Johnny
>>
>> The following code should get you started on what you want to do.
>> In this example the first column of source data is added to Page area, 
>> the
>> second column is added to the Row area then there is a loop to add 60
>> columns to the Data area, ensuring that each is set to Sum and getting 
>> rid
>> of the annoying "Sum of " which has to appear before each field name, by
>> appending a space to the original Field name for use in the PT.
>>
>> Sub CreatePivot()
>>     Dim wss As Worksheet, wsd As Worksheet
>>     Dim i As Long, j As Long, fname As String
>>
>>     Set wss = Sheets("Sheet1")
>>     Application.ScreenUpdating = False
>>     Application.Calculation = xlCalculationManual
>>
>>     ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
>> 
>> wss.Range("A1:CZ20000")).CreatePivotTable
>> TableDestination:="", TableName:= _
>>                                    "PivotTable1",
>> DefaultVersion:=xlPivotTableVersion10
>>     Set wsd = ActiveSheet
>>     wsd.PivotTableWizard TableDestination:=wsd.Cells(3, 1)
>>
>>     wsd.Cells(3, 1).Select
>>     ' in this case the first 2 columns of source data have been added to
>>     ' Row field and Page field respectively
>>     wsd.PivotTables("PivotTable1").AddFields RowFields:=Array("Date", _
>>                                                               "Data"),
>> PageFields:="Name"
>>
>>     j = 2  ' set the start column as 1 less than where you wish to pick
>>              ' up data fields from
>>     For i = 1 To 60
>>                 ' loop for 60 columns to add fields to the data area
>>                 ' picking up the field name from the column header
>>         fname = wss.Cells(1, j + i).Value
>>         With wsd.PivotTables("PivotTable1").PivotFields(fname)
>>             .Orientation = xlDataField
>>             .Function = xlSum               ' force a Sum
>>             .Name = fname & " "          ' get rid of Sum of before field
>> name
>>                                                       ' by appending a 
>> space
>> to the source field Name
>>             .Position = i
>>         End With
>>     Next
>>
>>     ' next part allocates the 60 data fields across columns instead
>>     ' of appearing under each other (if that is what is required)
>>
>>     With ActiveSheet.PivotTables("PivotTable1").DataPivotField
>>         .Orientation = xlColumnField
>>         .Position = 1
>>     End With
>>
>>     Application.ScreenUpdating = True
>>     Application.Calculation = xlCalculationAutomatic
>> End Sub
>>
>>
>> -- 
>> Regards
>> Roger Govier
>>
>> "Johnny_99" <Johnny99@discussions.microsoft.com> wrote in message
>> news:5B1D9D0B-B588-488F-BD2C-D6B10B1CEBEF@microsoft.com...
>> > As with a previous question, I have a large set of data (20,000 rows 
>> > and
>> > about 100 coulmns). I wish to select about 60 columns to place in pivot
>> > "data" (along with others into "Rows").
>> >
>> > Is there a way to select multiple columns (say all 60?) and move into
>> > "Data"
>> > in one step? Are there add-ins that help with this? Doing all 60 is
>> > possible
>> > but slow and somewhat error prone.
>> >
>> > Thanks in advance.
>> >
>> > __________ Information from ESET Smart Security, version of virus
>> > signature database 4738 (20100102) __________
>> >
>> > The message was checked by ESET Smart Security.
>> >
>> > http://www.eset.com
>> >
>> >
>> >
>>
>> __________ Information from ESET Smart Security, version of virus 
>> signature database 4738 (20100102) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com
>>
>>
>>
>> .
>>
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 4738 (20100102) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 

__________ Information from ESET Smart Security, version of virus signature database 4738 (20100102) __________

The message was checked by ESET Smart Security.

http://www.eset.com



0
Roger
1/2/2010 11:13:50 PM
Is the code VBA?
It does not seem to compile in VBA.  The :=3D outside the scope of a
paramter appears to fail
e.g. using TableDestination:=3D"" as an assignment.
Sorry is this is a silly question.  Tom

On Jan 2, 6:13=A0pm, "Roger Govier" <roger@technology4unospamdotcodotuk>
wrote:
> Sorry, no such feature available.
> Code is the only way to automate the procedure
>
> --
> Regards
> Roger Govier
>
> "Johnny_99" <Johnn...@discussions.microsoft.com> wrote in message
>
> news:4856A3B2-5389-4A5F-B18C-AB43BF54CA2E@microsoft.com...
>
>
>
>
>
> > Thanks Roger.
>
> > I presume this is not a nonprogramming solution here? I'd love to simpl=
y
> > select column 1, ctrl, select column n (and take the range of columns) =
and
> > add them all ... perhaps asking too much?
>
> > No prcedure or add-in solution?
>
> > Thanks,
>
> > "Roger Govier" wrote:
>
> >> Hi Johnny
>
> >> The following code should get you started on what you want to do.
> >> In this example the first column of source data is added to Page area,
> >> the
> >> second column is added to the Row area then there is a loop to add 60
> >> columns to the Data area, ensuring that each is set to Sum and getting
> >> rid
> >> of the annoying "Sum of " which has to appear before each field name, =
by
> >> appending a space to the original Field name for use in the PT.
>
> >> Sub CreatePivot()
> >> =A0 =A0 Dim wss As Worksheet, wsd As Worksheet
> >> =A0 =A0 Dim i As Long, j As Long, fname As String
>
> >> =A0 =A0 Set wss =3D Sheets("Sheet1")
> >> =A0 =A0 Application.ScreenUpdating =3D False
> >> =A0 =A0 Application.Calculation =3D xlCalculationManual
>
> >> =A0 =A0 ActiveWorkbook.PivotCaches.Add(SourceType:=3DxlDatabase, Sourc=
eData:=3D _
>
> >> wss.Range("A1:CZ20000")).CreatePivotTable
> >> TableDestination:=3D"", TableName:=3D _
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0"PivotTable1",
> >> DefaultVersion:=3DxlPivotTableVersion10
> >> =A0 =A0 Set wsd =3D ActiveSheet
> >> =A0 =A0 wsd.PivotTableWizard TableDestination:=3Dwsd.Cells(3, 1)
>
> >> =A0 =A0 wsd.Cells(3, 1).Select
> >> =A0 =A0 ' in this case the first 2 columns of source data have been ad=
ded to
> >> =A0 =A0 ' Row field and Page field respectively
> >> =A0 =A0 wsd.PivotTables("PivotTable1").AddFields RowFields:=3DArray("D=
ate", _
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "Data"),
> >> PageFields:=3D"Name"
>
> >> =A0 =A0 j =3D 2 =A0' set the start column as 1 less than where you wis=
h to pick
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0' up data fields from
> >> =A0 =A0 For i =3D 1 To 60
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ' loop for 60 columns to add fields to=
 the data area
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ' picking up the field name from the c=
olumn header
> >> =A0 =A0 =A0 =A0 fname =3D wss.Cells(1, j + i).Value
> >> =A0 =A0 =A0 =A0 With wsd.PivotTables("PivotTable1").PivotFields(fname)
> >> =A0 =A0 =A0 =A0 =A0 =A0 .Orientation =3D xlDataField
> >> =A0 =A0 =A0 =A0 =A0 =A0 .Function =3D xlSum =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 ' force a Sum
> >> =A0 =A0 =A0 =A0 =A0 =A0 .Name =3D fname & " " =A0 =A0 =A0 =A0 =A0' get=
 rid of Sum of before field
> >> name
> >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ' by appending a
> >> space
> >> to the source field Name
> >> =A0 =A0 =A0 =A0 =A0 =A0 .Position =3D i
> >> =A0 =A0 =A0 =A0 End With
> >> =A0 =A0 Next
>
> >> =A0 =A0 ' next part allocates the 60 data fields across columns instea=
d
> >> =A0 =A0 ' of appearing under each other (if that is what is required)
>
> >> =A0 =A0 With ActiveSheet.PivotTables("PivotTable1").DataPivotField
> >> =A0 =A0 =A0 =A0 .Orientation =3D xlColumnField
> >> =A0 =A0 =A0 =A0 .Position =3D 1
> >> =A0 =A0 End With
>
> >> =A0 =A0 Application.ScreenUpdating =3D True
> >> =A0 =A0 Application.Calculation =3D xlCalculationAutomatic
> >> End Sub
>
> >> --
> >> Regards
> >> Roger Govier
>
> >> "Johnny_99" <Johnn...@discussions.microsoft.com> wrote in message
> >>news:5B1D9D0B-B588-488F-BD2C-D6B10B1CEBEF@microsoft.com...
> >> > As with a previous question, I have a large set of data (20,000 rows
> >> > and
> >> > about 100 coulmns). I wish to select about 60 columns to place in pi=
vot
> >> > "data" (along with others into "Rows").
>
> >> > Is there a way to select multiple columns (say all 60?) and move int=
o
> >> > "Data"
> >> > in one step? Are there add-ins that help with this? Doing all 60 is
> >> > possible
> >> > but slow and somewhat error prone.
>
> >> > Thanks in advance.
>
> >> > __________ Information from ESET Smart Security, version of virus
> >> > signature database 4738 (20100102) __________
>
> >> > The message was checked by ESET Smart Security.
>
> >> >http://www.eset.com
>
> >> __________ Information from ESET Smart Security, version of virus
> >> signature database 4738 (20100102) __________
>
> >> The message was checked by ESET Smart Security.
>
> >>http://www.eset.com
>
> >> .
>
> > __________ Information from ESET Smart Security, version of virus
> > signature database 4738 (20100102) __________
>
> > The message was checked by ESET Smart Security.
>
> >http://www.eset.com
>
> __________ Information from ESET Smart Security, version of virus signatu=
re database 4738 (20100102) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com- Hide quoted text -
>
> - Show quoted text -

0
tlee
1/29/2010 3:43:05 PM
Hi Tom

Yes the code is written in VBA
I suspect that line wrap in your Newsreader is causing the problem.

I have reproduced the code below, with more forced line breaks  so hopefully 
your newsreader won't mess it up.

Sub CreatePivot()
    Dim wss As Worksheet, wsd As Worksheet
    Dim i As Long, j As Long, fname As String

    Set wss = Sheets("Sheet1")
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, _
    SourceData:=wss.Range("A1:CZ20000")) _
    .CreatePivotTable TableDestination:="", _
    TableName:="PivotTable1", DefaultVersion:=xlPivotTableVersion10

    Set wsd = ActiveSheet
    wsd.PivotTableWizard TableDestination:=wsd.Cells(3, 1)

    wsd.Cells(3, 1).Select
    ' in this case the first 2 columns of source data have been added to
    ' Row field and Page field respectively
    wsd.PivotTables("PivotTable1") _
    .AddFields RowFields:=Array("Date", _
    "Data"), PageFields:="Name"

    j = 2  ' set the start column as 1 less than where you wish to pick
             ' up data fields from
    For i = 1 To 60
                ' loop for 60 columns to add fields to the data area
                ' picking up the field name from the column header
        fname = wss.Cells(1, j + i).Value
        With wsd.PivotTables("PivotTable1").PivotFields(fname)
            .Orientation = xlDataField
            .Function = xlSum         ' force a Sum
           ' get rid of Sum of before field name
         ' by adding a space to the source field Name
             .Name = fname & " "
            .Position = i
        End With
    Next

    ' next part allocates the 60 data fields across columns instead
    ' of appearing under each other (if that is what is required)

    With ActiveSheet.PivotTables("PivotTable1").DataPivotField
        .Orientation = xlColumnField
        .Position = 1
    End With

    Application.ScreenUpdating = True
    Application.Calculation = xlCalculationAutomatic
End Sub


-- 
Regards
Roger Govier

"tlee" <leethomasy2@gmail.com> wrote in message 
news:e9cda5ad-d299-41c1-93bc-ed9665029293@a17g2000pre.googlegroups.com...
> Is the code VBA?
> It does not seem to compile in VBA.  The := outside the scope of a
> paramter appears to fail
> e.g. using TableDestination:="" as an assignment.
> Sorry is this is a silly question.  Tom
>
> On Jan 2, 6:13 pm, "Roger Govier" <roger@technology4unospamdotcodotuk>
> wrote:
>> Sorry, no such feature available.
>> Code is the only way to automate the procedure
>>
>> --
>> Regards
>> Roger Govier
>>
>> "Johnny_99" <Johnn...@discussions.microsoft.com> wrote in message
>>
>> news:4856A3B2-5389-4A5F-B18C-AB43BF54CA2E@microsoft.com...
>>
>>
>>
>>
>>
>> > Thanks Roger.
>>
>> > I presume this is not a nonprogramming solution here? I'd love to 
>> > simply
>> > select column 1, ctrl, select column n (and take the range of columns) 
>> > and
>> > add them all ... perhaps asking too much?
>>
>> > No prcedure or add-in solution?
>>
>> > Thanks,
>>
>> > "Roger Govier" wrote:
>>
>> >> Hi Johnny
>>
>> >> The following code should get you started on what you want to do.
>> >> In this example the first column of source data is added to Page area,
>> >> the
>> >> second column is added to the Row area then there is a loop to add 60
>> >> columns to the Data area, ensuring that each is set to Sum and getting
>> >> rid
>> >> of the annoying "Sum of " which has to appear before each field name, 
>> >> by
>> >> appending a space to the original Field name for use in the PT.
>>
>> >> Sub CreatePivot()
>> >>     Dim wss As Worksheet, wsd As Worksheet
>> >>     Dim i As Long, j As Long, fname As String
>>
>> >>     Set wss = Sheets("Sheet1")
>> >>     Application.ScreenUpdating = False
>> >>     Application.Calculation = xlCalculationManual
>>
>> >>     ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, 
>> >> SourceData:= _
>>
>> >> wss.Range("A1:CZ20000")).CreatePivotTable
>> >> TableDestination:="", TableName:= _
>> >>                                    "PivotTable1",
>> >> DefaultVersion:=xlPivotTableVersion10
>> >>     Set wsd = ActiveSheet
>> >>     wsd.PivotTableWizard TableDestination:=wsd.Cells(3, 1)
>>
>> >>     wsd.Cells(3, 1).Select
>> >>     ' in this case the first 2 columns of source data have been added 
>> >> to
>> >>     ' Row field and Page field respectively
>> >>     wsd.PivotTables("PivotTable1").AddFields RowFields:=Array("Date", 
>> >> _
>> >>                                                               "Data"),
>> >> PageFields:="Name"
>>
>> >>     j = 2  ' set the start column as 1 less than where you wish to 
>> >> pick
>> >>              ' up data fields from
>> >>     For i = 1 To 60
>> >>                 ' loop for 60 columns to add fields to the data area
>> >>                 ' picking up the field name from the column header
>> >>         fname = wss.Cells(1, j + i).Value
>> >>         With wsd.PivotTables("PivotTable1").PivotFields(fname)
>> >>             .Orientation = xlDataField
>> >>             .Function = xlSum               ' force a Sum
>> >>             .Name = fname & " "          ' get rid of Sum of before 
>> >> field
>> >> name
>> >>                                                       ' by appending a
>> >> space
>> >> to the source field Name
>> >>             .Position = i
>> >>         End With
>> >>     Next
>>
>> >>     ' next part allocates the 60 data fields across columns instead
>> >>     ' of appearing under each other (if that is what is required)
>>
>> >>     With ActiveSheet.PivotTables("PivotTable1").DataPivotField
>> >>         .Orientation = xlColumnField
>> >>         .Position = 1
>> >>     End With
>>
>> >>     Application.ScreenUpdating = True
>> >>     Application.Calculation = xlCalculationAutomatic
>> >> End Sub
>>
>> >> --
>> >> Regards
>> >> Roger Govier
>>
>> >> "Johnny_99" <Johnn...@discussions.microsoft.com> wrote in message
>> >>news:5B1D9D0B-B588-488F-BD2C-D6B10B1CEBEF@microsoft.com...
>> >> > As with a previous question, I have a large set of data (20,000 rows
>> >> > and
>> >> > about 100 coulmns). I wish to select about 60 columns to place in 
>> >> > pivot
>> >> > "data" (along with others into "Rows").
>>
>> >> > Is there a way to select multiple columns (say all 60?) and move 
>> >> > into
>> >> > "Data"
>> >> > in one step? Are there add-ins that help with this? Doing all 60 is
>> >> > possible
>> >> > but slow and somewhat error prone.
>>
>> >> > Thanks in advance.
>>
>> >> > __________ Information from ESET Smart Security, version of virus
>> >> > signature database 4738 (20100102) __________
>>
>> >> > The message was checked by ESET Smart Security.
>>
>> >> >http://www.eset.com
>>
>> >> __________ Information from ESET Smart Security, version of virus
>> >> signature database 4738 (20100102) __________
>>
>> >> The message was checked by ESET Smart Security.
>>
>> >>http://www.eset.com
>>
>> >> .
>>
>> > __________ Information from ESET Smart Security, version of virus
>> > signature database 4738 (20100102) __________
>>
>> > The message was checked by ESET Smart Security.
>>
>> >http://www.eset.com
>>
>> __________ Information from ESET Smart Security, version of virus 
>> signature database 4738 (20100102) __________
>>
>> The message was checked by ESET Smart Security.
>>
>> http://www.eset.com- Hide quoted text -
>>
>> - Show quoted text -
>
>
> __________ Information from ESET Smart Security, version of virus 
> signature database 4821 (20100130) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
> 

__________ Information from ESET Smart Security, version of virus signature database 4821 (20100130) __________

The message was checked by ESET Smart Security.

http://www.eset.com



0
Roger
1/31/2010 10:36:31 AM
Reply:

Similar Artilces:

Pivot Tables #4
Hello you experts out there. I nned some Pivot table advice ( a website address for basics would be great), for instance how to excplain pivots and how to create them. I use lots of products with lots of sizes from various suppliers to name but a few columns. Is there a limit as to the amount of columns of data? Thank you very much. H Hi check out Debra Dalgleish's site - http://www.contextures.com/tiptech.html - she has a link to Jon Peltier's site which explains PT basics and then lots more interesting info on them. -- Cheers JulieD check out www.hcts.net.au/tipsandtric...

Pivot Table Counting
I am having trouble trying to calculate fields through a pivot table. Basically, I have a data set that looks like this: Record Number State Value 1 CA 0 2 CA 12 3 CA 15 4 NJ 0 5 NJ 10 I want to set up a pivot table that will show 2 columns, one with th total number of records and one with the total number of records wit non-zero values. Both of the...

Pivot Tables
Hi, I was windering if some one could provide me with a link to a tutorial for what I am trying to do. I have an aggregate table. This table has several groups and several columns. The intersection of a group and column is an aggreate value such as Sum function of a column value in that group. Normally a Pivot table shows 1 aggregate value at the intersection of a group and a column. What I want is: To show more than one value at the intersection besides the aggregate value. In other words, if a simple pivot table cell is: Aggr(x,y) where aggr is an aggregate function such a...

Subform Causes Main Form to show same record Multiple times
I have a form named PatientsInfo that is based on table Tbl_Patients. In that form I have a subform that is based on table Tbl_FedPovertyLevel. I have 2 fields from Tbl_FedPovertyLevel on the subform -- HouseholdMemberName, HouseholdMemberIncome. When an additional HouseholdMember is entered into the subform, it links to the Tbl_Patients correctly. But on the record selector for the PatientsInfo main form, there are now several instances of the same Patient based on how many HouseholdMembers I have entered into the subform. I have to click the next record button several time...

Help comparing 2 columns..
I have two coloumns of numbers, which i need to compare. The Excel document should come out with 3310 as a result in coloumn 3 (see exsample). Can someone help me? I am dont know anything about VB programming in Excel, so I hope someone can find a solution without any programming. example: Coloumn 1 2211 5510 2210 9952 Coloumn 2 2211 5510 3310 2210 9952 Sample: With Range A1:A4 named "Rge1" ' equal to your Column 1 data. and with your existing data in Column 2 - Cells B1:B5 In cell C1 enter: =IF(COUNTIF(Rge1,B1),"",B1) and copy down. Column C should reflect a...

Pivot Chart Formatting #5
How can I format a Pivot Chart and keep the customized format when refreshed? This is a known issue by Microsoft. Short answer, you can't do it. =( One possible work around is to record a macro of you setting the formatting of the chart, and then set it up so that the macro runs whenever the chart calculates. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "Germeny Santos" wrote: > How can I format a Pivot Chart and keep the customized format when refreshed? Hi, This is dependent on what custom formatting you are refering to. T...

Pivot table question: Sorting the subgroup in a pivot table (when using the top 10 option for the subgroup)
Hello: I have created a pivot table which has a one subgroup in the second column from the left. It uses the Top 10 option, so there are 10 subgroups So my data looks something like this: Group 1 50 Subgroup 1a 10 Subgroup 1b 40 Eight more subgroups Group 2 30 Subgroup 2a 20 Subgroup 2b 10 Eight more subgroups What I would like to do is sort by THe totals for Group 1, but then also sort by the subgroups, based on the values for each subgroup (similar to the "Sort by, ...

MULTIPLE HOTMAIL ACCOUNTS #2
Anyone figure out how to send/receive multiple Hotmail accounts from within Outlook 2003, or 2002.? (or even 2000 for the matter) Thanks Multiple Hotmail accounts is only supported in Outlook 2003. 2002 can use only one account and Outlook 2000 does not have the ability to use any Hotmail accounts. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After searching google.groups.com and finding no answer, John F asked: | A...

Get External Data Macro
I need a macro that does the following: Inserts a new worksheet Names the worksheet Sheet1 (or any other name) Prompts for Get External Data (allowing the user to find the file) Is there any way to do this? Or at least the last 2 parts? -- mkerstei ------------------------------------------------------------------------ mkerstei's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=25688 View this thread: http://www.excelforum.com/showthread.php?threadid=393385 ...

join multiple pivot tables?
How can I link up multiple pivottables all based on the same data where all i would have to do is change the page option (drop down menu) from the first pivot and the rest of the pivots would automatically adjust to match those? There's a sample file here in which you can change the page field in one pivot table, and all the related pivot tables change: http://www.contextures.com/excelfiles.html Under Pivot Tables, look for 'PT0021 - Change All Page Fields' or 'PT0008 - Change Multiple Page Fields' clueless_in_mempjhis wrote: > How can I link up mu...

Help with pivot table
I'm after some help with a pivot table I have created a work book to log certain defects, and would like to use a pivot table to show defects per unit on an improvement tracker, is it possible to have the pivot table to shift cells to the right when it is updated and required more columns so it doesn't overwrite data on the sheet it would be like this the componet fault unit numbers & Total defects are the pivot table & the action would be the start of the manual data Compontent Fault Unit Numbers Total Defects Action 1 2 3 4 5 Light Inop 1 1 ...

moving data dynamically based on empty cell
I have a data sheet that looks like this... col a col b abc 10 20 45 efg 5 18 10 I need it to look like this... col a col b abc 10 abc 20 abc 45 efg 5 efg 18 efg 10 since there is no consistency to the number of rows in col b with data, i have to come up with a formula that is dynamic The file has 20,000 rows so doing it manually is not the way to go. Thanks Give this macro a try... Sub FillInTheBlanks() Dim Area As Range, LastRow As Long Const ColLetter As String = "A&...

add registration key protection
I'd like to add protection to my deployment project. Can somebody please tell me what product i can look into? Thanks, Eric On Dec 21, 10:47 am, wanwan <ericwa...@yahoo.com> wrote: > I'd like to add protection to my deployment project. Can somebody > please tell me what product i can look into? > > Thanks, > Eric sorry I just want to clarify, I'd like to have my software installer to have registration key input and registration key checking. Thanks. ...

Can I permanently delete/hide data within Pivot Tables?
Microsoft Excel 2002 I have 155 clients which I need to run Pivot Tables for! All with the same pivot table layout. Is it possible to run the Pivot table with the 155 clients as a Template basically, then somehow delete or permanently hide the data leaving only one client, so that I can save multiple copies for each of the individual clients? Or can I set up a pivot table where I can automatically feed in parameters? Client details are stored on an Oracle database! Hi Peter, Right-click on a Page Field and select Field Settings from the context menu, then click the Advanced button. Yo...

how do you add a border to entire document?
....and use the large space to ask your question. And then read http://www.dts-l.org/goodpost.htm -- Ed Bennett - MVP Microsoft Publisher ...

Using formulas for pivot table
I know you have the count field but is there away to input a formula? For example customer ordered 25 cases and each case weighs 4 lbs and the end result would need to be total pounds ordered. Thanks! If you do the calculation in the pivot table you may not get the result that you expect. If possible, add a field to the source data, and calculate the order total there. Then, add the OrderTotal field to the pivot table's data area. tskb wrote: > I know you have the count field but is there away to input a formula? > For example customer ordered 25 cases and each case weighs 4 lbs...

Possible to chart data for dates implicit within a range?
I have a list of computer programs with start and end dates for each. I need to determine how many programs were running on my system on any given day. Can I get this data for individual days between the start and end dates without creating columns for each intermediate day? Ex.: Program 1 ran from 01/01/2005 to 01/14/2005. Program 2 ran from 01/06/2005 to 01/22/2005. Is it possible to chart the total number of programs running on 01/08/2005 without manually creating a column for that date? Thanks, Nechama You can compute this with formulas. Star with data in A1:C4 as follows: ...

Hyperlink in Pivot Table
Is it possible to put hyperlinks into a pivot table to go to the detail in other worksheets? I have a top 10 list of components with issues and would like the user to be able to click on the component to go to the list of issues. I thought if I put the hyperlink in the cell where the pivot table is getting it's info, it would come through, but that didn't work. Any suggestions? Thanks Hi Just double clicking on the cell with the data of interest, will open another sheet showing all of the entries making up that value. Delete the newly created sheet after you have finished w...

Converting Year to Date Data to Month to Date
I have the following problem: I havea production table of all my agents the production comes in as a download each month but it is in Year to date totals. I would like to know how I change the data so that it is showing month to date production. i have changed the data to cross tab with the date as the column headings. The I created a select query and subtracted Jan from Feb to get the Feb production. I need to get this data in a normalized table formate with the Production date in one column and the monthly production in a second column. Thanks in advance for any help Use a subq...

chart options show data table
Currently using 2 workbooks to produce 1 chart - the source data in workbook 1 and the chart in workbook 2. We also are using the "show data table" option to most easily view all values in the chart. We would like this data to keep it's currency format to best reflect the values in the chart; however, the data table loses this formatting when we close workbook 1. Is there any way to hang onto this formatting after the workbook is closed? Data tables in charts are not particularly flexible or capable. You combine the workbooks. Alternatively, put a table in the chart's...

Data validation and empty cells
range("d1").Validation.add formula1:= "=$A$1:$A$7",Type:=xlValidateList,operator:=xlBetween How to avoid empty entries in drop down box if some of cell from A1:A7 are empty? Thanks Sort A1:A7 so that the empties are at the bottom and use =OFFSET($A$1,,,COUNT($A$1:$A$7),1) -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Kris" <witek7205@spam.gazeta.pl.invalid> wrote in message news:do75sd$8a4$1@inews.gazeta.pl... > range("d1").Validation.add formula1:= > "=$A$1:$A$7",Type:=xlValidateList,oper...

Flowcharting Table relations
Hey guys and girls. New one for you. I am doing an IT audit of Great Plains and need to flowchart how the data files are related to each other. In other words, how does one file feed into another file, and what field or fields in a particular table is used to relate/link to another table. Does anyone where I can find such information? Thanks Check out the Great Plains SDK available on the installation CDs. There are several diagrams that describe table relationships. Also, there are module documents that contain posting flowcharts. Regards, Kevin Rood Corporate Software Consultants...

Help on Custom Data Validation
Dear NG, What should be the formula in custom data validation so that when A1 is empty no entry will be accepted in A2? Please no VB! Regards, Jon-jon Hi Try =A1="" as your formula in Data Validation for A2 Hope this helps. -- Andy. "JON JON" <conrado_capistranoREMOVE@msn.com> wrote in message news:u$85VgfJEHA.1312@TK2MSFTNGP12.phx.gbl... > Dear NG, > > What should be the formula in custom data validation so that when A1 is > empty no entry will be accepted in A2? Please no VB! > > Regards, > > Jon-jon > > Hi Jon I woul...

Pivot Tables #40
Does anyone know if there is a way to quickly clear a field list? I can't find a keyboard shortcut or anything else in any of the help/support avenues I've tried. Thanks in advance for the help. -- ERR229 Are you trying to clear all the check boxes in the field's dropdown list? In Excel 2002 and later versions, there's a Show All checkbox. In Excel 2000, and earlier versions, you can use programming to hide or show the items -- there's sample code here: http://www.contextures.com/xlPivot03.html ERR229 wrote: > Does anyone know if there is a way to quickl...

PDK Personal Data Keeper Timesheet Modification
Is it possible to modify the form for entering a timesheet in PDK? I would like to have the project name as well as the project number display on the time entry screen. Currently only project number displays on the timesheet form, although you can see the project name in the related look up. I would like to hear from anyone who uses PDK about how to make the product simpler to use, or what product you are using in lieu of PDK to track time. My e-mail address is lisa@worknetinc.com. ...