+ Reply to Thread
Results 1 to 5 of 5

Copy from different sheets- data based on selection and paste rows in new sheet

  1. #1
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Copy from different sheets- data based on selection and paste rows in new sheet

    Hi all,
    I have 6 sheets.
    Sheet 1 to 5 has data.
    In column 1 I have date & in column 2 have names on each sheet.

    Last sheet is called 'Report'

    I am trying to do the following:
    On Report sheet I have a text box to type date of report required and also combobox to select Name

    - I select either name or date ( Only one selection)
    -Then all data rows matching selection are copied From Sheets 1 to 5 and pasted in sequence one below the other in report sheet
    -The headings also are copied
    -between two data range ( say from sheet1 ... sheet2)... one row needs to be blank to demarcate.

    I am exhausted as I have tried many combinations and it is not working.
    Very challenging indeed

    Any help or thought process please

    kind regards
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy from different sheets- data based on selection and paste rows in new sheet

    Try this. Assign to your command button.

    Please Login or Register  to view this content.
    Last edited by stnkynts; 03-14-2014 at 07:27 PM.

  3. #3
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Copy from different sheets- data based on selection and paste rows in new sheet

    Hi Stnkynts,
    Thanks for your prompt reply.
    This method is great than what I was trying to do.
    It does copy data and is fine
    However ( I deleted data on report sheet to try again)
    - In subsequent attempts it pastes much below the row A2 on report sheet
    -Date function does not work
    -It does not copy heading (i.e. Row A1 of each sheet)

    Need to consider the following please:
    -It first clears data on report sheet
    -It copies Row A1 first and then data of each sheet
    - Pastes data starting from row A2 on report sheet every time
    We are almost there....
    Thanks again
    Kind regards
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Copy from different sheets- data based on selection and paste rows in new sheet

    However ( I deleted data on report sheet to try again)
    You didn't delete the data. You probably just cleared the contents of column B since you were scrolled over to the right by 1 column. Make sure you clear the dates out of column A too.

    -Date function does not work
    Yes it does. I just have it set to only allow one parameter because of what you said here:
    - I select either name or date ( Only one selection)
    so if you want to copy by date you will need to remove the name.

    -It does not copy heading (i.e. Row A1 of each sheet)
    That is correct it does not. See amended code below for the addition of row 1

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    02-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2019
    Posts
    677

    Re: Copy from different sheets- data based on selection and paste rows in new sheet

    Hi Stnkynts,
    Really many thanks for your help.
    It does work fine now.
    Thanks for your tips, as it seems that I may have made few errors earlier.
    Very well done.
    Thanks again.
    Kind regards

+ 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. copy paste data based on cell selection
    By krash297 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2013, 03:53 AM
  2. Selection of loop data, move copy and paste data, and exclude blank rows
    By mav02004 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-18-2013, 10:20 AM
  3. [SOLVED] Based on a selection copy and paste data to another sheet
    By Spherous in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-31-2013, 01:17 AM
  4. Paste the data into next blank rows based on the userform selection
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-06-2011, 10:22 PM
  5. Replies: 3
    Last Post: 11-12-2010, 04:31 AM

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