If statement with non-numeric data in a pivot table

misterfluff

New Member
Joined
Jul 1, 2011
Messages
3
Im trying to do a pivot table in which one column is a calculated field based on non-numeric data (eg the if statement is
If('Question'="why",'Answer',0), where 'Question' and 'answer' are fields), but i just get 0 for everything.

If I change the logical test to a numerical one it works, but then if its a numerical test and the false value is non numeric (say, IF('Number'=5,'Prime',"Gosh") then whenever it is false it just says #VALUE instead of Gosh. yet with the same test, if i swap "Gosh" for a numeric field it works.

What is going on? How do i solve this?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,518
Messages
6,179,248
Members
452,900
Latest member
LisaGo

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