Originally Posted by madmonkey
Any chance you could post what you done so far?
|
To madmonkey and anyone who can help.
I have discovered the cause of the Syntax Error. IF functions should not start with an = sign, they either start with IF or (IF depending on the content. However I have now not been able to create an IF function that shows the result of a calculation - only blank or sometimes text.
We (my wife and I) have been using an old version of WordPerfect (6.1 for Windows 3.1, from 1984) to produce printed invoices to send in the post. The tables in this old program leave the tables of Word 2003 behind. Microsoft's idea is that one should use an embedded Excel worksheet for this purpose. However, as far as I can see, an embedded worksheet cannot wrap to the next page if it gets too long to fit on one page but a table will.
We now want to send more invoices by e-mail and since Microsoft have persuaded everybody that Word is the best word processor no-one uses WordPerfect anymore. Hence I am trying to produce an invoice file in Word 2003 using a table with the very limited table functions that it has.
I have tidied up my basic design as follows:-
A basic table with enough rows to enter up to 10 jobs - containing all the formulas since it is not possible to insert rows and copy formulas down automatically updating cell references as is possible in Excel AND the tables in the old WordPerfect program.
The first row is a heading row
In cell g1 there is 17.5% to set the VAT rate
For each row, amounts without VAT are entered in cell f, VAT is calculated in cell g and the total in cell h.
Using row 5 as an example, the basic formulas that work are
=ROUND((g1*f5),2) in cell g5 and
=ROUND((f5+g5),2) in cell h5.
However this shows 0.0 in cells g and h if no entry is made in cell f (i.e. cell f is left blank for that row because there is no job entry in that row).
Since it is often convenient to create a new invoice from a previous one for that client (saving with a different name) and then edit it, especially since each also has another page with a fairly standard letter with that client's address etc., I want to avoid having to start from scratch each time and also deleting any unwanted rows.
This is why I am trying to use the IF function to control what shows.
Following the Word help, with the basic syntax of
IF Expression1 Operator Expression2 TrueText FalseText (using spaces as separators)
and using one of the more detailed examples as a guide I have tried the following (cell g5 given as an example):-
( IF ( = g1*f5) > 0 "( = ROUND((g1*f5),2))" )" "" )
I have also tried this without the outer brackets and also with additional brackets round the first g1*f5 and also with ROUND((g1*f5),2)) instead of the first g1*f5 in various combinations.
However all these this give a blank in cell g5 even if there is an entry in cell f5, except one of them, which I now do not know, showed the text of the formula instead of the calculated number!
Hope I have not bored everybody with all this but any help to solve the problem would be very much appreciated.
Derek Shaw.