Valid if only contains numbers

LEN([BARCODE])=LEN(TEXT(NUMBER([Barcode])))

Can I get a second opinion on if the above valid if formula means that my [Barcode] column can’t contain a non number character? It seems to but I haven’t done thorough testing.

TEXT() will render the Number value for display, which will include thousands separators if the number has enough digits. Does the original value have thousands separators? Perhaps use CONCATENATE() instead to avoid display formatting.

Converting a textual numeric value to a numeric value then back to a textual value will strip leading zeros, which could change the length of the converted value. You’ll need to handle that.

([BARCODE] = RIGHT(("0000000000" & NUMBER([BARCODE])), LEN([BARCODE])))
1 Like

You are extra right too since the barcode can start with 0s!

1 Like