IF(AND(OR multiple step fx including positive and negative integers

brose99

New Member
Joined
Jun 16, 2018
Messages
35
wxyzaa
8251-108159
9-231118-149
10

<tbody>
</tbody>


What is the correct way to enter the following multi step fx to satisfy the following:

In cell Z8 = IF W8 is > 0 AND X8 < 0, OR IF W8 < 0 AND X8 > 0, AND X8 <=-150, THEN 1, ""
In cell AA8 = IF W8 is > 0 AND X8 <0, OR IF W8 <0 AND X8 > 0, AND Y8 > 39.5 AND Y8 < 190, THEN 1, ""

Thanks in advance for your help.
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Is this the right logic? Would be a help if there were more values in W, X, Y to check against the formula with the results you expect.

Z column:

Code:
=IF(AND(X8<=-150,OR(AND(W8>0,X8<0),AND(W8<0,X8>0))),1,"")

AA:

Code:
=IF(AND(OR(AND(W8>0,X8<0),AND(W8<0,X8>0)),AND(Y8>39.5,Y8<190)),1,"")
 
Last edited:
Upvote 0
Hi,

See if this works for you for what I could understand from your requirement, if this is not correct please do give some more example of the data set above and expected output example


Book1
WXYZAA
8251-108159 1
9-231118-149
Sheet2
Cell Formulas
RangeFormula
Z8=IF(AND(OR(AND(W8>0,X8<0),AND(W8<0,X8>0)),X8<=-150),1,"")
AA8=IF(AND(OR(AND(W8>0,X8<0),AND(W8<0,X8>0)),Y8>39.5,Y8<190),1,"")
 
Upvote 0
You are correct, but it looks like I am trying to cram too many arguments into one fx.

Please allow me to simplify my question:

Can you help me write the first part of this fx, please?

In cell Z8 = IF W8 is > 0 AND X8 < 0, OR IF W8 < 0 AND X8 > 0, THEN 1, ""

Nevermind....I just answered this question with trial and error...
 
Last edited:
Upvote 0
Hi,

See if this works for you for what I could understand from your requirement, if this is not correct please do give some more example of the data set above and expected output example

WXYZAA
8251-1081591
9-231118-149

<colgroup><col style="width: 25pxpx"><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
Z8=IF(AND(OR(AND(W8>0,X8<0),AND(W8<0,X8>0)),X8<=-150),1,"")
AA8=IF(AND(OR(AND(W8>0,X8<0),AND(W8<0,X8>0)),Y8>39.5,Y8<190),1,"")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

BOOM! Nailed it Aryatect! THANK YOU!
 
Upvote 0

Forum statistics

Threads
1,215,040
Messages
6,122,806
Members
449,095
Latest member
m_smith_solihull

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