I thought this would be easy but it is not working. In Data Validation I choose Allow Custom and this formula:
Everything I enter fails.
Examples of what I expect.
Out In
0004 4
0023 23
0548 548
4964 24964
Note: For alignment I put the output first.
THIS SHOULD WORK!
Code:
=AND(ISNUMBER(RC),IF(LEN(RC)>4,LEFT(RC,4),IF(LEN(RC) > 0, RIGHT("0000" & RC, 4),"")))
Everything I enter fails.
Examples of what I expect.
Out In
0004 4
0023 23
0548 548
4964 24964
Note: For alignment I put the output first.
THIS SHOULD WORK!
Last edited: