Why is my macro changing sum to count?

  • Thread starter Thread starter punter
  • Start date Start date
P

punter

Hi,

I recorded a macro to do amount other things give me a pivot table o
some data. One of the columns in the pivot table should have the tota
dollar amount of the invoices within the source data. I record th
macro to give me the sum but when I run it I get the count of the
invoice returned. Here is the line of data that is in the macro:


ActiveSheet.PivotTables("PivotTable4").PivotFields("AmtDue").Orientatio
= _
xlDataField

Does anyone know what I'm doing wrong? I have gotten various debuggin
errors before but never had a macro go out of its way to change m
command from sum to count.

Thanks as always,

Eddie
 
Why not just keep recording while you change the Count to sum?

And include that line in your code, too.
 
Back
Top