![]() |
|
#2
|
||||
|
||||
|
That depends on how you're going about it. For a designated table & column, you could use something based on:
Code:
Sub CheckTableData()
Application.ScreenUpdating = False
Dim t As Long, c As Long, r As Long, l As Long, bFit As Boolean
With ActiveDocument
If .Tables.Count = 0 Then Exit Sub
t = InputBox("Which table?" & vbCr & "Choose from 1 to " & .Tables.Count, , 1)
c = InputBox("Which column?" & vbCr & "Choose from 1 to " & .Tables(t).Columns.Count, , 1)
With .Tables(t)
bFit = .AllowAutoFit
.AllowAutoFit = False
For r = 1 To .Rows.Count
l = l + Len(.Cell(r, c).Range.Text) - 2
Next
.AllowAutoFit = bFit
End With
End With
MsgBox l
Application.ScreenUpdating = True
End Sub
In each case, the macro returns how may text characters are in the designated cells.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Calculate average in a column, but ignore empty cells?
|
alnonymous | Word | 1 | 08-09-2022 07:46 PM |
| If a2 is not empty, color empty cells in b2:af2 | turkanet | Excel | 2 | 08-20-2017 11:00 PM |
| Apparently empty (blank) cells aren't empty | daymaker | Excel | 3 | 03-08-2012 03:41 PM |