简体   繁体   English

如果大于或小于零

[英]if greater than or less than and zero

This is stock status across the country.这是全国的库存状况。

How to apply the if condition following stock statement.如何在股票报表后应用 if 条件。

If there is any stock in column A than its “Blanks” in Column C如果 A 列中有任何股票而不是 C 列中的“空白”

If there is no stock in column A (0) and if there stock in column B than its “To Order” in Column C如果 A 列 (0) 中没有库存并且 B 列中有库存而不是 C 列中的“待订购”

If Column A greater than B and IF Column B greater than A than its “Blanks” in Column C如果 A 列大于 B 且如果 B 列大于 A 大于其在 C 列中的“空白”

If Column A and B are equal to 0 than its “ Urgent” in column C如果 A 列和 B 列等于 0,则它在 C 列中的“紧急”

 UK USA TEXT 1920 0 Blanks 1920 0 Blanks 0 362 To Order 0 362 To Order 113 0 Blanks 113 0 Blanks 196 672 Blanks 1000 89 Blanks 89 1000 Blanks 0 0 Urgent 0 0 Urgent

You should look in to these different part of the code.您应该查看代码的这些不同部分。 This is tested on Your values.这是在您的价值观上进行测试的。 Used IF AND OR使用IF AND OR

 =IF(AND(A2=0,B2=0),"URGENT",IF(OR(A2>0;B2<A2),"BLANKS",IF(AND(A2=0,B2>0),"TO ORDER",A2>0)))

the third condition :第三个条件:

If Column A greater than B and IF Column B greater than A than its “Blanks” in Column C如果 A 列大于 B 且如果 B 列大于 A 大于其在 C 列中的“空白”

is useless since you already specified if a > 0 then it's blank.没用,因为你已经指定了如果 a > 0 那么它是空白的。

the if syntax in excel is : =IF( condition ;IFTRUE ;IFFALSE) excel中的if语法是: =IF( condition ;IFTRUE ;IFFALSE)

to answer your question try this =IF(A2 > 0,"blanks",IF( B2 > 0,"to order","urgent"))回答你的问题试试这个=IF(A2 > 0,"blanks",IF( B2 > 0,"to order","urgent"))

According to all the Conditions Mentioned above, this is your 100% working and tested solution:根据上面提到的所有条件,这是您 100% 有效且经过测试的解决方案:

=IF(A1>0,"Blanks",IF(AND(A1=0,B1>0),"To Order",IF(OR(A1>B1,B1>A1),"Blanks","Urgent")))

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM