Q:

Need to get the charaters available before comma

Consider if a string has multiple comma's (,) i would like to get the 3 characters that are present before each comma in excel VBA macro. for example in the string "AR6, AB4, UUF, ABG, UUG, AC4, ABF," in this string i would like to get the value of AR6 first then print then second AB4 and so on. the string may contain n number of Commas. Could you please help me to get this.

A:

Try this:
Sub test()
 Dim st As String
 Dim a As Variant
 st = "AR6, AB4, UUF, ABGtt, UUGyy, AC4, ABF,"
 a = Split(st, ",")
 For i = 0 To UBound(a)
  Debug.Print Left(Trim(a(i)), 3)
 Next
End Sub

