You can use the IF
function in Excel to accomplish this. The IF
function checks if a condition is met, and returns one value if it is true and another value if it is false.
Here’s how you can use the IF
function to make outgoing amounts negative:
=IF(F2="B", G2*-1, G2)
This formula checks if the value in cell F2 is “B”. If it is, it multiplies the value in cell G2 by -1. If it’s not, it simply returns the value in cell G2.
You can enter this formula in cell H2, and then drag the fill handle (the small square at the bottom-right corner of the cell) down to copy the formula to the other cells in the column.