Excel IF 语句将文本与数字进行比较 [英] Excel IF statement Comparing text with number

查看:52
本文介绍了Excel IF 语句将文本与数字进行比较的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 IF 语句将一些数字组合在一起.在 A 列中,我有数字和文本值.

I was using IF statement to group some numbers together. In column A I have numeric and text values.

  A   B
1 s   =IF(A1>200,2345,"ad")

如果我这样做,则 B1 返回 2345.

If I do this then the B1 returns 2345.

Excel 如何将字符串值与数字值进行比较?

How does Excel compare string values with number values?

推荐答案

对于 Excel 比较运算符(例如 <, =, >代码>),数字值小于文本值,文本值小于逻辑值.您可以使用 VALUE 函数将文本值转换为数字值以进行数字比较.您可以使用 TEXT 函数将数字值转换为文本值以进行文本比较.

For the Excel compare operators (e.g. <, =, >), number values are less than text values which are less than logical values. You can use the VALUE function to convert text values to number values for number comparisons. You can use the TEXT function to convert number values to text values for text comparison.

这篇关于Excel IF 语句将文本与数字进行比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆