Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I reference cells in a Word table?
In a large Word table, is it possible (staying in Word and not using Excel)
to, for example, have column A contain a number, and coulmn B contain that number plus 4, for a large number of rows? I would like to do this without having to enter a different formula in each of the column B cells. Is there any way to use relative cell addressing? A macro to enter the formulas, perhaps? |
#2
|
|||
|
|||
William,
A VBA maestro would probably call this crude, but you might try the following: Sub ScratchMacro() Dim i As Long Dim aValue As Range Dim bValue As Range Dim oTbl As Table Set oTbl = Selection.Tables(1) For i = 1 To oTbl.Rows.Count Set aValue = oTbl.Cell(i, 1).Range If IsNumeric(aValue) Then With aValue .MoveEnd Unit:=wdCharacter, Count:=-1 End With Set bValue = oTbl.Cell(i, 2).Range bValue = aValue + 4 End If Next End Sub -- Greg Maxey/Word MVP A Peer in Peer to Peer Support William Bub wrote: In a large Word table, is it possible (staying in Word and not using Excel) to, for example, have column A contain a number, and coulmn B contain that number plus 4, for a large number of rows? I would like to do this without having to enter a different formula in each of the column B cells. Is there any way to use relative cell addressing? A macro to enter the formulas, perhaps? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
word xp crashes after macros are recorded | Microsoft Word Help | |||
WP Delay Code - Word Equiv | Microsoft Word Help | |||
Excel worksheet in Word linked text boxes | Page Layout | |||
Text space in table cells in Word 2003 (using Windows XP) | Tables | |||
how can I use autosum in a WORD table with blank cells | Tables |