if less than

JosieJosie02

New Member
Joined
Jul 26, 2022
Messages
6
Office Version
  1. 2016
Platform
  1. Windows
I am trying to figure out how to mark a cell that either has a negative number, a positive number or no remaining

IF(OR(A1<0, A1>0), "negative", "positive") sees zero as positive.

How do I add a third condition to check, A1 can be 1, or -1, or 0?

This will be used to create a slice in a pivot, to show the values of Negative Amounts, Positive Amounts or No Remaining Amount.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
This seems to work.

=IF(A1<0, "Negative Amounts", IF(OR(A1>0), "Positive Amounts", "No Remaining Amounts"))
 
Upvote 0
Upvote 0
Solution
What is the purpose of the OR?

Cell Formulas
RangeFormula
B1:B3B1=IF(A1<0, "Negative Amounts", IF(OR(A1>0), "Positive Amounts", "No Remaining Amounts"))
C1:C3C1=IF(A1<0, "Negative Amounts", IF(A1>0, "Positive Amounts", "No Remaining Amounts"))
How to structure AND, OR and NOT functions individually. When you combine each one of them with an IF statement, they read like this:

  • AND – =IF(AND(Something is True, Something else is True), Value if True, Value if False)
  • OR – =IF(OR(Something is True, Something else is True), Value if True, Value if False)
  • NOT – =IF(NOT(Something is True), Value if True, Value if False)
 
Upvote 0
I meant in your formula, see my last post.
Column B has the OR, Column C does not.

I am fully aware of the AND/OR/NOT methods and syntax 🤣
 
Upvote 0
it it better to fully qualify the two if statements with OR🤣
But you only have ONE condition in that OR statement you written:
Rich (BB code):
=IF(A1<0, "Negative Amounts", IF(OR(A1>0), "Positive Amounts", "No Remaining Amounts"))

The OR serves no purpose when there is only one condition being checked there.
You can replace the part in Red just with:
A1>0
A1<0


Don't confuse the NESTED IF statements with your OR clause. Though they are both used in Combination, they are two totally different things here!
 
Upvote 0
The OR function here OR(A1>0) is completely unnecessary as it does not do anything as there is only one value, in fact you could just as easily use AND (although still pointless)
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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