Hello,

I am struggling to figure out why this loop isn't working for me. I am trying to have the macro return the concatenated value of Column C and D when Column B = ";;Result". If Column B Does not equal ";;Result" I need it to return the value above.

Dim i As Long
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Sheet1")

i = 1

Do While i <= LastResultRow
    If ws.Cells(i, 1).Value = ";;Result" Then
    Cells(i, 0).Value = Cells(i, 2).Value & " " & Cells(i, 3).Value
    
    Else
    Cells(i, 1).Value = Cells(i - 1, 1).Value
    
    End If

i = i + 1


Loop
Unfortunately, it is not recognizing the data that's in the cells and I think is just returning blank values.