IF statement

J

johnny mac

Hi,

I was wondering if someone could give me some help. I'm using exce
2000 and am a little rusty. I'm trying to write an IF statement tha
when the value of one cell is say 10 it performs a calculation. Ther
are several different calulations that i want to perfom and i wa
wondering if i could get it to recognise this.


There are two sheets and what i'm trying to is say "If the value o
cell is 10 then perfom calulation (sheet2 cell D11 - cell E12), but "I
the value of cell is 26 then perfom calulation (sheet2 cell D12 - cel
E12). I'm sorry if this isn't very clear but I just wondered if ther
was a quick way of doing this.

Many Thanks

J Ma
 
J

johnny mac

Hi,

The above statements works great but what would I need to use fo
multiple options i.e. if i want it to query 16 different options?

=IF(F2=10,Sheet2!$D$11-E2,IF(F2=11,Sheet2!$D$12-Sheet2!E12,0)),IF(F2=14,Sheet2!$D$15-E2),IF(F2=15,Sheet2!$D$16-E2),IF(F2=16,Sheet2!$D$17-E2),IF(F2=17,Sheet2!$D$18-E2),IF(F2=18,Sheet2!$D$19-E2),IF(F2=19,Sheet2!$D$20-E2),IF(F2=20,Sheet2!$D$21-E2),IF(F2=21,Sheet2!$D$22-E2),IF(F2=22,Sheet2!$D$23-E2),IF(F2=23,Sheet2!$D$24-E2),IF(F2=24,Sheet2!$D$25-E2),IF(F2=25,Sheet2!$D$26-E2),IF(F2=26,Sheet2!$D$27-E2)

This is essentially what I want it to do, I appreciate the above i
wrong but I would be grateful for any advice on how I could achiev
this.

Many Thanks
J ma
 
D

dcronje

if the pattern stays the same I would just use this formula in thi
case:

=INDIRECT("Sheet2!$D$"&(F2+1))-Sheet2!E
 
Top