Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pivot table addfields error (Excel 2000)

    Hello,

    I'm not very good with pivot tables (one of my 'strong weaknesses' in Excel), so I can't make out the following error message. I received a file from Poland which included a macro - among others - to create a pivot table. I ran the macro, however that stopped at the addfields...line. I've been searching in the Help file, on the internet/newsgroups, but I have only found 3 mentions of this error, and none with a real solution at hand.
    Here is the part of the macro that doesn't run. From the Help I gathered that the syntax should be ok, so I'm lost!!!
    Please help if possible.

    Thanks,
    K.

    ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1)
    ActiveSheet.Cells(3, 1).Select
    ActiveSheet.PivotTables("Tabela przestawna1").SmallGrid = False
    ActiveSheet.PivotTables("Tabela przestawna1").AddFields RowFields:="Dane", _
    ColumnFields:="group"

    The problem is at the very last line where 'Addfields' in included.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pivot table addfields error (Excel 2000)

    I bet that "Tabela przestawna1" is Polish for "Pivot table1". If you run the macro on an English-language system, your pivot table won't be called "Tabela przestawna1", of course. To be independent of the language, use PivotTables(1) instead of PivotTables("Tabela przestawna1"), assuming that you have only one pivot table on the worksheet.
    Additionally, "Dane" and "Group" must be column headings in the source data for the pivot table.

  3. #3
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pivot table addfields error (Excel 2000)

    I changed the name, but it still didn't work. The only way it actually 'did something' was when I took out the 'Dane' as in RowFields:="Dane". However it stopped working as soon as it hit a next occurance of 'Dane', which in this case was (copied from the original macro): ActiveSheet.PivotTables("Tabela przestawna1").PivotFields("Dane").PivotItems( _
    "Maksimum: ZUNI").Position = 1

    I checked in the raw data and I had a column heading called 'groups' but Dane didn't exist in the raw table at all. I have no idea what it is actually.
    Nevertheless, I got a copy of the file that my colleauge succesfully ran in Poland, and this is how the Dane is displayed in his report (see attached file).
    Any further ideas on how to solve this?
    Thanks in advance!
    K.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Pivot table addfields error (Excel 2000)

    This is one of the areas where internationalization horribly fails. While formulas are stored in a symbolic form, so that they will work in any version of Excel, pivot tables use localized names, so they will only work correctly in the version for the language they were created in. As you might guess, "Maksimum" is "maximum", and I think that "Dane" is Polish for "data".

    I fear that you will keep on running into this problem. It will probably be easier to ask for an explanation of what the pivot table is supposed to do, and then reconstruct it yourself.

  5. #5
    2 Star Lounger
    Join Date
    Feb 2001
    Posts
    107
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Pivot table addfields error (Excel 2000)

    Ok, thanks a lot for the answer!

    Regards,
    K

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •