![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 217
|
I would like to modify the SUM formula in my pivot table to round to the dollar and say -SUM since my souce data is all the opposite sign of how I want it to appear on my pivot table. Is the only way to accomplish this with a calculated field or is there some way to define exactly the SUM formula I want to use in the table?
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: California
Posts: 105
|
You could add a column to the original data using the absolute formula this will create all positive numbers than use that coulmn in your pivot
=Abs(a5) |
|
|
|
|
|
#3 | |||||||||||||||||||||||||||
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Using the data...
*
...a Calculated field using the formula... =-ROUND(Qty,0) ...produced... *
* [ This Message was edited by: Mark W. on 2002-04-09 14:24 ] |
|||||||||||||||||||||||||||
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Location: A Mile High!!
Posts: 230
|
Ok, maybe I am missing something but wouldnt it be easier to double click the data field in layout, then number and then to 0 decimal places. Or did you want both numbers??
|
|
|
|
|
|
#5 | |||||||||||
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
Also, a Calculated Field (in this case =ROUND(QTY,0)-QTY) allows you to produce PivotTables with derived results... *
* [ This Message was edited by: Mark W. on 2002-04-09 15:23 ] |
|||||||||||
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Posts: 217
|
Thanks for the info, but it wasn't quite what I was looking for. Here is a sample of my data set
Acct Dept Amount 3000 SiteA -5000 3005 SiteB -3500 3010 Admin -50 3300 Admin -25 4000 SiteA 2000 4005 SiteB 1000 4500 SiteA 700 4505 SiteB 300 4600 SiteA 200 4605 SiteB 75 4750 SiteA 45 5000 Admin 1000 What I'm looking for is to have rows for the Acct's, columns for the Dept's and then to have the amounts rounded to zero and reverse the sign. I hope this helps. |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
|
|
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Feb 2002
Posts: 217
|
I must apologize, my sample data was all rounded to zero decimals, but the actual data is all in dollar and cents. I would like to round all the dollar and cents to just whole dollars.
|
|
|
|
|
|
#9 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
MrExcel MVP
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
|
Quote:
*
* ...uses a Calculated Field, 'Amount2', defined as... =-ROUND(Amount,0) [ This Message was edited by: Mark W. on 2002-04-10 10:04 ] |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
#10 |
|
Board Regular
Join Date: Feb 2002
Posts: 217
|
Thank you. Your answer is exactly what I was looking for. One of those "it was so simple I didn't see" it type of things.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|