way to test line before / after, without !REF if delete?

N

nastech

Hi, not sure if trick exists for something like the following.
problem arises when deleting a line before / after... lemme guesse, offset?

=IF(C9="","",OR(C9="v1",AND($C$9="w:",C8<>"v1",C10<>"v1")))
 
N

nastech

Think I found it:

=IF(C9="","",OR(C9="v1",AND($C$9="w:",OFFSET(C9,-1,0)<>"v1",OFFSET(C9,1,0)<>"v1")))
 
Top