Hello,
I got pruned this macro out of one I current use. IT traverses the spreadsheet and appends the cell to the one above if eveything else on the row is empty.
However, when I runn the pruned version, it completes the sheet, but I then get :-
Run time error "13"
Type mismatch
the macro is :-
Dim R As Range, C As Range, All_Data As Range, lRow As Long
'
Application.StatusBar = "Appending wrapped notes...Please Wait"
'''''Append wrapped data
Set All_Data = Range([G2], Cells(Cells.Rows.Count, "H").End(xlUp))
For Each R In All_Data
If R = "" Then
For Each C In Range(R, R.End(xlToRight))
If C.Value <> "" Then
With Cells(lRow, C.Column)
.Value = .Value & " " & C.Value
C.Clear
End With
End If
Next
Else
lRow = R.Row
End If
Next R
the debugger stops at " IF C.Value <>"" Then
Thanks in advance as always
I got pruned this macro out of one I current use. IT traverses the spreadsheet and appends the cell to the one above if eveything else on the row is empty.
However, when I runn the pruned version, it completes the sheet, but I then get :-
Run time error "13"
Type mismatch
the macro is :-
Dim R As Range, C As Range, All_Data As Range, lRow As Long
'
Application.StatusBar = "Appending wrapped notes...Please Wait"
'''''Append wrapped data
Set All_Data = Range([G2], Cells(Cells.Rows.Count, "H").End(xlUp))
For Each R In All_Data
If R = "" Then
For Each C In Range(R, R.End(xlToRight))
If C.Value <> "" Then
With Cells(lRow, C.Column)
.Value = .Value & " " & C.Value
C.Clear
End With
End If
Next
Else
lRow = R.Row
End If
Next R
the debugger stops at " IF C.Value <>"" Then
Thanks in advance as always