excel vba convert to number code example
Example 1: excel vba make integer
Public Function MakeInteger%(LoByte As Byte, HiByte As Byte)
If HiByte And &H80 Then
MakeInteger = ((HiByte * &H100&) Or LoByte) Or &HFFFF0000
Else
MakeInteger = (HiByte * &H100) Or LoByte
End If
End Function
Example 2: vba text to general
'VBA ONLY
Sub CleanTextToGeneral()
With Selection
.NumberFormat = "General"
.Value = .Value
End With
End Sub