+ Reply to Thread
Results 1 to 6 of 6

Joining lists from 3 columns

  1. #1
    Registered User
    Join Date
    01-17-2006
    Posts
    21

    Joining lists from 3 columns

    Hi,

    I have three lists in separate columns that I wish to join together as 1 list in a fourth column. ie the fourth column will contain entries from list in column A, then entries from column B, then entries from Column C, going down the pages so it forms one long list.

    The catch becomes the lists in the first 3 columns vary in length, as they are populated using an index and match function.

    Please see attached file. Please note this is sample data only.

    How do I go about generating the list I require.

    Thanks, Simon
    Attached Files Attached Files

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Hello simonhall,

    The following code is based on your example:
    Please Login or Register  to view this content.
    This code loops through column D and inserts the values from that column into column I, starting in row 1. It then moves to columns E and F, performing the same function.

    I added an If/Then to check to see if it is copying the header from column D, E or F, and if so make that cell in column I bold.

    Let me know how that works for you.

  3. #3
    Registered User
    Join Date
    01-17-2006
    Posts
    21
    Hi Paul,

    I can see that this would work.

    However, is it possible to achieve the same thing using formulas without using the VBA code?

    Thanks, Simon

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    There very well could be a way to do it using worksheet formulas, but it probably wouldn't be pretty.

    Is there something wrong with using VBA? I'll see what I can find about merging uneven columns using worksheet functions, but I can't promise anything. Also, you wouldn't be able to bold the header cells using functions.

  5. #5
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Try this example out
    Attached Files Attached Files

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482
    Quote Originally Posted by davesexcel
    Try this example out

    Oh, I see there has been a reply already

+ 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