PPRuNe Forums - View Single Post - Log book on a spread sheet
View Single Post
Old 9th Sep 2014, 02:16
  #6 (permalink)  
Keef

Official PPRuNe Chaplain
 
Join Date: Apr 2001
Location: Witnesham, Suffolk
Age: 80
Posts: 3,498
Likes: 0
Received 0 Likes on 0 Posts
Originally Posted by stickandrudderman
Thanks for the quick reply.


in K99:
=IF(D99="P1",J99,0)
in L99 you'd have
=IF(D99="P2",J99,0)


But this doesn't seem to make sense as both "IF" result in the same "J99,0"
No because K99 is looking for "P1" and L99 is looking for "P2". Only one of those two will display a number.
If D99 is "P1" then K99 will display J99. If it isn't "P1" then it will display zero (or not display any value if formatted that way - see below).
Likewise L99 will display J99 only if D99 says "P2".

My deduction is that the last comma before the close bracket leaves the cell blank. If I used the "0" as in Keef's example above the I would get "0" in that cell.
I don't like using the "comma and no value" to blank a zero-value cell. That can do strange things to addition later on. If you want a true blank, then use " " to insert a space. If you want all zeros suppressed, that's best done by a format statement:
Format - Cells - Custom - 0.0 ; (0.0);
which would show positive numbers as 0.0, negatives as (0.0), and zero as blank. The space after 0.0 and before the ; means the positive and negative numbers are aligned.
Keef is offline