Consulting

Results 1 to 7 of 7

Thread: Solved: Array formula to extract multiple values

  1. #1
    VBAX Contributor
    Joined
    Apr 2006
    Posts
    144
    Location

    Cool Solved: Array formula to extract multiple values

    Hi guys,

    I'm a bit stuck in writing an array formula to return multiple values for unique entries (A, B & C) from a dynamic list in columns A & B . I couldn't find an answer in this forum so I need someone's help.

    I attach an example file for your viewing. I have manually input the answer for A in range E3:E7. It would be good if we can make the formula dynamic as well.

    Thanks in advance.

    Kind regards


    kp

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Try this
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Tutor
    Joined
    Aug 2007
    Posts
    273
    Location
    parden my ignorance but i was looking at your sulution xld and i was wonder what exatly the folowing code dose

    COUNTIF($E$2:E$2,$B$1:$B$20&"")

    other then those three characters it seems like a normal countif statment

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Its not a normal COUNTIF, it is an array COUNTIF, which counts all occurrences of the second array in the first. The &"" is to cater for empty cells.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    VBAX Tutor
    Joined
    Aug 2007
    Posts
    273
    Location
    thanks

  6. #6
    VBAX Contributor
    Joined
    Apr 2006
    Posts
    144
    Location
    Beautiful. Thanks so much XLD. Appreciate your help.

    Regards


    kp

  7. #7
    VBAX Contributor
    Joined
    Apr 2006
    Posts
    144
    Location
    Hi All,

    I just made a minor amendment to XLD's solution to make the array formulae dynamic. I enclose an example file for everyone's benefit. Also given the size of the formula, I have turned off the formula bar for easy viewing.

    Thanks again XLD.

    Regards


    kp

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •