Using fields to test on empty ?
Hi to all
I'm looking for a non VBA solution (macros not allowed) for the following problem:
Given: table with 3 columns. In columns A and B values can be entered but need not. Possible values in A and B: positive, negative, decimals and zero). The result of the calculation in column C is =(b1-a1) \# "+0,00;-0,00;0,00.
Challenge: The result must not be displayed if one (or both) of the cells A1 or B1 is empty. So I tried:
{ IF { = AND ( { = ABS(b1) } > 0 , { = ABS(a1) } > 0) } = 1 "{ =(b1-a1) \# "+0,00;-0,00;0,00 }" }
Works fine unless A1 and B1 are zero ("0") because then AND will be false. So I tried some calculation and set the condition to ">= 0" expecting empty fields would throw some error:
{ IF { = AND ( { = ABS(b1*1) } >= 0 , { = ABS(a1*1) } >= 0) } = 1 "{ =(b1-a1) \# "+0,00;-0,00;0,00 }" }
Unfortunately, Word does calculate with empty fields, it simply assumes "0". So there are equal results with empty cells and cells containing "0".
Do you see any chance to test cells on empty (or not numeric) just using fields? I don't.
Thanks for any help
NP
Last edited by NobodysPerfect; 10-08-2014 at 09:02 AM.
|