hallo,
i need to do this in vba, because i need the operations later under openoffice and also in ms office 2003/2007.
openoffice cant't do the field operration i needed.
0 > 10 % then print a special character
5 bis 10% then print a special character
5 bis -5% then print a special character
-5 bis -10% then print a special character
0 < -10% then print a special character
the special character should be an arrow (0 °, 45°, 90°, 135°, 180 ), to show an development
thanks a lot
os
macropod said:
Hi OS,
To see how to do this and a wide range of other calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party
In particular, look at the items titled 'Testing Or Returning Cell Contents In Tables' and 'Testing Or Returning Text Strings
With Logical Functions In Bookmarks'.
For your particular example, you could use a field coded as:
{IF{=A1}> {=A2} "Special Character" "Some other character"}
or
{IF{=A1-A2}> 0 "Special Character" "Some other character"}
Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy &
paste them from this message.
--
Cheers
macropod
[Microsoft MVP - Word]
os said:
hallo,
in my word document i create a table (3x3).
i try to read out the cells and build an if then construct.
if a1 > a2 then a special character
is there somebody who can helb me with the code.
thanks.
BO