Simple cell prog. with IF...ELSE

E

Ekser

Hello XL Gurus!

I need to warn you - I'm a perfect newbie! :confused:

Well, this is what i would like to do in an Excel sheet:

I have made some kind of table, and in some of the columns I need t
make some calculations *depending * on some inputs in some of the othe
columns.

For instance, a price calculation:

I need to calculate some averages, to sum some cells...(that ain't
problem), but then I need the calculation to add 15% in case that th
value one of my cell is (for example) VAT. Let me ilustrate naivly:

G2 = (if C2='VAT' then (A1*B1)+((A1*B1)*0.15)else(A1*B1))

So I need some kind of IF...ELSE code which I don't have a clue how t
do in Excell.

Cheers! ;
 
K

Katie

Hi there,

To do this, insert the following formula into G2:

=IF(C2='VAT',(A1*B1)+((A1*B1)*0.15),(A1*B1))

The IF statement is IF(<condition>,<then statement>,<else statement>)

If you need more detail, look in help, it's quite detailed.

Hope this helps,
Katie
 
J

Jim May

G2 = (if C2='VAT' then (A1*B1)+((A1*B1)*0.15)else(A1*B1))

In G2 enter =If(C2= "VAT",(A1*B1)*1.15,(A1*B1)) << Format to display
proper decimals
 
A

Aladin Akyurek

G2:

=A1*B1 + (A1*B1)*(C2="VAT")*0.15
Hello XL Gurus!

I need to warn you - I'm a perfect newbie! :confused:

Well, this is what i would like to do in an Excel sheet:

I have made some kind of table, and in some of the columns I need t
make some calculations *depending * on some inputs in some of the othe
columns.

For instance, a price calculation:

I need to calculate some averages, to sum some cells...(that ain't
problem), but then I need the calculation to add 15% in case that th
value one of my cell is (for example) VAT. Let me ilustrate naivly:

G2 = (if C2='VAT' then (A1*B1)+((A1*B1)*0.15)else(A1*B1))

So I need some kind of IF...ELSE code which I don't have a clue how t
do in Excell.

Cheers! ;
 
Top