Stack Exchange
3 Condition in Excel
I need these condition: 

If b<=0, a>=0 = a/2 
if b<=0, a<=0 = 0 
if b<=0 = 0

I use these 2 formulas: 
=IF(E1<=0,D1/2,IF(E1>=0,"",IF(D1<=0,"")))
=IF(E1<=0&D1>=0,D1/2,0),elseif(E1<=0&D1<=0,0),IFelse(E1>=0,0)

But when b<=0 and a<=0 this is not working. That I want to say: if both b & a cells are negative or <=0 it is not working. Is it possible for those 3 condition apply in excel? 
I have tried these formulas, but none of them working correctly for condition no2: 
=IF($E$30<=0,$D$26/2,IF($E$30>=0,"",IF(D26<=0,"")))  
=IF(E30<=0&D26>=0,D26/2,0),elseif(E30<=0&D26<=0,0),elseif(E30>=0,0) 
=IF(E30<=0,D26/2,IF(AND(D26>=0,E30<=0),D26/2,0)) 
=IF(E30<=0&D26<=0,0),IF(E30<=0&D26>=0,D26/2)


What should happen if b > 0

Condition 3 means that the other conditions don't matter; the result will always be 0 if b<=0.

Please consider editing your question because it states 3. if b <= 0 = 0 and not 3. if b > 0 = 0. What does happen when a == 0? Currently, conditions 1 and 2 conflict if a == 0. Probably condition 2 should be 2. if b<=0, a<0 = 0?

This should do what your three rules want it to do -
=IF(AND(A1<=0,B1>=0),C1/2,IF(AND(A1<=0,B1<=0),0,IF(A1<=0,0,"No conditions met")))

Personally I'd probably use this 
=IF(A1<0,IF(B1>=0,C2/2,IF(B1<=0,0,0)),"No conditions met")


Solution I
Assuming slightly modified conditions

If b <= 0 and a >= 0 then c = a/2 
if b <= 0 and a <  0 then c = 0  (The result is the same for a < 0 and a <= 0. I changed it for mathematical correctness)
if b > 0 then c = 0 (According to the first to Excel formulas in the question it should be b >= 0. Since there was no distinct result for b == 0, I decided for b > 0. The alternative version is below the 'edit')

I would like to suggest
=IF(B1 > 0, 0, IF(A1 < 0, 0, A1/2))

or
=IF(AND(B1<=0,A1>=0),A1/2,0)

Column A contains the data for a and column B the data for b.

edit I:
Solution II
Alternatively it can be:

If b < 0 and a >= 0 then c = a/2 
if b < 0 and a <  0 then c = 0  (The result is the same for a < 0 and a <= 0. I changed it for mathematical correctness)
if b >= 0 then c = 0

The solution would be
=IF(B1 >= 0, 0, IF(A1 < 0, 0, A1/2))

or
=IF(AND(B1<0,A1>=0),A1/2,0)


Rather than post an answer to a different question, it would make more sense to wait for clarification from the OP.  There are endless alternatives to the question's parameters if it is something other than what was posted.

@fixer1234 Answer edited. Considering the first two formulas posted in the question, there is a tipo in condition 3 which should be b >= 0. Where we place the case a==0 does not matter because c = 0 = a/2 for a == 0. Therefore, there are two possible alternatives: (i) condition 1 and 2 should be b < 0 or (ii) condition 3 should be b > 0.

People post Q's where they don't recognize they've over-complicated it. b<=0 in condition 3 could be correct, not a typo.  If there's a typo, condition 3 may not be it.  Or there might be information the OP forgot to include.  In your Solution II, you assumed that it was the a<=0 that should be changed, rather than the a>=0 (same with b<=0).  But you don't know the details behind the OP's formulas.  It's better to get clarification first, then answer, rather than post a shotgun answer where people need to wade through non-applicable solutions, and that could still miss the actual question.

@fixer1234 Good point. I think the next time about it before I post. Would it be proper procedure to remove this answer?

At this point, you might as well leave it until the OP gets back with clarifications.  It's possible you guessed right, or it will give the OP something to react to.
