PPRuNe Forums - View Single Post - Log book on a spread sheet
View Single Post
Old 9th Sep 2014, 11:45
  #8 (permalink)  
ExGrunt
 
Join Date: Mar 2003
Location: England
Posts: 286
Likes: 0
Received 0 Likes on 0 Posts
Hi stickandrudderman,

My deduction is that the last comma before the close bracket leaves the cell blank.
The IF function takes three parameters Test, Value if true, Value if false. If you leave it blank after the comma excel will insert a NULL on an evaluation of FALSE which is not the same as blank, which as Keef says can produce unexpected results when doing calculations.

This is a classic 'logic gate' problem, ie you want a value to appear if a check of another cell evaluates to TRUE. ie cell d99 equals P1.

In excel TRUE has the value 1 and FALSE has the value 0. This can then be used as a simple multiplier:

So in K99 enter the formula =(d99="P1")*j99

When d99 is not equal to P1 the brackets evaluate to 0.

I would not use a space as that is a 'text' value and can introduce a different set of errors. If you really want a NULL then do so explicitly by using "" (without a space).

As an aside: How are you dealing with minutes? Summing HH:MM values can cause other 'glitches'.

HTH

EG

Last edited by ExGrunt; 9th Sep 2014 at 15:21.
ExGrunt is offline