+ Reply to Thread
Results 1 to 8 of 8

Listing all row instances associated with one column value

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Listing all row instances associated with one column value

    Hello,

    I have 2 worksheets. The first worksheet that lists a great number of transactions between customers and my company. Each of these transactions have a unique customer account number listed as a column value. No null values.

    The second worksheet is a shorter, randomized list of these account numbers. I would like to take one of these randomized account numbers, and find all associated transactions on the first worksheet that match the account number.

    There may be no transactions listed for one of the account numbers, or there could be 150. The important part is I need to list the entire ROW (approximately 20 columns for each row) for the associated transactions.

    I would post a sample but the file is something like 20 mb and includes mostly sensitive information. Please let me know if my explanation doesn't make sense.
    Attached Files Attached Files
    Last edited by C_Willy; 05-17-2013 at 01:56 AM. Reason: Adding Attachment

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Listing all row instances associated with one column value

    Hi and welcome to the forum

    I understand that your data is sensitive, but it would help if you could put together some dummy data for us to look at and work with?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    05-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Listing all row instances associated with one column value

    I knew you guys were going to say that! haha

    Due to size restrictions, I had to cut down quite a bit. Please notice, I am trying to use Column J (which is usually a unique identifier) from the CA RANDOMS Tab to search for all related transactions on the Oct Channel Approver Denied Tab. So if the unique identifier in Column J on the first tab is present in the second tab, say, seven times, I want seven different rows to show on a new sheet. Each row on this new sheet should have columns A:T showing.

    Again, please imagine thousands more rows than what is showing. Please let me know if I'm not explaining clearly.

  4. #4
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Listing all row instances associated with one column value

    ... So if the unique identifier in Column J on the first tab is present in the second tab, say, seven times, ...
    So you want to search every time for a certain unique identifier ??

    ..again, please imagine thousands more rows than what is showing.
    Perhaps if it's real that you have thousands of rows(how many?), will be better to use VBA code.

    I say this, because i feel that we'll need to use an ARRAY formula for this and for thousands of rows, the calculations will be too slow...
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  5. #5
    Registered User
    Join Date
    05-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Listing all row instances associated with one column value

    Yes using the unique identifier all "seven" times. The identifier is a customer account number, I'm trying to find how many transactions the customer initiated after the first transaction under the same account number.

    When I say thousands I'm talking about 13K or so.

    I've researched a bit and found some hinting that I should be using VBA code. Since it's not very familiar territory for me, I was hoping for some standard formula usage. Do you think that's not possible given my situation? Or just terribly inefficient? Is speed the only advantage for using a vba function?

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Listing all row instances associated with one column value

    ...I was hoping for some standard formula usage. Do you think that's not possible given my situation? Or just terribly inefficient? Is speed the only advantage for using a vba function?
    As i know, if you want to use standart formula, we have to use 1-2 helper-hidden columns.

    This ARRAY formula gives what you need, but will be very slow with thousands of columns.

    =INDEX('CA RANDOMS'!$A$2:$A$1000,SMALL(IF('CA RANDOMS'!$J$2:$J$1000=$A$1,ROW('CA RANDOMS'!$A$2:$A$1000)-1),ROW('CA RANDOMS'!A1)))

    In A1 of your new sheet put your unique identifier that you want to see it's results. In A2 and copy down put my suggested formula.

    One of VBA advantages is the speed. True is that i know almost nothing about VBA, so i can not helps you on this.

  7. #7
    Registered User
    Join Date
    05-01-2013
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Listing all row instances associated with one column value

    Thank you so much, Fotis! I'm going to crash study VBA in the morninig to see if it's a viable option for me. I appreciate the formula at any rate! Have a great night!

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Listing all row instances associated with one column value

    It's 10:30am(morning here)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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