I IanT Registered User. Local time Today, 20:44 Joined Nov 30, 2001 Messages 191 Nov 25, 2004 #1 I have a field which will contain 10kg, 500g, 1ltr etc, how can I get code to ignore the abbreviations and us the numbers!
I have a field which will contain 10kg, 500g, 1ltr etc, how can I get code to ignore the abbreviations and us the numbers!
L llkhoutx Registered User. Local time Today, 14:44 Joined Feb 26, 2001 Messages 4,013 Nov 25, 2004 #2 Parse each character in the field using the mid$ function checking each character with the IsNumeric function. The first False value -1 gives the length of the numeric portion of your string.
Parse each character in the field using the mid$ function checking each character with the IsNumeric function. The first False value -1 gives the length of the numeric portion of your string.
R raskew AWF VIP Local time Today, 14:44 Joined Jun 2, 2001 Messages 2,731 Nov 25, 2004 #3 You can also use the Val() function to return the numeric portion, e.g: ? val("500g") 500 HTH - Bob