G Guest Aug 17, 2007 #1 Is there an easy way to trim zeros from the front of a string? The Trim function will only trim spaces.
Is there an easy way to trim zeros from the front of a string? The Trim function will only trim spaces.
G George Nicholson Aug 17, 2007 #2 Val() returns as much of the numerical value from the beginning of a string as it can (not including any leading zeros). Val("00123460") and Val("1234 60th Avenue") both return 123460 (as a number). HTH
Val() returns as much of the numerical value from the beginning of a string as it can (not including any leading zeros). Val("00123460") and Val("1234 60th Avenue") both return 123460 (as a number). HTH
J John W. Vinson Aug 17, 2007 #4 try cstr(cint("0003450")) Click to expand... or - safer because it will handle numbers over 65535 and also faster - cstr(clng("00871243")) John W. Vinson [MVP]
try cstr(cint("0003450")) Click to expand... or - safer because it will handle numbers over 65535 and also faster - cstr(clng("00871243")) John W. Vinson [MVP]