# Help me solve this IF formula

• Hi all,

I have a list of product names on Column A, I have March Product Price on Column B and April Product price in column C.

I want to find out

• If the product price from March to April increase then write (Increased)
• If the product price from March to April decreased then write (Decreased)
• If the product price from March to April stay the same then write (Price not changed)
• If the product price cell from March (Column B) is empty and also April price cell (Column C) is empty then write (Blank)
• If the product price cell from March (Column B) is empty but April price cell (Column C) has value then write (New Price)
• If the product price cell from March (Column B) has value but April price cell (Column C) is empty then write (Product Withdrawn)

I have tried writing the code but it only prints increased, decreased and price not changed but it does not print Blank, New Price and Product withdrawn. I want all six argument to print

"Blank",

"New Price",

"Product Withdrawn",

"Increased",

"Decreased",

"Price not changed"

If someone can help me to solve this please. Thanks in advance

My Code

=IF(AND(ISBLANK(B4), ISBLANK(C4)), "Blank",

IF(AND(ISBLANK(B4), NOT(ISBLANK(C4))), "New Price",

IF(AND(NOT(ISBLANK(B4)), ISBLANK(C4)), "Product Withdrawn",

IF(B4 < C4, "Increased",

IF(B4 > C4, "Decreased",

IF(B4 = C4, "Price not changed", ""))))))

• I would guess that the cells are not blank, even though they look blank. If you attached the workbook with the formula, people would be able to debug for you.

Cheers, Glenn.

Beauty is in the eye of the beer-holder.

• If a cell has a formula, it is NOT blank. Even if the result is a null string ... being "" in other words.

Cheers, Glenn.

Beauty is in the eye of the beer-holder.

• Try this:

=IF(AND(ISBLANK(B2), ISBLANK(C2)), "",IF(AND(ISBLANK(B2), NOT(ISBLANK(C2))), "New Price",IF(AND(NOT(ISBLANK(B2)), ISBLANK(C2)), "Product Withdrawn", IF(C2 > B2, "Increased", IF(C2 < B2, "Decreased",IF(C2 = B2, "Price not changed", ""))))))

If you want Blank to be printed then try the below formula

=IF(AND(ISBLANK(B2), ISBLANK(C2)), "Blank",

IF(AND(ISBLANK(B2), NOT(ISBLANK(C2))), "New Price",IF(AND(NOT(ISBLANK(B2)), ISBLANK(C2)), "Product Withdrawn", IF(C2 > B2, "Increased", IF(C2 < B2, "Decreased",IF(C2 = B2, "Price not changed", ""))))))

• FYI, ISBLANK only responds to empty cells. If they contain a null string ( see Glenn's explanation) it will not work. On the other hand, you can use COUNTBLANK which counts empty cells or seemingly empty cells ( containing an null string).