+ Reply to Thread
Results 1 to 15 of 15

Combine several columns to one

  1. #1
    Registered User
    Join Date
    10-28-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Combine several columns to one

    I have a spreadsheet with 5 columns containing 35 rows of data each. Can I select these and easily combine them to one column (for a single column with all 175 rows of data)?

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combine several columns to one

    Yes. What are the ranges and where are they to be combined ?

  3. #3
    Registered User
    Join Date
    10-28-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Combine several columns to one

    I have several spreadsheets where I want this done, and the number of columns and rows vary, but in this particular case its columns A to E, rows 11 to 45...

    I'd like to combine them to column F..

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combine several columns to one

    Sounds like we might be opening a can of VBA worms but in terms of your specific example...

    Please Login or Register  to view this content.
    above would paste into F2 onwards (or from first non blank in F onwards)

    Hopefully that helps in part.

  5. #5
    Registered User
    Join Date
    10-28-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Combine several columns to one

    Thanks, that works well! Any way I can do this based on my selection, not on ranges set in the code?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combine several columns to one

    It depends... given how varied the selection can be one approach would be something like:

    Please Login or Register  to view this content.
    but this is still open to error depending on size of range areas etc... output point being mid way up a blank column etc...
    Last edited by DonkeyOte; 10-28-2009 at 01:03 PM.

  7. #7
    Registered User
    Join Date
    10-28-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Combine several columns to one

    Perfect, thank you very much!

  8. #8
    Registered User
    Join Date
    10-28-2009
    Location
    Rochester, New York, USA
    MS-Off Ver
    Office 2003 (work), Office 2007 (home)
    Posts
    8

    Re: Combine several columns to one

    In Cell F1:

    Please Login or Register  to view this content.
    will stick all the data in the first row, columns A to E, into a single string (which can then be converted to another data type, if necessary).

  9. #9
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combine several columns to one

    Have you actually tried your own suggestion ?

  10. #10
    Registered User
    Join Date
    10-28-2009
    Location
    Rochester, New York, USA
    MS-Off Ver
    Office 2003 (work), Office 2007 (home)
    Posts
    8

    Re: Combine several columns to one

    Quote Originally Posted by DonkeyOte View Post
    Have you actually tried your own suggestion ?
    Well, now that you question me, it hadn't occured to me that Concatenate doen't accept an array input and the values will have to be listed out comma-seperated style, so... I guess the answer to your question is "no."

  11. #11
    Registered User
    Join Date
    10-28-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Combine several columns to one

    DonkeyOte: Is it possible to put the combined columns onto the clipboard rather than to a new column?

  12. #12
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combine several columns to one

    Why the clipboard ?

  13. #13
    Registered User
    Join Date
    10-28-2009
    Location
    Oslo, Norway
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Combine several columns to one

    I'm using the spreadsheet to create variations on different words, I then need the results copied to another application. So I'm hoping I can select what I need and then click a button to put this onto the clipboard in a single list to be copied to the other application.

  14. #14
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combine several columns to one

    regards using the Clipboard with VBA

    see: http://www.cpearson.com/excel/Clipboard.aspx

    Given the thread is now running in two places (and you have responses on the other) I myself won't spend time large amounts of my time looking at this I'm afraid.


    Also as detailed in the infraction you are obliged to provide links to your cross post(s).

  15. #15
    Registered User
    Join Date
    03-24-2009
    Location
    US
    MS-Off Ver
    Excel 2003
    Posts
    12

    Re: Combine several columns to one

    Quote Originally Posted by DonkeyOte View Post
    Have you actually tried your own suggestion ?
    Good observation. It bothers me that I have to put commas or "&" between cell references to concatenate a range.

    I can do if a range reference works with Concatenate.


+ 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