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

Bradley,

I don't know how you could do this with a field. I played with a macro
today that if you put your cursor in the a blank cell in the column then it
will count a inert the number of "non-empty" fields.

Sub Test()
Dim i As Long, j As Long
Dim iCount As Long
Dim oCell As Cell
Dim oCol As Column

If Selection.Information(wdWithInTable) = True Then
i = Selection.Cells(1).RowIndex
j = Selection.Cells(1).ColumnIndex
End If
For Each oCell In Selection.Tables(1).Columns(j).Cells
If oCell.Range.Characters.Count 1 Then
iCount = iCount + 1
End If
Next
ActiveDocument.Tables(1).Cell(i, j).Range.InsertBefore "Count = " & iCount &
" "


End Sub

--
Greg Maxey/Word MVP
A Peer in Peer to Peer Support

Bradley C. Hammerstrom wrote:
The field code {=Count(Below)} works for me, but I want to skip blank
cells in the column. How?