Trim and Mid with VBA

J

Jeff

Hi,

I need help to include this formula: =MID(TRIM(A7),12,20) into a existing
VBA procedure.

I need to run the procedure in Column C for all the names in Column B

Thank you,
 
D

Don Guillett

To get rid of extra spaces within the text

Sub trimit()
x = Mid(Application.Trim(Range("a7")), 3, 6)
Range("f4") = x
End Sub
 
Top