View Single Post
  #2   Report Post  
Greg Maxey
 
Posts: n/a
Default

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?