+ Reply to Thread
Results 1 to 7 of 7

Find, copy and paste specific values.

  1. #1
    Registered User
    Join Date
    06-26-2015
    Location
    Poland
    MS-Off Ver
    365
    Posts
    56

    Find, copy and paste specific values.

    Hey there,
    I'm trying to pull out some data from sheet with 40,000~ rows and about 300 employees.
    example.jpg
    I need to find values >0, sort it descending (by days) and exclude few JobNames. I tried to do that with aggregate and index formulas, but it's kind of slow on weaker PCs and I'm stuck now.
    So, what I need to do is this:
    1. Find Employee from P1 cell
    2. Copy Job, Days, Sum, Average (these columns are not next to each other)
    3. Exclude few specified JobNames in R1:R2 range
    4. Paste it sorted descending by Days
    Ideally it would work on combobox change.
    Perhaps there is a better and faster way to achieve that? Any help is greatly appreciated! Thank you.
    Attached Files Attached Files
    Last edited by Pojzon; 10-14-2018 at 12:00 PM.

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

    Re: Find, copy and paste specific values.

    See if this is fast enough.
    For the layout for output range in uploaded workbook.
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-26-2015
    Location
    Poland
    MS-Off Ver
    365
    Posts
    56

    Re: Find, copy and paste specific values.

    Thank you for reply, I will have to check it at work for final verdict, but so far it looks amazing and much faster than formulas. I have one more question. As I understant, adding "Call test" at Sub ComboBox1_Change() is the way to go? Is there any way to stop this macro from running whenever I write text to find instead of selecting it from drop down list? With formulas I just used:
    ComboBox1_GotFocus() Application.Calculation = xlManual
    ComboBox1_LostFocus() Application.Calculation = xlAutomatic
    which won't work in this situation.

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

    Re: Find, copy and paste specific values.

    Follow the step.
    1) ThisWorkbook code Module
    Please Login or Register  to view this content.
    2) Sheet1 sheet code module
    Please Login or Register  to view this content.
    See attached
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-26-2015
    Location
    Poland
    MS-Off Ver
    365
    Posts
    56

    Re: Find, copy and paste specific values.

    I tried this and It still runs macro every time I type a letter in combobox, without letting me to finish full string that I'm looking for e.g. I'm looking for "ABC", but it runs macro when it found "A" employee, then when it found "AB" employee and then finally "ABC". Anyway It's not a big deal, I can live with that. Nonetheless you've done amazing job and I thank you for that!
    Last edited by Pojzon; 10-14-2018 at 12:03 PM.

  6. #6
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Find, copy and paste specific values.

    Try adding this code to worksheet module
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

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

    Re: Find, copy and paste specific values.

    Just change the event to Click
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

+ 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 and paste only specific values to the row that contains the value
    By Helensa in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-18-2018, 12:48 PM
  2. [SOLVED] Find specific text within workbook's name, copy and paste it to specific cell
    By axtryo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-09-2017, 02:57 AM
  3. Find specific Data copy and paste into Cell Macro VBA
    By kunmateo93 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-06-2014, 10:17 AM
  4. Replies: 2
    Last Post: 03-05-2013, 07:52 AM
  5. Vba - find next empty column, insert column, copy paste values & copy paste formulas
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 12:43 PM
  6. Find the specific text and copy and paste in another cell only if true.
    By SHARIB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2012, 03:14 AM
  7. Excel: Find All (specific) Copy All, Paste All ?
    By coffee_king in forum Excel General
    Replies: 1
    Last Post: 09-19-2012, 02:15 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