A bit of a strange one I think, as it's the first problem I've not been able to find, along with it's solution via Google!
From my data set, I'm trying to code a few pivot tables, but some of them will use a column from the orig data as 3 different pivotfields - filter, column and as a count for a datafield.
I've tried recording the macro, and writing it from scratch, but get the same problem either way. When run, the macro seems to only allow a column to be in one pivotfield, with the column only appearing as the count datafield which was the last time it was referred to in the code - stepping through I've found that it is added as a filter, but removed when it is added as a column, with the same happening again when added as the datafield.
Anyone able to point out where I'm going wrong, or a nice work around? Thanks.
From my data set, I'm trying to code a few pivot tables, but some of them will use a column from the orig data as 3 different pivotfields - filter, column and as a count for a datafield.
I've tried recording the macro, and writing it from scratch, but get the same problem either way. When run, the macro seems to only allow a column to be in one pivotfield, with the column only appearing as the count datafield which was the last time it was referred to in the code - stepping through I've found that it is added as a filter, but removed when it is added as a column, with the same happening again when added as the datafield.
Anyone able to point out where I'm going wrong, or a nice work around? Thanks.