+ Reply to Thread
Results 1 to 3 of 3

Splitting column of numbers into multiple columns moving to new column based on value

  1. #1
    Registered User
    Join Date
    05-04-2009
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    4

    Splitting column of numbers into multiple columns moving to new column based on value

    Hi


    I have a spreadsheet with store numbers in column A , and units in column B


    I need to split this into batches of new columns adding up the units in B and moving to new column when value is equal or greater than


    Eg

    A. B

    601 1
    602. 2
    603. 3
    604 4
    605. 5
    606. 1
    607. 3



    If I set value to check for as 4. Would become (ignore dots)

    C. ...D. ..E. .F. ..G. .H. I. ..J

    601. 1. 604. 4. 605. 5. 606. 1
    602. 2. ......................607. 3
    603. 3


    I have managed to do this with following macro

    Please Login or Register  to view this content.
    But know I need to do a second check


    I need when it splits to check the total of the previous units if above a certain qty to move the last data to next column , if equal or below to duplicate last data on bottom of current column to top of next column unless it is last data

    Ie. if original check was 4 I'd get these results

    C. ...D. ..E. .F. ..G. .H. I. ..J

    601. 1. 604. 4. 605. 5. 606. 1
    602. 2. ......................607. 3
    603. 3

    But after a second check on the total of previous data for 3
    Would return

    C. ...D. ..E. .F. ..G. .H. I. ..J. K. L

    601. 1. 603. 3. 604. 4. 605. 5. 606. 1
    602. 2. 604. 4...................... .607. 3
    603. 3


    Hope this makes sense


    Thanks in advance



    Pk24
    Last edited by pk24; 07-08-2012 at 06:08 PM.

  2. #2
    Forum Contributor vikas.bhandari's Avatar
    Join Date
    04-07-2006
    Location
    Delhi, India
    MS-Off Ver
    Office 2007 and 2010
    Posts
    303

    Re: Splitting column of numbers into multiple columns moving to new column based on value

    Hi there!

    Wouldn't it be easier to understand if you upload a sample file with what raw data looks like and what output should look like? Lot easier to understand.

    Thanks,
    Vikas B

  3. #3
    Registered User
    Join Date
    05-04-2009
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Splitting column of numbers into multiple columns moving to new column based on value

    hi thanks for reply

    heres my file so far

    Please Login or Register  to view this content.
    easiest way to expain what i need is this

    For example let's say it was a pack of 6 eggs and u do a check for 6 eggs

    The check determines on line 5 we have 8 eggs so would move to next box , but a further check determines we have only 5 eggs on line 4 , so would duplicate line 5 , 1 egg in first box and remainder would start of box 2

    But if the further check returned that there was in fact 6 eggs on line 4 , it would only show line 5 at top of next column ( new box)

    thanks again for any help advice

    pk24

    Quote Originally Posted by vikas.bhandari View Post
    Hi there!

    Wouldn't it be easier to understand if you upload a sample file with what raw data looks like and what output should look like? Lot easier to understand.

    Thanks,
    Vikas B

+ Reply to Thread

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