+ Reply to Thread
Results 1 to 15 of 15

Append several columns into two

  1. #1
    Registered User
    Join Date
    02-01-2022
    Location
    London
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2111 Build 16.0.14701.20278) 32-bit
    Posts
    27

    Append several columns into two

    I've got several pairs of columns, that I want to append into just two pairs.

    Please see attachment example of my current data and how I would want it to look.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,923

    Re: Append several columns into two

    No attachment ... yet.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    02-01-2022
    Location
    London
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2111 Build 16.0.14701.20278) 32-bit
    Posts
    27

    Re: Append several columns into two

    Apologies please see attachment
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,902

    Re: Append several columns into two

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,923

    Re: Append several columns into two

    Here's a PowerQuery solution.

    M Code:

    Please Login or Register  to view this content.
    There are links in my signature line about PQ, but shout if you need guidance.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-01-2022
    Location
    London
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2111 Build 16.0.14701.20278) 32-bit
    Posts
    27

    Re: Append several columns into two

    Thanks for this, I am trying to follow your steps from the code backwards but not understanding.

    Could you outline the steps taken?

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,923

    Re: Append several columns into two

    Which solution are you referencing - mine or Fluff's?

  8. #8
    Registered User
    Join Date
    02-01-2022
    Location
    London
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2111 Build 16.0.14701.20278) 32-bit
    Posts
    27

    Re: Append several columns into two

    Yours please.

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,923

    Re: Append several columns into two

    OK - give me half an hour (just busy with something else, but will write instructions after that).

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,923

    Re: Append several columns into two

    You will need to follow these steps using the workbook you shared in Post #3, NOT the one I shared with you after that.

    First you need to create the named ranges that PQ will use (see image 01 below).

    Next, go to Data | Get Data | From Other Sources | Blank Query.

    In the PQ window formula (fx) bar, type this: = Excel.CurrentWorkbook()

    Use the drop-down arrow on the Name column | Text Filters | Begins with ... and type Range into the first filter box in the dialog > OK.

    Use the double-headed arrow button on the Content column and DESELECT the tick box underneath the selection list > OK.

    In the Query Properties panel on the right, change the query name to Results.

    Click to select the Name column | Right click | Remove.

    Top right Close & Load button - click to reveal the drop-down, and choose Close & Load To ... (I selected Exixting Worksheet and nominated a starting cell).

    Thant's it.
    Attached Images Attached Images

  11. #11
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,437

    Re: Append several columns into two

    Formulas
    Column1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column2
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    drop down
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    02-01-2022
    Location
    London
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2111 Build 16.0.14701.20278) 32-bit
    Posts
    27

    Re: Append several columns into two

    @AliGW

    Thanks a lot for this really helpful!
    Last edited by AliGW; 02-14-2022 at 06:57 AM. Reason: PLEASE don't quote unnecessarily!

  13. #13
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2507 (Windows 11 Home 24H2 64-bit)
    Posts
    91,923

    Re: Append several columns into two

    You're welcome.

    If you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

  14. #14
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Append several columns into two

    Here's an alternative, which doesn't need you to create the named ranges, and will work with any width of source table:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  15. #15
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,437

    Re: Append several columns into two

    Formulas error
    Column1
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Column2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help to compare columns and append new row at last
    By roman88 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-05-2018, 08:25 AM
  2. Append columns along with column name
    By sahanakv in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-15-2015, 08:09 AM
  3. MACRO HELP: Append (Alphabetic) columns
    By paugel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-15-2014, 11:27 AM
  4. Combile (Append) 2 or more columns
    By disturbedspace in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-07-2013, 05:40 PM
  5. Append Columns to another column
    By sean_f in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-18-2006, 11:35 AM
  6. Append columns to existing worksheet?
    By Chris Burnette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2005, 06:20 PM
  7. Append columns to existing worksheet?
    By Chris Burnette in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2005, 06:17 PM

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