ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Pivot Table Calculated Field- Help (https://www.excelbanter.com/excel-discussion-misc-queries/22008-pivot-table-calculated-field-help.html)

Ali

Pivot Table Calculated Field- Help
 
Hi,

I have a pivot table that is coming from a simple spreadsheet with following
columns:

Name, Credits - Where name is the name of an individual, and credit is the
credit amount they have. I want to add a calculated column on the pivot,
that has a value of "Allow" or "Deny" depending upon credit. So, if, Credit
< 5, the value of the calculated field should be Deny, else it shoudl be
Allow.

I tried using the If statement, but it doesn't seem to work for me when I
use string values. Is there a way for this to be done?

Will appreciate any help on this.

Thank you,

Ali



Faulk

Try adding a column to your data called "Allow/Deny" and use the
following formula:

Assuming Name is column A and Credit is column B, in column C type:

=if(B1<5,"Deny","Allow")

Then add the third column to your pivot table.


Ron Coderre

This may not be elegant, but it's functional:

Add the Sum of Credit field in a second time.
Display the Pivot Table
Select the Sum of Credit2 field and assign it this custom format:
[<5]"Deny";[=5]"Allow";General

Does that help?

Regards,
Ron



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com