D
doyle60
How do I return a part of a field if that part matches a certain
format? In this case, being a three digit number (###), or a six
digit number (###-###) followed by a letter g.
More specifically, I have a field for fabric (FabricAdj) which runs
1000 or so lines. Part of the data looks like this:
92% cotton 8% spandex, 32's 220g
100% Cotton Woven 40/180 125-130g
92% cotton 8% spandex, 195g Brushed
92% cotton 8% spandex
92% cotton 8% spandex, 165-175g
In a query, I want to return just the numbers before the g
(representing grams).
220g
125-130g
195g
[This should return a null value]
165-175g
The g figures (the weight of the fabric, representing grms/2) are
standardized into the format ###g or ###-###g.
I know how to return a "Yes" if part of the cell has such a figure:
Grams: IIf([FabricAdj] Like "*" & "###" & "g" & "*","Yes","")
But instead of returning that "Yes," I want to return the actual
numbers, plus the "g."
Thanks,
Matt
format? In this case, being a three digit number (###), or a six
digit number (###-###) followed by a letter g.
More specifically, I have a field for fabric (FabricAdj) which runs
1000 or so lines. Part of the data looks like this:
92% cotton 8% spandex, 32's 220g
100% Cotton Woven 40/180 125-130g
92% cotton 8% spandex, 195g Brushed
92% cotton 8% spandex
92% cotton 8% spandex, 165-175g
In a query, I want to return just the numbers before the g
(representing grams).
220g
125-130g
195g
[This should return a null value]
165-175g
The g figures (the weight of the fabric, representing grms/2) are
standardized into the format ###g or ###-###g.
I know how to return a "Yes" if part of the cell has such a figure:
Grams: IIf([FabricAdj] Like "*" & "###" & "g" & "*","Yes","")
But instead of returning that "Yes," I want to return the actual
numbers, plus the "g."
Thanks,
Matt