Hi,
could you pls help me to write a vba code in excel to store a value in a variable from a cell which is just after the dash or hyphen
example:
AB - XYZ
here am trying to extract only XYZ.
Am trying with following
MyVal = Mid(Worksheets("Sheet1").Cells(lr, "AG"), InStr(Worksheets("Sheet1").Cells(lr, "AG"), "-")+1, Len(Worksheets("AT Provision").Cells(lr, "AG")))
(Here lr is Lastrow)
Thanks
Sanjeev