IF thread not working

kjrst9

New Member
Joined
Dec 13, 2011
Messages
5
Using Excel 2001 on Windows XP Pro, I have three IF formulas that I want to combine into one.

<TABLE style="WIDTH: 48pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=64><COLGROUP><COL style="WIDTH: 48pt" width=64><TBODY><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; WIDTH: 48pt; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20 width=64>IF(AND(H24>0,H23>0,A28=TRUE),MAX(500,50*H23),0)</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20>IF(AND(H24>0,H23=0,A28=TRUE),0,0)</TD></TR><TR style="HEIGHT: 15pt" height=20><TD style="BORDER-BOTTOM: #d4d0c8; BORDER-LEFT: #d4d0c8; BACKGROUND-COLOR: transparent; HEIGHT: 15pt; BORDER-TOP: #d4d0c8; BORDER-RIGHT: #d4d0c8" height=20>IF(AND(H24=0,A28=TRUE),MAX(500,50*H23),0)</TD></TR></TBODY></TABLE>

Independantly each works fine. When I add them together, I get an error. I'm guessing this must be in my parentheses? Here's my string:

IF(AND(H24>0,H23>0,A28=TRUE),MAX(500,50*H23),0,IF(AND(H24>0,H23=0,A28=TRUE),0,0,IF(AND(H24=0,A28=TRUE),MAX(500,50*H23),0)))

What's wrong with it?????
 
Hi and welcome

See this bit in red

IF(AND(H24>0,H23>0,A28=TRUE),MAX(500,50*H23),0,IF(AND(H24>0,H23=0,A28=TRUE),0,0,IF(AND(H24=0,A28=TRUE),MAX(500,50*H23),0)))

There only wants to be one zero
 
Upvote 0
Try it like this:

Code:
=IF(AND(H24>0,H23>0,A28=TRUE),MAX(500,50*H23),IF(AND(H24>0,H23=0,A28=TRUE),0,IF(AND(H24=0,A28=TRUE),MAX(500,50*H23),0)))
 
Upvote 0
Eliminating that zero still gives me an error. (Though the intent was, true or false the answer still is zero.) :(
 
Upvote 0
Actually you have too many superfluous 0's in there

Syntax:
=IF(Condition, TRUE, FALSE)

nothing else

IF(AND(H24>0,H23>0,A28=TRUE),MAX(500,50*H23),IF(AND(H24>0,H23=0,A28=TRUE),0,IF(AND(H24=0,A28=TRUE),MAX(500,50*H23),0)))
 
Upvote 0
How about

=AND(A28=TRUE,OR(H24=0,AND(H24>0,H23>=0)))*MAX(500,50*H23)
 
Upvote 0

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