Hey Guys,
I really need help with the below code. I have data in column F and it is divided in Columns A:D. I want the macro to stop when the cell value in F= "n/a". I get the Object required error message when I run the code....
Appreciate your help with that.... I am quite new to vba, so please don't judge me too hard..
thanks a lot in advance
I really need help with the below code. I have data in column F and it is divided in Columns A:D. I want the macro to stop when the cell value in F= "n/a". I get the Object required error message when I run the code....
Code:
Sub NameSplit()
Dim var As Variant
Dim rw As Long, i As Long
With Worksheets("Test")
For rw = 2 To .Cells(.Rows.Count, "F").End(xlUp).Row
var = Split(.Cells(rw, "F").Text, ";")
.Cells(rw, "A").Resize(1, UBound(var) + 1) = var
Next rw
If Value.Cells(.Rows.Count, "F").Text = "n/a" Then
Exit Sub
End If
End With
End Sub
Appreciate your help with that.... I am quite new to vba, so please don't judge me too hard..
thanks a lot in advance
Last edited by a moderator: