+ Reply to Thread
Results 1 to 10 of 10

How to stack data from multiple columns on a different sheet

  1. #1
    Registered User
    Join Date
    10-26-2020
    Location
    PA
    MS-Off Ver
    2013
    Posts
    9

    How to stack data from multiple columns on a different sheet

    Hello,

    I am trying to create a tool to manage tasks according to date.

    I have several non-adjacent columns of dates on sheet "MGMT". I would like to stack those columns (G, J, M, P, R) into one column on sheet "SA" and have the dates sorted in chronological order. I have tried a few formulas and only get "NAME?" to populate. I'm not experienced in VBA so would prefer a formula, if possible. I'm a novice and I am grateful for any assistance.

    The attached file has sample data. I also have a row of what I would like the file to do.

    Thank you,

    Michelle
    Last edited by michellemb; 10-26-2020 at 07:02 PM. Reason: Updated attached file

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,511

    Re: How to stack data from multiple columns on a different sheet

    Some of the cell references in your sample file are confusing, but if I understand correctly you can use the following formulae in the SA sheet in the cells stated:

    B4: =INDEX(MGMT!B:R,INT((ROWS($1:1)-1)/5)+2,IF(MOD(ROWS($1:1)-1,5)=0,1,MOD(ROWS($1:1)-1,5)*3+3))

    C4: =INDEX(MGMT!C:C,INT((ROWS($1:1)-1)/5)+2)

    D4: =INDEX(MGMT!$B$1:$R$1,IF(MOD(ROWS($1:1)-1,5)=0,1,MOD(ROWS($1:1)-1,5)*3+3))

    Copy these down as required.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    10-26-2020
    Location
    PA
    MS-Off Ver
    2013
    Posts
    9

    Re: How to stack data from multiple columns on a different sheet

    I'm sorry for the confusion. It was late when I posted this after hours of hitting a wall. I updated the file and hope that it is a little clearer.

    For now, I will try your suggestion.

    Thank you so much.

  4. #4
    Registered User
    Join Date
    10-26-2020
    Location
    PA
    MS-Off Ver
    2013
    Posts
    9

    Re: How to stack data from multiple columns on a different sheet

    Thank you so much!!!! This works. My last question for the formula in B4. How do I have the data automatically sort into chronological order as data is populates?

    Thank you!

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How to stack data from multiple columns on a different sheet

    In B4:

    =IFERROR(INDEX((MGMT!$B$2:$B$9,MGMT!$G$2:$G$9,MGMT!$J$2:$J$9,MGMT!$M$2:$M$9,MGMT!$P$2:$P$9),1+MOD((ROWS($1:1)-1),COUNTA(MGMT!$B$2:$B$9)),,1+INT((ROWS($1:1)-1)/COUNTA(MGMT!$B$2:$B$9))),"")

    ... assuming that by date order you wanted column B, then column G, then column J, etc.

    Has this messed up the rest of the data (I did not check).
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    Registered User
    Join Date
    10-26-2020
    Location
    PA
    MS-Off Ver
    2013
    Posts
    9

    Re: How to stack data from multiple columns on a different sheet

    The date column is doing exactly what I want it to do. Thank you!!!

    Unfortunately, the other data in Column C and D does not match now.

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How to stack data from multiple columns on a different sheet

    Bummer. I'll look at them in a moment!

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How to stack data from multiple columns on a different sheet

    C4:
    =if(b4="","",index(mgmt!$c$2:$c$9,1+mod((rows($1:1)-1),counta(mgmt!$b$2:$b$9))))

    d4:
    =if(b4="","",index((mgmt!$b$1,mgmt!$g$1,mgmt!$j$1,mgmt!$m$1,mgmt!$p$1),,,1+int((rows($1:1)-1)/counta(mgmt!$b$2:$b$9))))

  9. #9
    Registered User
    Join Date
    10-26-2020
    Location
    PA
    MS-Off Ver
    2013
    Posts
    9

    Re: How to stack data from multiple columns on a different sheet

    This was perfect. Thank you so much. I am truly grateful.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How to stack data from multiple columns on a different sheet

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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] How to stack data of multiple columns into one column?
    By AlexanderDK in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-11-2020, 10:48 PM
  2. stack multiple columns
    By melo12 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-08-2018, 01:08 PM
  3. [SOLVED] how do I stack multiple columns into one?
    By EnvynLust in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-10-2013, 07:06 PM
  4. [SOLVED] Stack multiple columns from one sheet all into one column in another sheet
    By PacificRooster in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 04-08-2013, 05:34 AM
  5. How can I stack data from multiple columns in a new column?
    By mdugger in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-28-2013, 05:00 PM
  6. [SOLVED] how to stack multiple columns?
    By mrr2 in forum Excel General
    Replies: 9
    Last Post: 05-11-2012, 01:20 PM

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