You don't need macro.

Here, try this:

Formula: copy to clipboard
=TRIM(LEFT(SUBSTITUTE(A1,"$",REPT(" ",255)),255))