Hi,
Could you please help me VBA coding for the scenario in the attached picture.
[ATTACH=CONFIG]68708[/ATTACH]
Regards,
Sri
Hi,
Could you please help me VBA coding for the scenario in the attached picture.
[ATTACH=CONFIG]68708[/ATTACH]
Regards,
Sri
Re: VBA Code for scenario
Try this:
Sub Muthysri()
Dim lrow As Long
Dim i As Long
Dim lrow2 As Long
Dim x As Integer
If Cells(2, 5) <> "" Then Range("E2:F" & Cells(Rows.Count, 6).End(xlUp).Row).Delete
lrow = Cells(Rows.Count, 2).End(xlUp).Row - 1
For i = 2 To lrow
If Cells(i, 1) <> "" Then
lrow2 = Cells(Rows.Count, 5).End(xlUp).Row + 1
Cells(lrow2, 5) = Cells(i, 1)
For x = i To lrow
If Cells(x, 2) = "Result" Then
Cells(lrow2, 6) = Cells(x, 3)
GoTo Nexti
End If
Next x
End If
Nexti:
Next i
End Sub
Display More
Sincerely,
Max
Re: VBA Code for scenario
Hi Max,
Its working fine. Thank you,
Regards,
Sri
Don’t have an account yet? Register yourself now and be a part of our community!