Data Manipulation

IanT

Registered User.
Local time
Today, 01:47
Joined
Nov 30, 2001
Messages
191
I have data in a field which looks like this 2-2.27kg. Is it possible to split this down so I can then automate calculating 2x2.27.

Thanks in advance!
 
How consistent is the format? For example, is there always one numeric then the dash or could the be two numerics the the dash, etc...

kh
 
The data is not in a consistent format, it represents quantitys and weights of food items.
 
Can you post a sampling of several hundred rows?

kh
 
Nice work Bob !

I would offer the following observations, however:- (only because I'm totally Anal)

"intWeight" is not an integer (as suggested by "int" prefix), rather a floating point decimal.

ShowLeft = IIf(IsMissing(ShowLeft), True, ShowLeft)
is redundant. IsMissing only pertains to optional parameters of type Variant. In your procedure definition, you defined it as boolean, and set it =True if not supplied.

Of course that said; looks like you've solved IanT's problem for him.
 
Thanks "raskew" this has been a great help!
 
Ian - Glad it was of assistance.

John471 - How long since you last washed your hands? There are germs everywhere, you know. Look forward to your next solution.

Bob
 

Users who are viewing this thread

Back
Top Bottom