IF statement

  • Thread starter Thread starter Wanja
  • Start date Start date
W

Wanja

I am trying to calculate some basic figures. Previously
someone keyed in a formula which looked like this where
D6=mileage in kms and E6=total expenses.

=IF(CELL("TYPE",D6)="V",IF(CELL("TYPE",E6)="V",IF(D6=0,0,IF
(E6=0,0,ROUND(E6/D6,1))),0),0)

I need to know what this formula reads.
 
You have to first break the formula down bit by bit.

a. =IF(CELL("TYPE",D6)="V", If the data in D6 is a Value
go b. if it is not go to g.
b. IF(CELL("TYPE",E6)="V", Again if the data in E6 is a
Value c. if not go to f. -
c. IF(D6=0, If value of D6 is Zero (0) go to d. if not go
to e. -
d. 0, Place value zero as the answer
e, IF(E6=0,0,ROUND(E6/D6,1))), *****
f. 0), Place value zero as the answer
g. 0) Place value zero as the answer

***** This is another series within an IF argument
h. IF(E6=0, if E6 is Zero go to i. If not go to j.
i. 0,
j. ROUND(E6/D6,1))), round the decimal place of the
formula E6 divided by D6 to 1 decimal place.

I have tried to describe each step for you but it may be a
little confusing [it is only 7am here]

The function "TEXT" can determin the type of data in a
cell in an argument to determin the next step in a
formula. Values are:-
If value is TYPE returns
Number 1
Text 2
Logical value 4
Error value 16
Array 64
 
Back
Top