+ Reply to Thread
Results 1 to 3 of 3

Selectively pairing down an Excel list

  1. #1
    Registered User
    Join Date
    09-25-2014
    Location
    MPLS, MN
    MS-Off Ver
    2010
    Posts
    3

    Selectively pairing down an Excel list

    So, I get a list of phone calls each day from a partner that I need to review. I only have to review 30% of this list. What I would like to do is to write a macro that will look at the column with the agent id and delete the row anytime there are more than 2 entries for that agent. I have no experience with VBA and have been having a hard time finding true square one tutorials (I will be looking through the sticky on this forum as soon as I am done here). Below I will list what I would like the macro to do, I was hoping someone would be willing to translate it into VBA for me.

    Thanks,



    ---------------------

    Select all rows
    sort by column s
    row number = x
    for each not empty row in the workbook
    if sx<cell value> = s(x-2)<cell value>
    delete contents of row
    else
    do nothing
    select all rows
    sort by column s
    Last edited by freemasen; 09-25-2014 at 04:18 PM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,460

    Re: Selectively pairing down an Excel list

    Hi and welcome to the forum

    You want rows of just the unique IDs (no duplicates) in column S?

    If yes, record these steps in a macro. You may have to fine tune the macro after, but it will give you some base-code to start with.

    Start recording
    Select column S
    Select from the menu Data\Filter\Advanced Filter
    Filter the list in place
    Checkbox: Unique Records only
    OK
    Select all the filtered rows of unique IDs and copy
    Select cell A1 on a blank sheet and paste
    Stop recording


    P.S. the forum editor does support indents.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    09-25-2014
    Location
    MPLS, MN
    MS-Off Ver
    2010
    Posts
    3

    Re: Selectively pairing down an Excel list

    Unfortunatly I need 2 or 3 calls from each agent. 1 call from each agent doesn't account for the call being too short not corrupt. I am currently doing this manually but thought there might be a way to automate it.

+ 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. Randomly pairing wrestlers in a list
    By collirde in forum Excel General
    Replies: 2
    Last Post: 11-23-2013, 09:47 AM
  2. Excel 2007 : Randomly pairing up list of names
    By Stefanious in forum Excel General
    Replies: 1
    Last Post: 09-08-2011, 03:41 PM
  3. Excel SUMPRODUCT, INDEX function pairing
    By jcountzler in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-03-2009, 04:01 PM
  4. [SOLVED] Selectively Populate Excel VBA Combo Box
    By ll in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-04-2006, 05:20 PM
  5. [SOLVED] How do I selectively import data from another Excel worksheet?
    By Emmanuel in forum Excel General
    Replies: 1
    Last Post: 05-09-2005, 02:06 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