+ Reply to Thread
Results 1 to 6 of 6

Lookup repeated values, extract info from that row and sum other values associated

  1. #1
    Registered User
    Join Date
    04-11-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    10

    Lookup repeated values, extract info from that row and sum other values associated

    This is the second part of my whole problem. First part of the problem and the a demo file i have posted here


    In Colum B where i have ticket #s and some of the tickets are repeated every month . I need to find a way to sort all the repeated tickets (within one month jan/feb etc based on column A) and output into another tab on that spreadsheet. That way i have all the unique tickets from any given month (not the year).



    Thanks

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Lookup repeated values, extract info from that row and sum other values associate

    tms12,

    The following macro should do what you're looking for. Just replace "Sheet1" and "Sheet2" with the correct sheetnames (keep the quotes in the code, just replace the text):

    Please Login or Register  to view this content.



    Sheet1 should be the source sheet that contains all of the ticket numbers
    Sheet2 should be the destination sheet that will have the unique ticket numbers by month

    Note: The macro assumes tickets are grouped by month
    Example (sheet1):
    Column A - Column B
    Month - Ticket Number
    January - 123
    January - 134
    January - 135
    February - 123
    February - 134
    February - 135

    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar
    Last edited by tigeravatar; 04-11-2011 at 04:49 PM. Reason: Clarity

  3. #3
    Registered User
    Join Date
    04-11-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Lookup repeated values, extract info from that row and sum other values associate

    @ Tigeavatar

    So far i have done the following:
    - Created a new tab called 'Filter Data'
    - Changed 'Sheet 1' to 'Raw Data' and 'Sheet 2' to 'Filter Data'
    - Open the tab 'Filter data ' and tried to run the macro BUT i get a run time error 9 highlighting 'raw data'

    Need your expertise thanks

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Lookup repeated values, extract info from that row and sum other values associate

    tms12,

    Can you post the workbook please, so I can better help you?

    ~tigeravatar

  5. #5
    Registered User
    Join Date
    04-11-2011
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Lookup repeated values, extract info from that row and sum other values associate

    Here it is
    Last edited by tms12; 04-12-2011 at 02:24 PM.

  6. #6
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Lookup repeated values, extract info from that row and sum other values associate

    tms12,

    The reason you were getting an error regarding the sheetname, was because the sheet Raw Data has a space at the end of it:
    -Instead of "Raw Data" it was "Raw Data "

    Also, many of the ParterObj numbers were numbers stored as text. I highlighted all of column B in the "Raw Data " sheet and ran the following simple macro to convert them to numbers:

    Please Login or Register  to view this content.


    Lastly, because the sheetnames had spaces in them, I needed to update a section of the code to surround sheet names in single quotes in order to retrieve the data you were looking for:

    Please Login or Register  to view this content.


    After that, running the macro worked fine. I have attached a modified copy of your workbook. Here is the updated macro with your sheetnames and the updated section of code:

    Please Login or Register  to view this content.


    Hope that helps,
    ~tigeravatar
    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)

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