Home |
Search |
Today's Posts |
#5
Posted to microsoft.public.word.tables
|
|||
|
|||
Finding the End of the Cell
That does the trick. Thanks!
"Doug Robbins - Word MVP" wrote: The following code in a macro will ask you to enter the character that is at the end of the cells that you want to delete and then do all of the deletions for you:: Dim delchar As String delchar = InputBox("Enter the character at the end of the cells that you want to delete.") Dim cellrange As Range Selection.HomeKey wdStory Selection.Find.ClearFormatting With Selection.Find Do While .Execute(findText:=delchar, Forward:=True, Wrap:=wdFindStop) = True If Selection.Information(wdWithInTable) Then Set cellrange = Selection.Cells(1).Range cellrange.End = cellrange.End - 1 If Selection.Range.End = cellrange.End Then Selection.Range.Delete End If End If Loop End With -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell referencing in table formulas - just ONE adjacent cell | Tables | |||
How do I move from cell to cell iin a table column in Word 2003? | Tables | |||
cell marker missing - can not type text into cell | Tables | |||
How to wrap text from cell to cell in a table. | Tables | |||
How do I auto copy data from cell in a word table to another cell. | New Users |