(Solved) – Using VBA to Convert Integers into Text

(solved)-–-using-vba-to-convert-integers-into-text

I am trying to write a Vba that will take the numbers in one column and convert the numbers to text in another column.

For example:

4 will be “quarterly”,
1 will be “annually” and 12 will be “monthly”.

This is what I wrote but only the last line is working.

Sub Convert ()

    Range("J6:J1447").Formula = "If(I6:I299=1, (""Annually""), """")"

    Range("J6:J1447").Formula = "=If(I6:I299=2, (""Semi-Annually""), """")"

    Range("J6:J1447").Formula = "=If(I6:I299=4, (""Quarterly""), """")"

    Range("J6:J1447").Formula = "=If(I6:I299=12, (""Monthly""), """")"

End Sub

Leave a Reply

Your email address will not be published. Required fields are marked *