I'm a bit stumped trying to remove some characters from a string with VBA.
I can sort of get it working with a formula using =Left... but I can only get one side working, but I'd prefer to use a command button to set it up, so I'd like to accomplish it in vba.
In range AJ1:AJ200 I have a several different wages.
E.g.
[TABLE="width: 64"]
<colgroup><col></colgroup><tbody>[TR]
[TD]$80.70/hr[/TD]
[/TR]
[TR]
[TD]$69.70/hr[/TD]
[/TR]
[TR]
[TD]$60.525/hr[/TD]
[/TR]
[TR]
[TD]$60.22/hr[/TD]
[/TR]
[TR]
[TD]$53.12/hr[/TD]
[/TR]
[TR]
[TD]$52.275/hr[/TD]
[/TR]
[TR]
[TD]$48.30/hr[/TD]
[/TR]
[TR]
[TD]$40.35/hr[/TD]
[/TR]
[TR]
[TD]$34.85/hr[/TD]
[/TR]
[TR]
[TD]$24.15/hr[/TD]
[/TR]
[TR]
[TD]$17.25/hr[/TD]
[/TR]
[TR]
[TD]$15.25/hr[/TD]
[/TR]
</tbody>[/TABLE]
Some have 3 decimal points, some have 2. However, all of them have "/hr" at the end, and "$" in the beginning.
I'd like to remove all "$" & "/hr" from the entire range in VBA and convert these to a number.
I can sort of get it working with a formula using =Left... but I can only get one side working, but I'd prefer to use a command button to set it up, so I'd like to accomplish it in vba.
In range AJ1:AJ200 I have a several different wages.
E.g.
[TABLE="width: 64"]
<colgroup><col></colgroup><tbody>[TR]
[TD]$80.70/hr[/TD]
[/TR]
[TR]
[TD]$69.70/hr[/TD]
[/TR]
[TR]
[TD]$60.525/hr[/TD]
[/TR]
[TR]
[TD]$60.22/hr[/TD]
[/TR]
[TR]
[TD]$53.12/hr[/TD]
[/TR]
[TR]
[TD]$52.275/hr[/TD]
[/TR]
[TR]
[TD]$48.30/hr[/TD]
[/TR]
[TR]
[TD]$40.35/hr[/TD]
[/TR]
[TR]
[TD]$34.85/hr[/TD]
[/TR]
[TR]
[TD]$24.15/hr[/TD]
[/TR]
[TR]
[TD]$17.25/hr[/TD]
[/TR]
[TR]
[TD]$15.25/hr[/TD]
[/TR]
</tbody>[/TABLE]
Some have 3 decimal points, some have 2. However, all of them have "/hr" at the end, and "$" in the beginning.
I'd like to remove all "$" & "/hr" from the entire range in VBA and convert these to a number.