PrimeTimeAction
New Member
- Joined
- Aug 1, 2018
- Messages
- 9
I have a macro (see below) that concatenates selected cells into the upper left cell. The problem is that it keeps the values in rest of selected cell untouched. I want it to either
- delete the text from the rest of the selected cells or
- delete the entire rows of these selected cells.
Code:
Sub Macro1()
Dim r As Range
Dim rr As Range
Dim i As Integer
Dim t As String
i = 0
t = ""
For Each r In Selection
If i = 0 Then
i = 1
Set rr = r
End If
t = t & r.Value
Next
rr.Value = t
End Sub