Help with Excel - Calculating 2 cells based on the text within another

Copper Contributor

Hello ! I hope someone can help me :)


My issue is, I need to calculate the multiplication of 2 cells, when a completely different cell returns a specific text.



Cell A = 10

Cell B = 5

Cell C = HAT

Cell D = (this is the cell I want to run the calculation of Cell A* Cell B - but only if Cell C = HAT


if Cell C were to = "Trousers" I would not want the calculation to occur.


Your help would be greatly appreciated !!!





7 Replies



You can try this nested IF formula.

multiply with condition.JPG 

best response confirmed by HansVogelaar (MVP)



=IF(C1="HAT", A1*B1, "")
This was so fast ... Thank you so much for the quick response.. This formula worked perfectly.
Thank you so very much.
Thank you Sergei - This also works perfectly.. very much appreciated.


Apologies to be incredibly annoying but I have an extension to that issue.. are you able to assist?


Your formula works great but now i have a simple sum in the next field which is now returning a #value error..

Cancel that - I've worked it out.


Great to know. If you share result that will be useful for other people in the community.

1 best response

Accepted Solutions
best response confirmed by HansVogelaar (MVP)