Google Sheets – How to Multiply Cell Value Based on Keyword

google sheets

I would like to apply a transformation to a table which basically looks like this:

If there is a certain keyword in column A, then the number in column B should be multiplied by 2.

Is that possible with google spreadsheets? if so, how?

Best Answer

Add the following formula to the cell C1, and fill down as necessary

=IF(A1="keyword",B1*2,B1)

References
IF - Google Editors Help