Wednesday, 22 July 2026

How to Convert Numbers to Roman Numerals in Excel Using VBA Macro

 Sub ConvertToRoman()

    Dim cell As Range

    For Each cell In Selection

        If IsNumeric(cell.Value) And cell.Value > 0 And cell.Value < 4000 Then

            cell.Value = Application.WorksheetFunction.Roman(cell.Value)

        End If

    Next cell

End Sub

No comments:

Post a Comment