Results 1 to 4 of 4

Split string and copy

Threaded View

karinos57 Split string and copy 04-30-2010, 02:39 PM
StephenR Re: How to split string and... 04-30-2010, 03:13 PM
Leith Ross Re: How to split string and... 04-30-2010, 11:17 PM
DonkeyOte Re: Split string and copy 05-01-2010, 03:07 AM
  1. #1
    Forum Contributor
    Join Date
    11-18-2007
    Posts
    111

    Split string and copy

    Hi,
    Here is what I am trying to do: I am trying to copy a part of a string and copy it into another columns (Package Size and Package Quantity) but there are 3 scenarios in this problem:
    1) NEUPOGEN 480M CG/1.6 VL 10X1.6 ML
    2) LOVENOX 40 MG PFS 10
    3) COMBIVENT 200 ACT INH 14.7 GM
    So let me explain here what I want to do here:
    Scenario 1) whenever we have ‘X’, everything to the right of ‘X’ is Package Size and everything to the left of ‘X’ is Quantity
    Scenario 2) Whenever the last words in a string are just ‘Numbers’ then that number should be the ‘Package Quantity’ and the ‘Package Size’ is ALWAYS ‘1’
    Scenario 3) Whenever we have numbers at the end followed by letters like GM or ML at last, then this number should be Package Size and the Package Quantity is ALWAYS 1.

    So this is what the example above should look like:
    Package Size Package Quantity
    Scenario 1) 1.6 10
    Scenario 2) 1 10
    Scenario 3) 14.7 1

    The code below works but would like to make some changes to reflect the example above and the solution could be in any format as long as it works I am fine with it. Pls. see attached sample file. Thanks for your help.

    HTML Code: 
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1