#1
|
|||
|
|||
Auto update in formula/Obtain the name of the cell
I have been adding simple operations into some of my documents, and i realize that word does not auto update my fields when i change the values from a table, the results of an operation remains with the old value.
Is there any option to auto update this fields in order to allow someone to fill a document and the results of an operation will constantly update as the person fill the table? __________________________________________________ ________ In order to don't open 2 threads i will ask here if anyone knows a way to know whats the name of a cell in a table im in, since i have a messy document with a lot of separations and added tables inside tables. Thanks in advance for any information of any of the 2 answer im sharing with you people. |
#2
|
||||
|
||||
It appears your table uses formfields, in which case setting their 'calculate on exit' property will cause all of the calculations to update immediately you exit any of those fields. If you're not using formfields, selecting the table and pressing F9 will update all the calculations, or you could use content-controls in conjunction with a content-control on-exit macro.
As for getting cell addresses, the simplest way is to select the cell(s), then run the following macro, which outputs the range on Word's status bar: Code:
Sub CellRange() Dim StrAddr As String ' This macro displays the address of a table's selected cell range ' and the table's last cell address on Word's Status Bar With Selection If .Information(wdWithInTable) = True Then StrAddr = "The selected " If .Cells.Count = 1 Then StrAddr = StrAddr & "cell address is: " Else StrAddr = StrAddr & "cells span: " End If StrAddr = StrAddr & ColAddr(.Cells(1).ColumnIndex) & .Cells(1).RowIndex If .Cells.Count > 1 Then StrAddr = StrAddr & ":" & ColAddr(.Characters.Last.Cells(1).ColumnIndex) & _ .Characters.Last.Cells(1).RowIndex End If With .Tables(1).Range StrAddr = StrAddr & ". The table's last cell is at: " & _ ColAddr(.Cells(.Cells.Count).ColumnIndex) & .Cells(.Cells.Count).RowIndex End With StatusBar = StrAddr Else StatusBar = "The selection is not in a table!" End If End With End Sub Function ColAddr(i As Long) As String If i > 26 Then ColAddr = Chr(64 + Int(i / 26)) & Chr(64 + (i Mod 26)) Else ColAddr = Chr(64 + i) End If End Function
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks alot Paul, i finally finish the document last version and it works perfectly, i just discover some weeks ago how useful word can be c: have a nice day men.
|
Tags |
autoupdate, localize a cell name |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Auto update date | mavisyew | Word | 2 | 07-15-2015 08:44 AM |
I want to use formula to auto update cells with information | Steve81uk | Excel | 15 | 01-09-2015 12:58 PM |
Change formula cell range based on cell value | Scoth | Excel | 4 | 10-25-2012 07:51 AM |
Project Auto-Update | hB-sys | Project | 0 | 04-15-2010 06:46 AM |
Auto-populate an MS Word table cell with text from a diff cell? | dreamrthts | Word Tables | 0 | 03-20-2009 01:49 PM |