+ Reply to Thread
Results 1 to 6 of 6

Need help with moving data from col to col and rows

Hybrid View

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Palm Bay, Floirda
    MS-Off Ver
    Excel 2010
    Posts
    15

    Exclamation Need help with moving data from col to col and rows

    Need col a from this worksheet put in a second worksheet with 1 row between each
    i need each item type in column b of this worksheet place in the second worksheet in a row next to the item name
    i need each item id from col c of this worksheet placed in the second worksheet in a row right below the item type it corresponds to
    Attached Files Attached Files

  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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,181

    Re: Need help with moving data from col to col and rows

    Administrative Note:

    Is your forum profile up-to-date and showing ONLY the oldest Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021, Excel 2024 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    Thanks.
    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
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2412
    Posts
    1,505

    Re: Need help with moving data from col to col and rows

    In cell A2 of Sheet2, try this array formula and copy down:
    Formula: copy to clipboard
    =IFERROR(IF(ISEVEN(ROW()),INDEX(Sheet1!$A$2:$A$100,MATCH(1,(COUNTIF(A$1:A1,Sheet1!$A$2:$A$100)=0)*(Sheet1!$A$2:$A$100<>""),0))," "),"")

    And this other array formula in cell B2 and copy across and down:
    Formula: copy to clipboard
    =IFERROR(INDEX(INDEX(Sheet1!$B$2:$C$100,AGGREGATE(15,6,(ROW($A$2:$A$100)-ROWS($A$1:$A$2)+1)/(Sheet1!$A$2:$A$100<>""),COUNTIF($A$2:$A2,"<> ")),MOD(ROWS($A$1:$A1)-1,2)+1):INDEX(Sheet1!$B$2:$C$100,IFERROR(AGGREGATE(15,6,(ROW($A$2:$A$100)-ROWS($A$1:$A$2)+1)/(Sheet1!$A$2:$A$100<>""),COUNTIF($A$2:$A2,"<> ")+1),MAX(IF(Sheet1!$B$2:$B$100<>"",ROW(Sheet1!$B$2:$B$100))))-1,MOD(ROWS($A$1:$A1)-1,2)+1),COLUMNS($A$1:A$1)),"")

    Array formulas must be confirmed by pressing Ctrl, Shift and Enter keys simultaneously. Then drag down and across.

    When you do the array-entering right, you'll see curly brackets { } wrapping the formula in the formula bar.

    I hope this helps.

    Good luck!
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    02-29-2012
    Location
    Palm Bay, Floirda
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Need help with moving data from col to col and rows

    I'll try this. Thank you. I'll let you know if it works.

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

    Re: Need help with moving data from col to col and rows

    Power Query
    let
        Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"ITEM NAME", type text}, {"ITEM TYPE", type text}, {"ITEM ID", type text}}),
        #"Removed Columns" = Table.RemoveColumns(#"Changed Type",{"ITEM ID"}),
        #"Filled Down" = Table.FillDown(#"Removed Columns",{"ITEM NAME"}),
        #"Grouped Rows" = Table.Group(#"Filled Down", {"ITEM NAME"}, {{"Count", each _, type table [ITEM NAME=text, ITEM TYPE=text]}}),
        #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Count],"Index",1,1)),
        #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"ITEM NAME", "ITEM TYPE", "Index"}, {"Custom.ITEM NAME", "Custom.ITEM TYPE", "Custom.Index"}),
        #"Removed Columns1" = Table.RemoveColumns(#"Expanded Custom",{"Count", "Custom.ITEM NAME"}),
        #"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Removed Columns1", {{"Custom.Index", type text}}, "lt-LT"), List.Distinct(Table.TransformColumnTypes(#"Removed Columns1", {{"Custom.Index", type text}}, "lt-LT")[Custom.Index]), "Custom.Index", "Custom.ITEM TYPE")
    in
        #"Pivoted Column"
    Attached Files Attached Files

  6. #6
    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. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,181

    Re: Need help with moving data from col to col and rows

    Plaese read and respond to post #2. Thanks.

+ 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] Help Needed Moving data and rows from different sheets while updating prior data.
    By Raistlin8522 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-02-2022, 11:40 AM
  2. [SOLVED] Moving data to next rows-reg
    By skml in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2021, 06:48 AM
  3. [SOLVED] Copying data entries in one row, to separate rows, while also moving their auxiliary data
    By bqeuux in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-20-2015, 11:52 AM
  4. Moving rows of data into 1 row
    By desertshift in forum Excel General
    Replies: 1
    Last Post: 05-20-2014, 11:52 AM
  5. [SOLVED] Moving data from Rows to columns and delete repeated rows
    By mikearmanios in forum Excel General
    Replies: 5
    Last Post: 04-20-2014, 06:25 AM
  6. Moving data from a column to rows based on another calls data
    By Emmylou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2014, 07:42 AM
  7. Moving rows of data from one worksheet to another depending on a cells data.
    By Ranny30 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2005, 11:18 AM

Tags for this Thread

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