Formula to return a "1" if two cells have a positive and negative value

SALO

Board Regular
Joined
Jul 27, 2008
Messages
66
In Cell (W6) I have a value for example of 100,000 In Cell (AE6) will have a value of for example -100,000. In Cell (AF) I want to put a formula that says "if the number in (W6) is a positive number and the number in (AE6) is a negative number the return a value of "1". and vice versa if the number in cell (W6) is a negative number (-100,000) and number in Cell (AE6) is s positive (25,000) then also return a value of "1". If any one can help me I take this oppurtunity to thank you in advance as I having difficulty figuring this out.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
What result do you want if both are positive or both negative? DO you want to subtract one from the other or add them together?
 
Upvote 0
For reason that does not work. Its not returning a "1". Any ideas? Thanks for the help
 
Upvote 0
It will only return 1 if one value is positive and the other is negative. Isn't that what you wanted?
 
Upvote 0
Thanks a bunch worked good. Maybe you could help me with the following also
Also in the next cells (AG) and (AH) respectively I want to do the following
In Cell (W6) I have a value for example of 100,000 In Cell (AE6) will have a value of for example -100,000.
In Cell (AG) I want to put a formula that says "if the number in (W6) is a positive number and the number in (AE6) is a negative number then return a Text value of "A".
In Cell ( AH) I want to put a formula that says "if the number in (W6) is a negaitive number and the number in (AE6) is a Positive number then return a Text value of "Z".
 
Upvote 0
Try

AG =IF(AND(W6>0,AE6<0),"A","")

AH =IF(AND(W6>0,AE6>0),"Z","")
 
Upvote 0
That really worked great. I will post this in the general also but Im now need to do this.

In Cell AJ6 I want a formula that will look in cell (AH6) and if there is a "Z" and if in Cell (AE6) the % value (example 40%, 30%) is lower then the % value in (AJ4) then return a text value of "X"
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,920
Members
448,533
Latest member
thietbibeboiwasaco

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