+ Reply to Thread
Results 1 to 6 of 6

Copy data from one sheet to another sheet based on criteria

  1. #1
    Registered User
    Join Date
    03-06-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    94

    Smile Copy data from one sheet to another sheet based on criteria

    Dear Team,

    I need help in copying data from one sheet to another sheet based on criteria

    I have 2 worksheets and user form in my excel file, one is Master sheet and another one is Data sheet and user form is having Copy button

    I have morethan 10000 rows in Master sheet and every month we will add more data to this Master sheet, I want to copy specific columns from Master sheet to Data sheet based on condition when i clicked on Copy button

    In Master sheet I have more than 10 columns, in that I have Age (Column P), Days (Column S), Status (Column Y) columns. I want to copy where Age>=15 and Days>=365 and Status = Alive then copy columns S.No, Unique ID, Name, Age, Staus, ID to Data Sheet in first 5 columns only.

    Whenever new data added to Master sheet, when we click the copy data button, it has to be check with above criteria and copy data to Data sheet. But in data sheet there wont be any duplicate Unique Ids. Whenever I click Copy button append only new Unique IDs with other respective columns

    I am attaching sample file for your reference

    Thanks in advance
    Chava Nalini
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    936

    Re: Copy data from one sheet to another sheet based on criteria

    Hello Chavanalini,

    Your request is a little confusing.

    Based on the three criteria (age, days, status), you wish to copy data from Columns A, C, I, P, W and Y to the first five columns of the Data sheet. This is six columns of data, not five. What's more, you have twelve columns to populate in the Data sheet and no Status column is evident. Should there be twelve columns to populate in the Data sheet?

    Could you please clarify your request.

    Cheerio,
    vcoolio.

  3. #3
    Registered User
    Join Date
    03-06-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: Copy data from one sheet to another sheet based on criteria

    Thank you for your response and sorry for confusion.

    Yes I need twelve columns to populate in the Data Sheet from Master Sheet based on the above mentioned criteria (Age>=15 and Days>=365 and Status = Alive)

    In Master sheet 'Age' is in Column P, 'Days' is in Column S, 'Status' is in Column Y columns.

    Sorry for the inconvenience


    Thanks in advance

  4. #4
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    936

    Re: Copy data from one sheet to another sheet based on criteria

    Hello Chavanalini,

    Based on what you have said and the set out of your sample workbook, I believe that the following code should do the task for you:-

    Please Login or Register  to view this content.
    Assign the code to your button but test it in a copy of your workbook first. I have attached your sample workbook with the code implemented. Click on the button to see it work.

    I hope that this helps.

    Cheerio,
    vcoolio.

    P.S. Sorry Chavanalini, I neglected to mention that I altered the Data sheet a little to reflect the same set out as the Master sheet.
    Attached Files Attached Files
    Last edited by vcoolio; 06-08-2018 at 05:54 AM. Reason: Add further info.

  5. #5
    Registered User
    Join Date
    03-06-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    94

    Re: Copy data from one sheet to another sheet based on criteria

    Thank you so much,

    Awesome, perfect solution for my request

    Once again thank you so much

  6. #6
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    936

    Re: Copy data from one sheet to another sheet based on criteria

    You're welcome Chavanalini. I'm glad that I was able to help.

    Cheerio,
    vcoolio.

+ 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. Replies: 19
    Last Post: 10-16-2017, 12:34 PM
  2. [SOLVED] Copy data from one sheet to another based on a certain criteria
    By shina67 in forum Excel General
    Replies: 5
    Last Post: 05-17-2016, 02:58 PM
  3. Replies: 2
    Last Post: 01-23-2016, 01:16 PM
  4. [SOLVED] Consolidated Summary Sheet - Copy data from one sheet to other based on criteria
    By sabha in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-21-2015, 03:29 AM
  5. [SOLVED] Copy and paste data from sheet 2 to sheet 1 based on specific criteria on sheet 1
    By VBADUD in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:18 AM
  6. Replies: 4
    Last Post: 07-24-2012, 07:09 AM
  7. Copy data from a sheet to other based on a criteria
    By arun88aries in forum Excel General
    Replies: 5
    Last Post: 02-22-2011, 06:13 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