How to make macro work with all cells of column A? So that can paste into several cells at a time and the data is converted. I need this in order to be able to convert multiple data at once.
I have this macro:
Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.CountLarge > 1 Then Exit Sub
If Target.Column <> 1 Then Exit Sub
Dim v As Variant
v = Split(Target, " ")
If UBound(v) <> 1 Then Exit Sub
If Right(Target, 1) <> "m" Then
Target = v(1) & " " & v(0)
End If
End Sub
This macro converts the data to (any number)m and (any number)M be on the right.
For example:
L3 280M
500m FMA
Nest 475m
340m Pr6
720M uT10
etc.
Convert to:
L3 280M
FMA 500m
Nest 475m
Pr6 340m
uT10 720M
etc.