Excel-将数据透视表中的数字转换为文本(超过4个值)

Excel-将数据透视表中的数字转换为文本(超过4个值),excel,vba,pivot-table,Excel,Vba,Pivot Table,我已经建立了一个Excel表格,显示员工的等级编号。我还基于相同的数据创建了一个透视表 我希望分数在透视表中显示为文本: -If value = 1 then "A" is displayed in the table -If value = 2 then "B" is displayed in the table -If value = 3 then "C" is displayed in the table -If value = 4 then "D" is displayed in the

我已经建立了一个Excel表格,显示员工的等级编号。我还基于相同的数据创建了一个透视表

我希望分数在透视表中显示为文本:

-If value = 1 then "A" is displayed in the table
-If value = 2 then "B" is displayed in the table
-If value = 3 then "C" is displayed in the table
-If value = 4 then "D" is displayed in the table
-Else "N/A" is displayed
我尝试使用条件格式,但它只适用于2个值

你能帮我提供一个VBA脚本或其他想法吗

您可以在此处找到该文件的示例:

谢谢,
Damien

您可以单独格式化单元格,例如:

[=4]"D"  

但我建议您选择PT、Copy、Paste Special和其他位置的值,然后在Copy lookup中在查找表中选择PT中的数字。

您希望转换显示还是基础值?谢谢您的回复。我知道我可以单独格式化单元格,但报告包含3000多行。。。。我正在寻找一种自动格式化的方法。明白了,但有没有办法将值作为文本保存在PT中?好的,所以最后没有办法满足我的要求?@DamienMorvan如果有第二种意见,你就不能满足你的要求。pnuts有一个很好的解决方案,但正是这样。