I have an excel file that is the outcome of a PDF to Excel conversion. The data in the excel file did not come clean for some of the columns.
What needs to be accomplished:
I have created a For Each loop to go over Column "B" and find the Auction Number. Once found, a second For Each loop was created to go over Column "E" and find the first occurrence of an address and cut this cell and move it to the same row of the auction number.
The second for each loop keeps starting from the top of column "E" and not from where the for each loop row number in column "B" ended.
The Code is about 85% complete and no errors when running
Dim rCell As Range
Dim rCell2 As Range
Dim rCell3 As Range
Dim rRng As Range
Dim rRng2 As Range
Dim rRng3 As Range
Dim i As Integer
Dim j As Integer
Dim strMyValue As String
Set rRng = Sheet2.Range("B:B")
Set rRng2 = Sheet2.Range("E:E")
Set rRng3 = Sheet2.Range("F:F")
i = 0
j = 0
For Each rCol In rRng.Columns
For Each rCell In rCol.Rows
If InStr(rCell.Value, "FEB") > 1 Then
i = rCell.Row
Debug.Print rCell.Address, rCell.Value, rCell.Row, i
For Each rCol2 In rRng2.Columns
For Each rCell2 In rCol2.Rows
If InStr(rCell2.Value, ", PA 1") > 1 Then
If InStr(Cells(rCell2.Row + 1, "E"), ", PA 1") = 0 Then
Debug.Print Cells(rCell2.Row + 1,"E").Value
Cells(rCell2.Row + 1, "E").Clear
rCell2.Cut Cells(rCell.Row, "D")
Appreciate any help. I just cant solve it ..