"+0.28 - +0.16%"
"+3.42 - +0.61%"
"-2.62 - -0.25%"
"-0.44 - -0.53%"
In the above example I have pulled this information from yahoo finance which indicates a stock's Change in price and the % change in price.
I have written some code in VBA that will remove the quotes at the beginning and the end of the string but I cannot seem to find a way to remove the "-" (which is in bold) from the middle of the string.
The "-" is actually chr(45)
The format for this information would look better if the extra minus sign was replaced with a "/" to give it a separator.
Since the information is indicating change there still could be a negative change but it seems as though the format adds in an extra character Chr(45) or the minus sign "-"
If possible may I get and example of removing it and then code to replace the "-" with a "/"
Application.ScreenUpdating = False
For Each e In Range("h11", Range("H" & Rows.Count).End(xlUp))
If Left(e, 1) = (Chr(34)) Then e = Mid(e, 2, Len(e) - 1)
If Right(e, 1) = Chr(34) Then e = Left(e, Len(e) - 1)
'If Right(len = Chr(45) Then e = Len(e) - 11
Next e
Application.ScreenUpdating = True
May I please get some help on this or for someone to point me in the right direction with an example
Thanks in advance
Bookmarks