S
Steve P.
I have to manipulate data furnished by our suppliers for input into our
business system. I have two fields that I need to populate named desc1 and
desc2 that are limited to 30 charaters each. Below are examples of data as
it comes from a file supplied by one of our suppliers:
Desc
item1 CLASSIC 99® RETRACTABLE UTILITY KNIFE
item2 EXTRA HEAVY DUTY UTILITY BLADES (5), COUNTER DISPLAY
item3 1/2" 2-EDGE HEAVY DUTY HOOK SCRAPER BLADE FITS 28-293, 28-622, 28-619
Currently I use Left([Desc],30) and Mid([Desc],31,30) functions to covert it
to this:
desc1 CLASSIC 99® RETRACTABLE UTILIT
desc2 Y KNIFE
desc1 EXTRA HEAVY DUTY UTILITY BLADE
desc2 S (5), COUNTER DISPLAY
desc1 1/2" 2-EDGE HEAVY DUTY HOOK SC
desc2 RAPER BLADE FITS 28-293, 28-62
In the last example the end of the manufaturer's description "2, 28-619" is
truncated in DESC2.
I am searching for a method to split the text so that whole words are kept
together, for example.
desc1 CLASSIC 99® RETRACTABLE
desc2 UTILITY KNIFE
desc1 EXTRA HEAVY DUTY UTILITY
desc2 BLADES (5), COUNTER DISPLAY
desc1 1/2" 2-EDGE HEAVY DUTY HOOK
desc2 SCRAPER BLADE FITS 28-293,
In the last example desc2 is still truncated which is okay *but* if it were
possible to do the following it would be the icing on the cake:
desc1 1/2" 2-EDGE HEAVY DUTY HOOK
desc2 SCRAPER BLADE FITS...
In case it's not apparent, what I am asking for is that when the desc2 field
is truncated I would like to cut it off at the last whole word that would
fit within 27 characters and then append 3 periods to the text to indicate
to users that the field was indeed truncated.
Your help is appreciated.
Steve P.
business system. I have two fields that I need to populate named desc1 and
desc2 that are limited to 30 charaters each. Below are examples of data as
it comes from a file supplied by one of our suppliers:
Desc
item1 CLASSIC 99® RETRACTABLE UTILITY KNIFE
item2 EXTRA HEAVY DUTY UTILITY BLADES (5), COUNTER DISPLAY
item3 1/2" 2-EDGE HEAVY DUTY HOOK SCRAPER BLADE FITS 28-293, 28-622, 28-619
Currently I use Left([Desc],30) and Mid([Desc],31,30) functions to covert it
to this:
desc1 CLASSIC 99® RETRACTABLE UTILIT
desc2 Y KNIFE
desc1 EXTRA HEAVY DUTY UTILITY BLADE
desc2 S (5), COUNTER DISPLAY
desc1 1/2" 2-EDGE HEAVY DUTY HOOK SC
desc2 RAPER BLADE FITS 28-293, 28-62
In the last example the end of the manufaturer's description "2, 28-619" is
truncated in DESC2.
I am searching for a method to split the text so that whole words are kept
together, for example.
desc1 CLASSIC 99® RETRACTABLE
desc2 UTILITY KNIFE
desc1 EXTRA HEAVY DUTY UTILITY
desc2 BLADES (5), COUNTER DISPLAY
desc1 1/2" 2-EDGE HEAVY DUTY HOOK
desc2 SCRAPER BLADE FITS 28-293,
In the last example desc2 is still truncated which is okay *but* if it were
possible to do the following it would be the icing on the cake:
desc1 1/2" 2-EDGE HEAVY DUTY HOOK
desc2 SCRAPER BLADE FITS...
In case it's not apparent, what I am asking for is that when the desc2 field
is truncated I would like to cut it off at the last whole word that would
fit within 27 characters and then append 3 periods to the text to indicate
to users that the field was indeed truncated.
Your help is appreciated.
Steve P.