I don't think you can do exactly what you asked for using just formulas in some other cells:
Making Excel functions affect 'other' cells
'=if(A2="cancelled"; B2=0; "")' Simply returns a logical value for "question" if B2 is equal to 0 if A2 happens to be cancelled. This is not what you want.
You could create a VBA code that would be executed each time something changes in your sheet.
automatically execute an Excel macro on a cell change
Press Alt+F11 then double click on the sheet you want the functionality and add the code
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 And Target.Value = "cancelled" Then
Target.Offset(0, 1) = 0
End If
End Sub
But I would strongly advise against using this solution, because now you would simply be overwriting whatever you have in cell in column B with value 0. Therefore you would lose your previous data in this cell.
What I would do:
1) If the data in column B is fed from somewhere else (not manually written) then I would write the function there, i.e. "=if(A2="cancelled";0; .get_original_value)"
2) If the input is manual I would add another column to keep "real value" there that would work like the function from point 1)
3) Or instead of 2) you can change only the display of the cells in column B based on values in column A by using conditional formatting
You can start reading for example here
http://www.excel-easy.com/data-analysis/conditional-formatting.html
Most likely you calculate some aggregates (like sums) and want the cancelled value to be 0 for the sake of this calculations. By changing just the display the value would remain non-zero so instead of regular SUM you would have to use SUMIF and exclude the cancelled values, for example =SUMIF(A:A;"<>cancelled";B:B).