MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Complicated Formula, need help!


Posted by Pamela on August 22, 2001 9:19 AM

I am trying to create a formula that will look at 2 different columns in a worksheet and based on the results of both of these cells will return either one of two possible set values or the value from a particular cell. I have been trying to use the IF statement for this and have been unsuccessful up to this point. I either recieve a #Value or FALSE result if it doesn't ignore it completely and delete the formula from the cell.

Example: =If(((H11="R" and G11<=8, G11)or(H11="R" and G11>8, 8),0))

I am trying to say that if Cell H11 is equal to R and Cell G11 is equal to or less than 8 then return the value of cell G11, OR If Cell H11 is equal to R and Cell G11 is greater than 8 then return 8 else return 0 value.

Can anyone help?!


Posted by Jay Deitch on August 22, 2001 9:46 AM

Try this;

=IF(H11="R",IF(G11<=8,G11,8),0)

Jay

Posted by Pamela on August 22, 2001 9:56 AM

Thank you so much! It works perfectly!!!