Excel - how to add a string after 2 or 3 position in columns

You need to write this macro in Visual Basic


Sub replaceat()

Dim rng As Range Dim

cl As Range

Set rng = Range(Selection.Address)


For Each cl In rng.Cells

cl.Formula = “=Replace(“”” & cl.Value & “”” ,3,0,””.””)”


End Sub


Then you can execute it on any selection via the Developer > Macros menu


Leave a comment

Your email address will not be published

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

− 5 = 4