Reputation: 1
Amount | Payment model |
---|---|
100 | Yearly |
6 | Monthly |
In the 3rd column, I wish to introduce a formula which will automatically read the entry in column "Payment Model". If the entry is, "Yearly" it will just copy the value from column "Amount". If the entry is, "Monthly" it will multiply the value with 12.
Thanks in advance
Tried using the "if" statement, its not working.
Here is my formula: =IF($B2 == "Yearly",$A2*1,$A2*12)
Throws me a Formula error everytime.
Upvotes: 0
Views: 437
Reputation: 76414
This is the solution:
=$A2 * IF($B2="Monthly", 12, 1)
We need $A2
anyway and we use the IF
to determine what to multiply it with. Note that the comparison is done via the =
operator.
Upvotes: 0
Reputation: 2732
Excel does not use the double equals.
The formula you want, provided by Mayukh Bhattacharya and BigBen:
=IF($B2="Yearly",$A2*1,$A2*12)
Upvotes: 1