Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excell Like Function Ability in Word - Is it possible?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is it possible to put Excell like functions in Word? For example I would like to have a few fields that I would be able to have Word do math fuctions on. I have been hunting aroung for awhile but I haven't had much luck. It seems like it should be possible.




Chad Kemp
 
You can do math type functions. Create a table, and then click on TABLE->FORMULA and add what you need.

It uses the Excel format to sum numbers. Also, there are a set of standard functions you can apply too, again all Excel format.
 
That works great. Thanks.

Is there any way for one table to reference another table? For example it is easy enough to do somthing like Sum(A1:D1) for each table but how do I do functions on cells in different tables? Is it possible?



Chad Kemp
 
Just reposting in hopes that someone knows how to have Excell like tables in Word reference each other.


Chad Kemp
 
Why not do all your calcs in excel and then insert the spreadsheet as an object into Word ?
Geoff
 
What I am doing is generating a dynamic Word doc using Cold Fusion on the web.

Once I generate the Word doc I no longer have any control over it. The user can do with it whatever they want. There are 1-N sections created and the user needs to assign a percentage to each section. All sections need to add up to 100%. Now I recognize that I can't prevent them from making a mistake once I generate the doc so I was hoping I would have a feild that would add up all of the feilds so it would be easy for the user to verify that they can add to 100.

So you see because the sections are broken up the feilds associated with each section will be seperated from each other. It seems to me that there would be a way to identify witch table I am trying to reference but I haven't found any documentation on it. In desperation I have tried 1:A:1 etc. but not surprisingly it of course didn't work.



Chad Kemp
 
I'll try a couple of things out and post back. I am not aware of referencing multiple tables in Word, but give me a day or so.
 
AkakiaOSU & Hasit,

I don't believe you can reference multiple tables, only the one you are in. You could make the whole document one big table, and let the paragraphs run in one long merged cell & leave the cells you need to calculate split.

The only other thing I can think of are word fields (try the help file for Web Forms) You can insert a field for numeric input, and tell it to calculate on exit. The calculated field will not be available for the user to select. This will only work if you are allowing changes only the the "fields" you specify. None of the body of the document can be altered. This is because Fields won't work until the document is protected, thus making everything else unavailable.

I'd be interested in other solutions also.

AngO

 
I'm fooling around with bookmarks and input Feilds in Word now.

I did find this:

The following examples refer to values in a table. Cell references refer to cells in the table that contains the = (Formula) field. If the field isn't in the referenced table, mark the table with a bookmark and specify the bookmark, followed by the cell references.

Field Result
{ = SUM(ABOVE) }
(inserted in a table cell)
The sum of cells, from the cell above the field to the top of the column or to the first blank cell or illegal value.
{ = SUM(Table3 C3) } The contents of the cell in the third column of the third row of the table marked by the bookmark "Table3."
{ = MIN(Table3 A1:D3) } Smallest value in the first four cells in the third row of the table marked by the bookmark "Table3."
 
What I found in the MS help works like expected. I haven't figured out the Input fields just yet, but I think I have what I want but it seems that the formula field doesn't update automatically.

Is there a way to Update the Field automatically?



Chad Kemp
 
Chad,
In Word things are backwards from Excel (at least I think so). You need to have the "pieces" of the formula marked for automatic update, not the formula itself. This way anytime you change a number in any part of the formula, the answer will change.

Thanks for the update on the table bookmarks, I didn't think of that!!

Please post back if you have specific field questions.
AngO
 
How do you mark the individual pieces for an automatic update? It doesn't seem to be part of Word. Do I need to use VB or macros?



Chad Kemp
 
Chad,
The numbers in the table you are adding up, must be inside a field. If they are not in a field, there is no way (outside of VB) to have them automatically calculate on exit. The "on exit" is when you tab out of the field to the next field.

For example:

Item Price Quantity Amount
Apple $.89 5 $4.45

The Price and quantity must be fields, as well as the formula in the amount. If set up this way, anytime the price or the quantity changes, the amount will automatically update.

Does this help?
AngO
 
What type of fields do I need to enter? Are the cells of a table not considered fields? I tried entering different kinds of fields but none of them seed to act like an insert cell.



Chad Kemp
 
I can't get the feilds to automatically calculate when I tab out of the field like you mention is possible. Are you certain that it is possible to do?



Chad Kemp
 
If you follow the directions, use the *calculate on exit* in the property of ALL formfields, protect the form, then fill in the numbers, it should work. You may need to do a print preview (this action updates the fields in the document).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top