I have a VBA code which create and change excel cell format validation rull.
Want a cell that allow user only to enter maximum four digit after a decimel (expl. 234.2345)
Please advice the VBA code do that.
for example,the following code allow the user to enter only 3 digit in the cell K:K
With .Range("K:K").Validation ' Normal Lead Time (working days)
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="1", Formula2:="999"
.IgnoreBlank = True
.ErrorMessage = "You can only enter three digits into this field"
.ShowError = True
Same as I mentioned above, want the cell P:P allow only 4 digit after a decimel if the user enter more than 4 digit after a decimal then disply message like "You can enter only 4 digit after the decimal"