View Single Post
 
Old 11-21-2015, 06:57 AM
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

If I understand your request correctly, you need to add a condition to modify only unfilled cells e.g.

Code:
Set oCell = oDoc.Tables(1).Rows(iRow).Cells(5).Range
    oCell.End = oCell.End - 1
    If Len(oCell) = 0 Then 'Add This line
        oCell.FormattedText = oRng.FormattedText        'use this line to keep the formatting
        'oCell.Text = oRng.Text 'use this line if the formatting is not required
        Exit Do
    End If 'And this one
__________________
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