+ Reply to Thread
Results 1 to 16 of 16

copy or remove particular count of records and pasting in another excel workbook

  1. #1
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    copy or remove particular count of records and pasting in another excel workbook

    Hi

    i have a multiple records (30 k) in a excel workbook , in that i want take only 3 records of email per company,

    ex: the company having 10 email in that only three email i need to copy or remove and keep in separate excel workbook.

    if the company having less then three, the same count or email i need to copy or remove and keep in separate excel workbook.

    i have kept the same file also.

    please help me how to do.

    thanks and regards
    Josh
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: copy or remove particular count of records and pasting in another excel workbook

    any one can help me......

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,688

    Re: copy or remove particular count of records and pasting in another excel workbook

    You have not received any responses because your explanation is not clear. Please provide a sample of the what the solution should look like. (prepared manually) No one knows what your logic is to achieve your expected solution. Help us to help you with more information and examples of the solution.

    Alan
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: copy or remove particular count of records and pasting in another excel workbook

    Quote Originally Posted by alansidman View Post
    You have not received any responses because your explanation is not clear. Please provide a sample of the what the solution should look like. (prepared manually) No one knows what your logic is to achieve your expected solution. Help us to help you with more information and examples of the solution.

    Alan

    please find the attached file, which is colored in yellow records as to copy and past in another sheet.(<=3 records copy to another sheet)

    please help me

    regards
    Josh
    Attached Files Attached Files

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,050

    Re: copy or remove particular count of records and pasting in another excel workbook

    Use another helper column, D

    Cell D4:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and drag down.

    Filter column D on less than or equal to 3. Copy visible records to the new sheet.

    Regards, TMS


    Edit: error in formula ... change $A$2,$A2,$A2 to $A$2:$A2,$A2
    Last edited by TMS; 09-21-2013 at 02:02 PM.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  6. #6
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: copy or remove particular count of records and pasting in another excel workbook

    See the attached file
    Attached Files Attached Files

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: copy or remove particular count of records and pasting in another excel workbook

    Hi perusjosh

    Here's a VBA solution
    Please Login or Register  to view this content.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,050

    Re: copy or remove particular count of records and pasting in another excel workbook

    Another VBA solution:

    Please Login or Register  to view this content.

    Regards, TMS

  9. #9
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: copy or remove particular count of records and pasting in another excel workbook

    Hi thanks a lot
    excellent solution you have given to me.

    Small changes required in this.
    if criteria is changing to instead of 3 , if i want 5 records how to get it.
    So, please give me the option that at button 1(how many records you want __ ) if i enter the cont
    according to that it will separate the records.

    thanks a lot for your wonderful solution once again.

    josh

  10. #10
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: copy or remove particular count of records and pasting in another excel workbook

    Hi mama ,
    Thanks a lot, i'm not able to use more records, i have 5000 records, so how extend the formula(i'm not able to copy and past the formula- when am doing the following error show's - *you cannot change part of an array*)

    once again thanks a lot.

    josh

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,050

    Re: copy or remove particular count of records and pasting in another excel workbook

    Ah ... scope creep. In reality, you have had several solutions to your original question and, as such, this thread should now be marked solved.

    I am assuming that you are only going to want to vary the number of records extracted occasionally so, rather than add the overhead of front end code which will rarely be used, you might just as well edit the filter.

    For example, in my code, you would change:

    Please Login or Register  to view this content.

    to:

    Please Login or Register  to view this content.

    You should also bear in mind that my code simply automates the manual solution offered in post #5.


    If you really need the additional code, I would suggest you ask for it in a separate thread.


    Regards, TMS


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  12. #12
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: copy or remove particular count of records and pasting in another excel workbook

    Hi,

    i have 1000 records, how can i make it,

    u have given the solution but, its work only one criteria but criteria may change.

    please help me solve.

    josh.

  13. #13
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,050

    Re: copy or remove particular count of records and pasting in another excel workbook

    OK, maybe this:

    Please Login or Register  to view this content.

    Regards, TMS
    Last edited by TMS; 09-24-2013 at 08:25 AM. Reason: fix teeny tiny typo ...

  14. #14
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: copy or remove particular count of records and pasting in another excel workbook

    hi,
    am try to do with your code but am getting the error.

    please how to execute the code or

    i'm attaching the file kindly insert the code and send to me.

    information required: can is use any number of records in this code.


    regards
    Josh
    Attached Files Attached Files

  15. #15
    Registered User
    Join Date
    02-22-2013
    Location
    india
    MS-Off Ver
    Excel 2003
    Posts
    49

    Re: copy or remove particular count of records and pasting in another excel workbook

    Hi TMS,

    Please help me to do this

    regards
    Josh

  16. #16
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,050

    Re: copy or remove particular count of records and pasting in another excel workbook

    Thought I'd already done this ...

    Suspect the forum problems prevented the upload.

    See attached example

    Regards, TMS
    Attached Files Attached Files

+ 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: 7
    Last Post: 07-05-2013, 01:23 PM
  2. [SOLVED] Problem pasting data into new workbook when worksheet has no records
    By sokker23 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-16-2013, 05:35 PM
  3. Replies: 0
    Last Post: 08-11-2011, 01:23 AM
  4. Copy Pasting data from one excel workbook to another using vba
    By wahaj in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-10-2009, 02:50 AM
  5. Copy records with the same value in a column to a new sheet or workbook
    By reeyasen in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-30-2008, 11:29 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