Hi guys! I’ve been reading the forums for a few months, but this is my first time posting. I’m pretty new to VBA, and I’ve been trying to figure this one out for days. Basically, some data with long descriptions is pulling back broken into Excel, and I need a way to repair it. The data pulls broken in the same way every time, so it should be pretty easy to write a macro to fix it, but I’m having some trouble with the concatenate portion.
I need to concatenate these broken values from where they show up in Column A, back to the correct cell in Column C, and afterwards delete the rows where those broken descriptions appeared. On a lot of these pulls there are thousands of rows, so doing it by hand isn’t really an option.
The data always pulls with a numeric counter in Column A (1,2,3,4,5…) , so I’m using that to help the macro detect where the descriptions are broken. There are some blank rows in the data breaks so establishing a range is tricky, which is why I’m using ActiveCell Offsets. Here's the VBA I've gotten through so far:
Any help you could provide would be extremely appreciated! Thanks VBA masters!
I need to concatenate these broken values from where they show up in Column A, back to the correct cell in Column C, and afterwards delete the rows where those broken descriptions appeared. On a lot of these pulls there are thousands of rows, so doing it by hand isn’t really an option.

The data always pulls with a numeric counter in Column A (1,2,3,4,5…) , so I’m using that to help the macro detect where the descriptions are broken. There are some blank rows in the data breaks so establishing a range is tricky, which is why I’m using ActiveCell Offsets. Here's the VBA I've gotten through so far:
Code:
Sub concatExample()
Dim y As Integer
Dim totalCount As Integer
Dim c As Range
y = 1
totalCount = InputBox("Input total number of Items")
Range("A2").Select
Do While ActiveCell.Value <> totalCount
If ActiveCell.Value = y Then
ActiveCell.Offset(1).Select
y = y + 1
Else
ActiveCell.Offset(-1, 2).Select
Set c = Range(ActiveCell) 'make ActiveCell the location where the broken data will wind up.
ActiveCell.Offset(1, -2).Select
Do Until ActiveCell.Value = y
'Add value of ActiveCell to starting location above
ActiveCell.EntireRow.Delete 'Deletes (cleans up) the row
ActiveCell.Offset(1).Select
Loop
y = y + 1
End If
Loop
End Sub
Any help you could provide would be extremely appreciated! Thanks VBA masters!
