View Single Post
 
Old 03-17-2015, 10:46 PM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

I would agree with Andrew, but for the numbering, which appears to be paragraph numbering, and with such numbering the number sequence would be lost, so I guess it may need a macro after all. The following should work with a table format like that shown that has auto numbered cells:
Code:
Sub ProcessTable()
Dim oTable As Table
Dim oRow As Row
Dim oCell As Range
Dim LastRow As Long, i As Long
    If Not Selection.Information(wdWithInTable) Then
        MsgBox "Put the cursor in the table to be processed."
        GoTo lbl_Exit
    End If
    Set oTable = Selection.Tables(1)
    LastRow = oTable.Rows.Count
    For i = LastRow To 2 Step -1
        Set oRow = oTable.Rows(i)
        Set oCell = oRow.Cells(1).Range
        oCell.ListFormat.ConvertNumbersToText
        oCell.End = oCell.End - 1
        oCell.Text = Replace(oCell.Text, Chr(9), "")
        If Len(oRow.Cells(4).Range) > 2 Then oRow.Delete
    Next i
lbl_Exit:
    Exit Sub
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote