+ Reply to Thread
Results 1 to 13 of 13

Match index issue?

Hybrid View

Mparekh Match index issue? 03-16-2009, 12:28 PM
DonkeyOte Re: Match index issue?- need... 03-16-2009, 12:37 PM
Mparekh Re: Match index issue?- need... 03-16-2009, 01:04 PM
DonkeyOte Re: Match index issue? 03-16-2009, 02:08 PM
Mparekh Re: Match index issue? 03-16-2009, 02:35 PM
martindwilson Re: Match index issue? 03-16-2009, 02:54 PM
  1. #1
    Registered User
    Join Date
    10-04-2004
    Posts
    13

    Match index issue?

    Hello Excel experts,

    I need some help with following problem that I have been struggling with for days. I am trying to count how many orders have Part numbers A and B on the same order. If order 123 has part number A and B on it then return true or else false. I think Match and array might be a way to go but I am still not able to come up with the result that I need. Can you guys help????????????


    Here's how the Data looks like:

    Order Part numbers
    123 A
    123 B
    123 C
    123 D
    234 A
    234 B
    234 E
    346 A
    346 C

    Answer for above would be 2 orders that have A and B part numbers on the same order.

    Thanks in advance,

    MP
    Last edited by VBA Noob; 03-16-2009 at 01:31 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Match index issue?- need help

    Not very elegant... but perhaps:

    =SUMPRODUCT(--(B2:B10="A"),--(ISNUMBER(MATCH(A2:A10&":B",A2:A10&":"&B2:B10,0))))

    (flawed if you have multiple instances of Order & Part A)

  3. #3
    Registered User
    Join Date
    10-04-2004
    Posts
    13

    Re: Match index issue?- need help

    Donkeyote Thanks for your response.

    I will not have multiple instances of the same order but there are cases where one order can have Part A listed more than once.

    Any other suggestions?

    Thanks again for your response.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Match index issue?

    Are you able to use a column of helper cells ?

  5. #5
    Registered User
    Join Date
    10-04-2004
    Posts
    13

    Re: Match index issue?

    not sure what that means...

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Match index issue?

    Well for ex... if you could use another column adjacent to your data such that (based on example)

    C2: =A2&":"&B2
    copied down to C10

    Then you could use the below for your total:

    =SUMPRODUCT(--(B2:B10="A"),--(ISNUMBER(MATCH(A2:A10&":B",C2:C10,0))),1/COUNTIF(C2:C10,C2:C10&""))

    This would account for multiple instances of Order:A

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Match index issue?

    even uglier is this youwill get at least one true for each id if both conditions are matched part numbers to match go in d1 and e1
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ 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