如何在Excel单元格的表达式中设置货币格式?

发布于 2024-11-02 16:43:18 字数 211 浏览 0 评论 0原文

我想弄清楚如何在 Excel 中的表达式中格式化结果。我

=IF(C30 > B30, "You would save $" & Format(C30-B30, "Currency") & "!", "No savings")

在单元格内写了,但不起作用。简而言之,我想要在表达式内格式化货币。

如何?

I am trying to figure out how to format the result in an expression in Excel. I wrote

=IF(C30 > B30, "You would save $" & Format(C30-B30, "Currency") & "!", "No savings")

inside the cell but it doesn't work. Simply put, I want the currency formatted inside the expression.

How?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

海拔太高太耀眼 2024-11-09 16:43:18

您是否尝试过文本功能?

=IF(C30 > B30, "You would save " & Text(C30-B30, "$0.00") & "!", "No savings")

Have you tried the Text function?

=IF(C30 > B30, "You would save " & Text(C30-B30, "$0.00") & "!", "No savings")
柠檬色的秋千 2024-11-09 16:43:18

许多年后,这也有效!

=IF(C4>D4,"You would save " & DOLLAR(C4-D4,2) & "!","No Savings!")

Many years later, this works, too!

=IF(C4>D4,"You would save " & DOLLAR(C4-D4,2) & "!","No Savings!")
沙与沫 2024-11-09 16:43:18

使用这个公式

=IF(C30 > B30, "You would save " & Currency(C30-B30, 0) & "!", "No savings")

Use this formula

=IF(C30 > B30, "You would save " & Currency(C30-B30, 0) & "!", "No savings")
能怎样 2024-11-09 16:43:18

我认为您正在寻找连接函数。 Excel似乎没有您指定的格式功能。

这在 Excel 2007 中对我有用:

=IF(C30 > B30, CONCATENATE("You would save $",C30-B30, "!"), "No savings")

I think you are looking for the Concatenate function. Excel doesn't seem to have the Format function you have indicated.

This worked for me in Excel 2007:

=IF(C30 > B30, CONCATENATE("You would save $",C30-B30, "!"), "No savings")
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文