Hi All,
I am trying to limit the user to input decimal data in a range of a worksheet. like A27:B37.
But the data validation function is already used by another function to ban the formula input.
Is there any VBA code can limit the user to input the number with decimal automatically?
Thank you.
The below code only shows the signle cell whether integer or not.
I am trying to limit the user to input decimal data in a range of a worksheet. like A27:B37.
But the data validation function is already used by another function to ban the formula input.
Is there any VBA code can limit the user to input the number with decimal automatically?
Thank you.
The below code only shows the signle cell whether integer or not.
VBA Code:
Function isInteger(c As Variant) As Boolean
If Not IsNumeric(c) Then Exit Function
isInteger = (c = CLng(c))
End Function