+ Reply to Thread
Results 1 to 22 of 22

Extract Data to next worksheet

  1. #1
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Extract Data to next worksheet

    Hi

    I have large data in the format of sample file attached.

    I want to copy the same to next work sheet. Sample data and expected result attached.

    Wherever the "Name" coming in Column, next row to that (Highlighted for Yellow) to be copied to next work sheet.
    With below the row of "Category" to next cell.



    Please help to create VBA for this.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: Extract Data to next worksheet

    Change all your Merge and Center to Center Across Selection.

    https://officemastery.com/_merge-and...r-alternative/
    https://edu.gcfglobal.org/en/excel-t...rging-cells/1/
    Last edited by jolivanes; 02-17-2022 at 03:01 AM.

  3. #3
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hi jolivanes

    thanks, i want to take specific rows only to next work sheet. example Wherever the "Name" coming in Column, next row to that. and additionally need to include down row cell reference also. hence seeking VBA for this.

  4. #4
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: Extract Data to next worksheet

    After you changed your sheet as suggested in Post #2, this will do what you need.
    Change references if and where required.
    Please Login or Register  to view this content.

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extract Data to next worksheet

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: Extract Data to next worksheet

    I updated the hyperlinks in Post #2. You can access them now and fix your workbook if you want.

  7. #7
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hello Jolivanes

    Code is working fine. Thanks for your help

  8. #8
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hello Jindon

    Thanks the code is working fine and getting the results.

    I was shared you the example data

    Is it possible to specify the condition of Wherever the "Name" coming in Column, next row to that to be copied ? Seems its currently taking from row4th

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extract Data to next worksheet

    Quote Originally Posted by KKR1975 View Post
    Is it possible to specify the condition of Wherever the "Name" coming in Column, next row to that to be copied ? Seems its currently taking from row4th
    I don't understand what you are trying to say.

    If other code is working, you can stick with it.

  10. #10
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hello Jindon

    Sorry may be my English is poor. Requesting you to add the condition of searching "Name" in column C then copy the data.

  11. #11
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extract Data to next worksheet

    Are you saying the column reference of "Name" changes?
    Not always in col.C?

    Or it is always in col.C?

  12. #12
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hello Jolivanes

    The sample workbook which i given is perfectly working, even if i add some more data on the same format. But when i apply this code to my original data, its getting copied only first row to results worksheet.

    Test workbook the data starting from row c3. Actual workbook its starting from N14. I changed this on the below line, but i am getting only first row in result. can you please help is there any other line of code also i need to change?



    Please Login or Register  to view this content.
    I have changed as below
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hi Jindon

    Its always C but the text "name" will change in actual workbook.
    So when i apply this code in actual workbook wants to change that.

    thanks

  14. #14
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extract Data to next worksheet

    My code doesn't care about the text "Name" at all.

    If it is in col.C and the first row of each block of data and the data always begins from Col.B (Col.A needs to be balnk) as your attachment, it should work even if "Name" doesn't appear anywhere.

  15. #15
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hi Jindon

    Now i understand. need one help, if the column is "N" instead "C" and data starts from "I" instead B

    what changes i need to do on your code. Please help for this

    Actually i was in the mind the code will search and provide the results but the way you are doing also good only

  16. #16
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Extract Data to next worksheet

    Just change 2
    Please Login or Register  to view this content.
    to "i" or 9
    Please Login or Register  to view this content.
    Now i understand. need one help, if the column is "N" instead "C" and data starts from "I" instead B
    Now you seems to be asking question with completely different data layouts from your attachment.

    What was the meaning of the workbook you uploaded?
    Why so many people do such silly thing...
    Last edited by jindon; 02-17-2022 at 08:22 AM.

  17. #17
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: Extract Data to next worksheet

    Re: Test workbook the data starting from row c3. Actual workbook its starting from N14
    If the only change is the Column, you also need to change the 3 to the Column number of Column N.
    Please Login or Register  to view this content.
    But in your attachment your data is in Columns B to Column N.
    Where is it in your actual Workbook.
    Make a Workbook with ACTUAL layout and attach it.

  18. #18
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Hi Jolivanes

    I have attached the actual layout. I have modified the below and tested. i am getting results correctly for one line item others are not coming.


    F
    Please Login or Register  to view this content.
    Results i am getting is attached
    Attached Images Attached Images
    Attached Files Attached Files

  19. #19
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: Extract Data to next worksheet

    Please Login or Register  to view this content.
    This works on your attachment.

  20. #20
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Thanks jolivanes. Perfectly working on my actual layout now.

  21. #21
    Forum Contributor
    Join Date
    05-25-2020
    Location
    Madurai
    MS-Off Ver
    Excel 2010
    Posts
    136

    Re: Extract Data to next worksheet

    Thanks Jindon for the help. its worked for me.

  22. #22
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,525

    Re: Extract Data to next worksheet

    Thanks for letting us know and good luck.

+ 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. Sub: extract data from one excel worksheet to another worksheet
    By raja1964 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-03-2019, 01:28 PM
  2. Replies: 1
    Last Post: 06-24-2018, 06:02 PM
  3. Replies: 11
    Last Post: 12-04-2012, 02:56 AM
  4. Replies: 0
    Last Post: 07-09-2012, 03:10 PM
  5. Replies: 2
    Last Post: 02-23-2006, 12:35 PM
  6. Extract data from one Worksheet to another
    By extract data fr. one worksheet to anothe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 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