+ Reply to Thread
Results 1 to 7 of 7

Combining multiple columns of data into single column

  1. #1
    Registered User
    Join Date
    01-09-2012
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    54

    Combining multiple columns of data into single column

    Hello,

    I was wondering if anyone knows how to combine multiple columns of data into one sorted column. I would like the sorted column to be in chronological order and the respective data to stay with its corresponding date. Also, I should note that these columns will be growing on a daily basis...not sure if that will matter or not. I've attached a simplified example.

    One other question. If my data in columns A through D are being drawn from another sheet via the Index and match functions, will that affect the ability to make one sorted column?

    Thanks,

    Dan
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Combining multiple columns of data into single column

    Take 2 seconds to stack the 2 lists into 1 long list in a new sheet in cols A and B, data from row2 down (via copy n paste special as values)
    Then in that new sheet, this simple formulas construct will drive out the final results that you seek, ie sorted by dates in chronological order
    Put in C2: =IF(A2="","",A2+ROW()/10^5)
    Put in D2: =IF(ROWS($1:1)>COUNT($C:$C),"",INDEX(A:A,MATCH(SMALL($C:$C,ROWS($1:1)),$C:$C,0)))
    Copy D2 to E2. Select C2:E2, fill down to cover the max expected extent of source data in cols A and B, say down to row 1000?
    Hide away/minimize col C, Format col D as dates

    Whenever you refresh the stacked source data, CLEAR cols A and B first, then do the copy n paste special as values
    ----------------------
    Any worth? Celebrate it, click the little star at the bottom left of my responses

  3. #3
    Registered User
    Join Date
    01-09-2012
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Combining multiple columns of data into single column

    Is there any way this can be automatic? I will be doing this for approximately 30 sheets on a daily basis and it would be nice if I didn't have to use copy and paste every time. I'd rather be able to just see the auto sorted data automatically. Thanks

  4. #4
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Combining multiple columns of data into single column

    Try this:

    In F2: =IFERROR(SMALL(A:D,ROWS($1:1)),"")

    In G2: =IF(F2="","",IFERROR(VLOOKUP(F2,A:B,2,0),VLOOKUP(F2,C:D,2,0)))

    Select F2:G2 and copy down as far as needed.

  5. #5
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: Combining multiple columns of data into single column

    Auto data stacking is not easy to do via formulas. If no other responder drops by here, you could try asking for a macro, do a post in programming forum

  6. #6
    Registered User
    Join Date
    01-09-2012
    Location
    Minneapolis, Minnesota
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: Combining multiple columns of data into single column

    thanks teethless mama. I just had to add the $ to make it work

  7. #7
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Combining multiple columns of data into single column

    You're Welcome!

+ 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