Hi David,
If I am guessing correctly you want to combine Column B & C
together if there is a value in Column M (col 13), and then
delete the cell in Column C in such rows shifting the remaining
cells left. Suggest you try this on a copy of your worksheet.
Sub Combine_BandC_if_M_notempty()
'David McRitchie, 2005-03-08 programming
'assumes since this came from elsewhere that Column M
' is either empty or has a constant (not a formula)
' an empty string i.e. single quote would not be empty
Dim cell As Range, rng As Range, i As Long
On Error Resume Next
Set rng = Range("M:M").SpecialCells(xlConstants)
If rng Is Nothing Then Exit Sub
On Error GoTo 0
For Each cell In rng
Cells(cell.row, 2) = ActiveSheet.Cells(cell.row, 2) _
& " " & Cells(cell.row, 3)
Cells(cell.row, 3).Delete Shift:=xlToLeft
Next cell
End Sub
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages:
http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page:
http://www.mvps.org/dmcritchie/excel/search.htm
"David Bateman" wrote in message ...
I am importing data delimited, with tab and space selected if counta = 12
then everything is fine if counta = 13 then I have people with two word last
names. When this is the case how would I programmatically combine the names
in columns c, d to reflect this?
Thank you in advance.
db