I would write like this
Sub test()
    With Cells(1).CurrentRegion
        With .Columns(3)
            .Formula = "=min(a1:b1)&""-""&right(max(a1:b1),3)"
            .Value = .Value
        End With
    End With
End Sub
TextBox?...