Help would be appreciated guys đź™‚

Iâ€™m creating a ledger and Iâ€™m a little confused on the IF,THEN function. My dilemma goes as follows:

```
Function for Cell E1:
If cell A1 contains the word "BUY", then execute the formula: "B1 * C1"
OR
If cell A1 contains the word "SELL", then execute the formula: "(100 - B1) * C1"
```

Note: Cell A1 will contain ONLY one of two words, â€śBUYâ€ť or â€śSELLâ€ť

Any help would be appreciated, this is like Greek to me :/

Try this:

```
=IF(A1 = "BUY", B1 * C1, IF(A1 = "SELL", (100 - B1) * C1, ""))
```

### AnswerďĽš

Try this in E1,

```
=if(b1="sell", 100 -b1, b1) * C1
```

Tags: excelexcel, function, text