+ Reply to Thread
Results 1 to 11 of 11

Trying to move columns into rows without success

  1. #1
    Registered User
    Join Date
    06-07-2020
    Location
    Cornwall, UK
    MS-Off Ver
    Office 365
    Posts
    8

    Trying to move columns into rows without success

    Good Afternoon

    I have been trying to come up with a solution for the following excel problem.

    I have extracted an access database and the result appears as :-

    keyno pi_sort reg ntu c/n actype series current
    36290 1 N9658N 38-81A0174 PA-38 112 Tomahawk N107LH
    36290 2 PK-ATG 38-81A0174 PA-38 112 Tomahawk N107LH
    36290 3 N107LH 38-81A0174 PA-38 112 Tomahawk N107LH

    I need to arrange this data as below :-

    36290 N9658N PK-ATG N107LH

    ie in rows, not in columns

    I realise that you can do copy, then paste to row, but I have 750,000 rows !!

    I would really appreciate any assistance

    Best Regards

    Adrian
    Attached Files Attached Files
    Last edited by AliGW; 06-08-2020 at 05:40 AM. Reason: Irrelevant section of title removed: this is a HELP forum!!!

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

    Re: HELP !! - Trying to move columns into rows without success

    Hi & welcome to the board.
    If you have dynamic arrays how about
    In L7
    =UNIQUE(FILTER(C7:C100,C7:C100<>""))
    In N7 filled down
    =TRANSPOSE(FILTER(E$7:E$100,(C$7:C$100=L7)*(L7<>""),""))
    Last edited by Fluff13; 06-07-2020 at 10:37 AM.

  3. #3
    Registered User
    Join Date
    06-07-2020
    Location
    Cornwall, UK
    MS-Off Ver
    Office 365
    Posts
    8

    Re: HELP !! - Trying to move columns into rows without success

    Many thanks for the swift reply,

    When i used those formula's excel says " That function isnt valid "

    I am using Excel from office 365

    Sorry to be a pain...

    Regards

    Adrian

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

    Re: HELP !! - Trying to move columns into rows without success

    Ok, you must be on the semi annual channel, in which case you are probably better off with a macro.
    Is that OK? If so does your data normally start in A1 rather than C6?

  5. #5
    Registered User
    Join Date
    06-07-2020
    Location
    Cornwall, UK
    MS-Off Ver
    Office 365
    Posts
    8

    Re: HELP !! - Trying to move columns into rows without success

    Hello again

    Yes the first cell is A1

    Regards

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

    Re: HELP !! - Trying to move columns into rows without success

    Ok, give this a go
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-07-2020
    Location
    Cornwall, UK
    MS-Off Ver
    Office 365
    Posts
    8

    Re: HELP !! - Trying to move columns into rows without success

    You are an absolute genius !!!!!!!!

    That has probably saved me about three weeks work.......

    Many Many Thanks

    Best Regards

    Adrian

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

    Re: HELP !! - Trying to move columns into rows without success

    You're welcome & thanks for the feedback.

  9. #9
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: HELP !! - Trying to move columns into rows without success

    An alternative solution is to use Power Query/Get & Transform. Here is the Mcode and the file you can review.

    Please Login or Register  to view this content.
    Review PQ
    In the attached file
    Click on any cell in the new table
    On the Data Tab, click on Queries & Connections
    In the right window, double click to open Query
    Review PQ steps

    M-code basics:
    - "let" is the start of a query
    - "in" is the closing of a query
    - each transformation step sits in between those 2 lines
    - each step line is ended by a comma, except the last one
    - "Source" is always the first step (Source Data)
    - After "in" you have the last step referenced

    Excel 2016 (Windows) 32 bit
    A
    B
    C
    D
    1
    keyno 1 2 3
    2
    36289
    N91334
    3
    36290
    N9658N PK-ATG N107LH
    4
    36291
    N9654N PK-ATH N108LH
    5
    36292
    N9655N PK-ATI N109LH
    Sheet: Sheet2
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  10. #10
    Registered User
    Join Date
    06-07-2020
    Location
    Cornwall, UK
    MS-Off Ver
    Office 365
    Posts
    8

    Re: HELP !! - Trying to move columns into rows without success

    Hi Alan,

    Brilliant, that works just as well !!

    Amazing how you spend weeks, copying & pasting text, when it could be done in just a matter of minutes !!

    Could I be really cheeky, I have just hit another problem !! ( i will also create another thread for this problem )

    I have a spreadsheet with two sheets in it, one sheet called master, and the other sheet called MFR Model Code

    in the master sheet there is a column called "MFR MDL CODE", which contains a code to identify the aircraft model

    in the MFR model code sheet is the decode, ie 1384856 = BOEING 747-206B

    what i need to do is replace the contents of MFR Model Code column in master, with the actual aircraft type contained in the MFR model code sheet (see attached)

    Best Regards

    Adrian
    Attached Files Attached Files

  11. #11
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Trying to move columns into rows without success

    In C5 =VLOOKUP(B5,'MFR MODEL CODE'!$A$2:$B$12,2,0) and copy down.

+ 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. [SOLVED] Add conclusion about batch success based on the success of its steps
    By abreet in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-15-2015, 05:32 AM
  2. [SOLVED] Move data on duplicate rows (different columns) to one row and delete extra rows?
    By Sagwa in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-01-2014, 08:25 AM
  3. Replies: 1
    Last Post: 12-18-2013, 05:31 PM
  4. Replies: 5
    Last Post: 09-27-2013, 08:37 PM
  5. move columns to rows
    By 13lack13lade in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-02-2013, 11:39 PM
  6. have reference cells move in rows while I move in columns
    By gryffin13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-13-2011, 09:33 AM
  7. Move columns to rows
    By snagar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2010, 09:46 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