Help with OR/AND with IF

Xirom431

Board Regular
Joined
Dec 2, 2010
Messages
111
Office Version
  1. 365
Platform
  1. Windows
Hi,

Thank you in advance for the help. I have 4 Columns


21Open1

12Open1

If either column A or B is greater than 1, Column C will show Open. I got that far. However, I need help with D Column. I would like to show the different between Column A and B when Column C is Open. If A or B is blank, C and D should be blank.

Thanks,
 
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Maybe
Excel Formula:
=if(c2="open",a2-b2,"")
 
Upvote 0
Try this (for an entry on Row 2):
Excel Formula:
=IF(AND(A2<>"",B2<>""),ABS(A2-B2),"")
 
Upvote 0
Try this (for an entry on Row 2):
Excel Formula:
=IF(AND(A2<>"",B2<>""),ABS(A2-B2),"")
Hi Joe,
I think I got the formula semi-correct. How do I make C & D columns blank if A & B are blank?


11Closed0
32Open0
Closed0


C Column formula.
=IF(ABS(H6-G6)>0,"Open","Closed")

D Column
=IF(I7="Open",ABS(H6-G6),0)
 
Upvote 0
Did you try the formula I suggested?
Also please update your profile as requested. It helps to know what functions you have available.
 
Upvote 0
Did you try the formula I suggested?
Also please update your profile as requested. It helps to know what functions you have available.
I tried the formula but it did not come out correctly.
 
Upvote 0
Hi Joe,
I think I got the formula semi-correct. How do I make C & D columns blank if A & B are blank?


11Closed0
32Open0
Closed0


C Column formula.
=IF(ABS(H6-G6)>0,"Open","Closed")

D Column
=IF(I7="Open",ABS(H6-G6),0)
I thought you said you already got the column C formula working column working on your own, and you needed help with the column D formula.
I gave you the answer to that in my post, but for some reason, you did not use it! Your formula does not resemble mine!

Both Fluff and I have given you answers to try, so please try them.
Also note that your original post mentions columns C and D, but your formulas are using G and H.

And it isn't clear what you want to return if column A is something like "2" and column B is empty.
Should that return "Open" or "Closed"?
 
Upvote 0
I thought you said you already got the column C formula working column working on your own, and you needed help with the column D formula.
I gave you the answer to that in my post, but for some reason, you did not use it! Your formula does not resemble mine!

Both Fluff and I have given you answers to try, so please try them.
Also note that your original post mentions columns C and D, but your formulas are using G and H.

And it isn't clear what you want to return if column A is something like "2" and column B is empty.
Should that return "Open" or "Closed"?
I finally got the formula for

Column C formula
=IF(A6="","",IF(ABS(A6-B6)=0,"Closed","Open"))
Column D formula
=IF(C6="","",IF(C6="Open",ABS(B6-A6),0))
 
Upvote 0
Solution

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