Hi thanks for the info. I was kinda headed that way.
I did have another question. See enclosed file.
I am trying to parse all the values in col-A of sheet1. For some reason when you run this code (again see enclosed macro) when it reaches a string with a "-" in it ......code just seems to end like it finished.
Dim myinputwrksht As Worksheet
Dim new_prod_name As String
Dim junk1 As String
Set myinputwrksht = Workbooks("Parsing_product_name.xlsm").Worksheets("Sheet1")
last_row3 = 288
done = False
x = 2
Do While Not done
MsgBox (x)
If InStr(1, myinputwrksht.Range("A" & x).Value, "-", 1) > 0 Then
MsgBox ("in this compare thing")
myinputwrksht.Range("A" & x).Value = Trim(Left(myinputwrksht.Range("A" & x).Value, InStr(1, myinputwrksht.Range("A" & x).Value, "-", 1) - 1))
End If
x = x + 1
If x > last_row3 Then
done = True
MsgBox ("done is true")
End If
Loop
Bookmarks