# Help In An Excel If Statement Please

## Recommended Posts

I need to run this formula (\$C\$4*AH37+\$C\$5*AH38+\$C\$6*AH39+\$C\$7*AH40+\$C\$10*AH43+\$C\$12*AH48+\$C\$16*AH49

but on any negative numbers I need it to ignore them. Can anyone help me wright the formula?

##### Share on other sites

You should be able to cut and paste this:

If((\$C\$4*AH37+\$C\$5*AH38+\$C\$6*AH39+\$C\$7*AH40+\$C\$10*AH43+\$C\$12*AH48+\$C\$16*AH49)<0, 0, \$C\$4*AH37+\$C\$5*AH38+\$C\$6*AH39+\$C\$7*AH40+\$C\$10*AH43+\$C\$12*AH48+\$C\$16*AH49)

##### Share on other sites

Thats not exactly what I need, but I do thank you for the input. I need it to check each cell in that equation and when it comes to a cell with a negative number in it I need it to ignore it. Any idea on how to do this?

##### Share on other sites

Ignore the neg. cells yourself? I was never that good at Exel.... Way to go Papa Smurf... !!

##### Share on other sites

It looks like you'll have to put an if on every single pair and zero them out if the result is negative.

##### Share on other sites

Along the lines of what's been said, the easiest thing I can think of would be to break it down into individual parts, and have each part in a separate cell, then sum them.

In cell 1... If(C4*AH37<0, 0, C4*AH37)

cell 2... If(C5*AH38<0, 0, C5*AH38)

Then you could have another cell that equals cell1+cell2...

I don't think there's a way to do it in one cell though; you're only allowed 8 nested if statements per cell, and that would take more than 8 for me.

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.