Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
punter
 
Posts: n/a
Default 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.


--
punter


------------------------------------------------------------------------
punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=554243

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.excel.misc
punter
 
Posts: n/a
Default Why is my macro changing sum to count?


That worked. Thanks so much Dave.


--
punter


------------------------------------------------------------------------
punter's Profile: http://www.excelforum.com/member.php...fo&userid=2044
View this thread: http://www.excelforum.com/showthread...hreadid=554243

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Count consecutive dates only [email protected] Excel Discussion (Misc queries) 0 May 4th 06 03:58 PM
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
Can T Get Macro To Run! Nipper New Users to Excel 2 November 4th 05 04:48 AM
Count Position of Filtered TEXT cells in a column Sam via OfficeKB.com Excel Worksheet Functions 8 May 18th 05 04:23 AM


All times are GMT +1. The time now is 07:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"