Calculated Fields and Text

Tarver

Board Regular
Joined
Nov 15, 2012
Messages
109
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
In a pivot table, can I insert a calculated field to evaluate a text entry?

My calculated field is
=IF(DESCRIPTION="C",AMOUNT*10)

My result is always 0, regardless of whether or not the corresponding entry is a C or not.

If I reverse it and make my field look for inequality, I get this:
=IF(DESCRIPTION<>"C",AMOUNT*10)

This results in every single entry (even those that are C) being multiplied by 10.

What am I missing?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Is "DESCRIPTION" and "AMOUNT" a named cell? If not, then your issue is that excel doesn't know where to look for these. For example;

Use
Code:
=IF(B2="C",C2*10,0)

If you have your table set up as
A
B
C
D
1
Name
Description
Amount
Formula
2
A
C
10
100
3
B
A
10
0

<tbody>
</tbody>
 
Last edited:
Upvote 0
Thanks for your response.

No, "DESCRIPTION" and "AMOUNT" are not named ranges. They are the fields in the PivotTable that I'm working with. In the PivotTable Calculated Field options box, it's possible to refer to those fields in building a formula for the Pivot Table to evaluate.

The formula that evaluates the contents of "DESCRIPTION" as being NOT equal to an entry works, so I know the formula is at least being processed. However, there's a syntax issue or some other limitation that I'm not aware of which is keeping the formula from working properly when the formula asks to evaluate DESCRIPTION as being equal to any text string.
 
Upvote 0

Forum statistics

Threads
1,215,055
Messages
6,122,902
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top