+ Reply to Thread
Results 1 to 6 of 6

How to copy data from non consecutive cells and paste them in another sheet as consecutiv

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    pinetown,South Africa
    MS-Off Ver
    Excel 2019
    Posts
    25

    How to copy data from non consecutive cells and paste them in another sheet as consecutiv

    Hi Guys , I need your assistance in a task that I am currently working on at school. I am currently doing course selections at school and I have
    learners who have chosen various subjects. I wish to arrange their subjects in consecutive cells. Here is an attachment that I am working on.
    Check sheet 2. I can accomplish this if I take each learners subject choice,highlight it and copy and paste in sheet two as shown. It will take me to long to do this? Is there an easier way?

    Thanks ,Raveen
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to copy data from non consecutive cells and paste them in another sheet as consec

    Hi there, hoe gaan did daar in dir Kaap? (SA ex-pat here from PE, Carltonville and Klerksdorp)

    This is probably not what you want, but give it a try anyway - it will give you all classes in 1 cell...
    =SUBSTITUTE(TRIM(Sheet1!X2&" "&Sheet1!Y2&" "&Sheet1!Z2&" "&Sheet1!AA2&" "&Sheet1!AB2&" "&Sheet1!AC2&" "&Sheet1!AD2&" "&Sheet1!AE2&" "&Sheet1!AF2&" "&Sheet1!AG2&" "&Sheet1!AH2&" "&Sheet1!AI2&" "&Sheet1!AJ2&" "&Sheet1!AK2)," ",",")
    copied down

    I will do some more work on this to break them out into individual cells
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert Debraj Roy's Avatar
    Join Date
    09-27-2012
    Location
    New Delhi,India
    MS-Off Ver
    Excel 2013
    Posts
    1,469

    Re: How to copy data from non consecutive cells and paste them in another sheet as consec

    If all names are in same order.. then try this..

    =IFERROR(INDEX(Sheet1!$E$1:$R$1,SMALL(IF(LEN(Sheet1!$E2:$R2)>0,COLUMN(Sheet1!$E2:$R2)+1-MIN(COLUMN(Sheet1!$E2:$R2))),COLUMN(A1))),"")

    With Ctrl + SHift + Enter.

    COURSE SELECTION GR9 -2014.xlsx
    Regards!
    =DEC2HEX(3563)

    If you like someone's answer, click the star to give them a reputation point for that answer...

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: How to copy data from non consecutive cells and paste them in another sheet as consec

    Nice 1 Debraj

    I came up with this monster to concat them on sheet1
    =SUBSTITUTE(SUBSTITUTE(TRIM(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(X2&"@"&Y2&"@"&Z2&"@"&AA2&"@"&AB2&"@"&AC2&"@"&AD2&"@"&AE2&"@"&AF2&"@"&AG2&"@"&AH2&"@"&AI2&"@"&AJ2&"@"&AK2,"@",",")," ","^"),","," "))," ",","),"^"," ")

    And then this to break that concat apart...
    =TRIM(MID(SUBSTITUTE(Sheet1!$AL2,",",REPT(" ",LEN(Sheet1!$AL2))),LEN(Sheet1!$AL2)*(COLUMN()-7)+1,LEN(Sheet1!$AL2)))

    Yours is streets better, well done

  5. #5
    Registered User
    Join Date
    10-24-2012
    Location
    pinetown,South Africa
    MS-Off Ver
    Excel 2019
    Posts
    25

    Re: How to copy data from non consecutive cells and paste them in another sheet as consec

    Thanks alot Debraj .This is exactly what I needed. Formula appears to be Greek to me for now.

    May God bless you and your family.

    Thanks ,Raveen Ramlugan

  6. #6
    Registered User
    Join Date
    10-24-2012
    Location
    pinetown,South Africa
    MS-Off Ver
    Excel 2019
    Posts
    25

    Re: How to copy data from non consecutive cells and paste them in another sheet as consec

    Thanks FDibbins for your effort. Really appreciate it. Durban ,KZN is great ,planning to visit the Cape in early January next year.

    All the best to you and your family.

    Thanks stacks ,Raveen

+ 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] If data entered in cell, on same row, copy and paste data from other cells to front sheet
    By Christopher135 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-27-2013, 06:34 PM
  2. Copy specific data from differint cells and paste in one sheet
    By cyberzard in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2013, 02:25 AM
  3. Copy and paste non consecutive cells and paste consecutively in another workbook
    By macquhele in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-12-2011, 02:36 PM
  4. Copy data from a sheet and Paste in another sheet into Merged cells
    By acsishere in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-10-2011, 02:01 PM
  5. 1 sheet same data different cells (anyway to copy paste to avoid manual labor)
    By fruitypebbs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-08-2010, 07:06 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