+ Reply to Thread
Results 1 to 3 of 3

Why is my macro changing sum to count?

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    300

    Why is my macro changing sum to count?

    Hi,

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

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

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

    Thanks as always,

    Eddie.

  2. #2
    Dave Peterson
    Guest

    Re: Why is my macro changing sum to count?

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

    And include that line in your code, too.

    punter wrote:
    >
    > Hi,
    >
    > I recorded a macro to do amount other things give me a pivot table on
    > some data. One of the columns in the pivot table should have the total
    > dollar amount of the invoices within the source data. I record the
    > macro to give me the sum but when I run it I get the count of then
    > invoice returned. Here is the line of data that is in the macro:
    >
    > ActiveSheet.PivotTables("PivotTable4").PivotFields("AmtDue").Orientation
    > = _
    > xlDataField
    >
    > Does anyone know what I'm doing wrong? I have gotten various debugging
    > errors before but never had a macro go out of its way to change my
    > command from sum to count.
    >
    > Thanks as always,
    >
    > Eddie.
    >
    > --
    > punter
    >
    > ------------------------------------------------------------------------
    > punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
    > View this thread: http://www.excelforum.com/showthread...hreadid=554243


    --

    Dave Peterson

  3. #3
    Forum Contributor
    Join Date
    10-28-2003
    Location
    Happyville, USA
    MS-Off Ver
    365
    Posts
    300
    That worked. Thanks so much Dave.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1