MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Apr 9th, 2002, 03:02 PM   #1
2077delta
Board Regular
 
Join Date: Feb 2002
Posts: 217
Default

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?
2077delta is offline   Reply With Quote
Old Apr 9th, 2002, 03:12 PM   #2
lars
Board Regular
 
Join Date: Mar 2002
Location: California
Posts: 105
Default

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)
lars is offline   Reply With Quote
Old Apr 9th, 2002, 03:15 PM   #3
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Using the data...
*
FruitQty
Apples$10.10
Apples$15.25
Oranges$20.50
Oranges$25.80
Oranges$30.00


...a Calculated field using the formula...

=-ROUND(Qty,0)

...produced...

*
Data
FruitSum of QtySum of -Qty
Apples25.35-25
Oranges76.3-76
Grand Total101.65-102

*


[ This Message was edited by: Mark W. on 2002-04-09 14:24 ]
Mark W. is offline   Reply With Quote
Old Apr 9th, 2002, 03:29 PM   #4
EdE
Board Regular
 
Join Date: Apr 2002
Location: A Mile High!!
Posts: 230
Default

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??
EdE is offline   Reply With Quote
Old Apr 9th, 2002, 03:48 PM   #5
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Quote:
On 2002-04-09 14:29, EdE wrote:
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??
Formatting alone doesn't alter the precision of underlying values.

Also, a Calculated Field (in this case =ROUND(QTY,0)-QTY) allows you to produce PivotTables with derived results...

*
Sum of Rounded Diff
FruitTotal
Apples($0.35)
Oranges($0.30)
Grand Total$0.35*

*

[ This Message was edited by: Mark W. on 2002-04-09 15:23 ]
Mark W. is offline   Reply With Quote
Old Apr 10th, 2002, 09:52 AM   #6
2077delta
Board Regular
 
Join Date: Feb 2002
Posts: 217
Default

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.
2077delta is offline   Reply With Quote
Old Apr 10th, 2002, 09:56 AM   #7
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Quote:
On 2002-04-10 08:52, 2077delta wrote:
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.
What do you mean by "have the amounts rounded to zero..."?
Mark W. is offline   Reply With Quote
Old Apr 10th, 2002, 10:29 AM   #8
2077delta
Board Regular
 
Join Date: Feb 2002
Posts: 217
Default

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.
2077delta is offline   Reply With Quote
Old Apr 10th, 2002, 11:02 AM   #9
Mark W.
MrExcel MVP
 
Join Date: Feb 2002
Location: Austin, Texas USA
Posts: 11,654
Default

Quote:
On 2002-04-10 09:29, 2077delta wrote:
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.
Okay, this PivotTable...

*
Sum of Amount2Dept
AcctAdminSiteASiteBGrand Total
3000*5000*5000
3005**35003500
301050**50
330025**25
4000*-2000*-2000
4005**-1000-1000
4500*-700*-700
4505**-300-300
4600*-200*-200
4605**-75-75
4750*-45*-45
5000-1000**-1000
Grand Total-925205521253255

*

...uses a Calculated Field, 'Amount2', defined as...

=-ROUND(Amount,0)

[ This Message was edited by: Mark W. on 2002-04-10 10:04 ]
Mark W. is offline   Reply With Quote
Old Apr 10th, 2002, 12:27 PM   #10
2077delta
Board Regular
 
Join Date: Feb 2002
Posts: 217
Default

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.
2077delta is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 05:56 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes