Consulting

Results 1 to 5 of 5

Thread: Solved: Find value and count occurances of text

  1. #1
    VBAX Regular
    Joined
    Jun 2007
    Posts
    37
    Location

    Solved: Find value and count occurances of text

    Hi All,

    I have a list of School results to process. And need to find the number of Bioligy students who have a Pass, Merit and then Physics studetns who have Pass, Merit.

    Biology - Pass
    Biology - Pass
    Biology - Merit
    Physics - Pass
    Physics - Merit


    To solve this I am using an elaborate macro that filters the data and then counts it, but this involves me selecting the new data soure (subject) each time. I won't post the code for this as it was done in recorder mode and is vast.

    Could anyone advise me of a better way or formula to do this. I'm thinking of some sort of =vlookup maybe?

    Thanks in advance all

    edit: Possibly a Pivot table thinking about it?
    Last edited by alu; 08-19-2009 at 02:39 AM.

  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
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    I think SumProduct is the way to go. Have a look here
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    With a pivot
    ____________________________________________
    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 Regular
    Joined
    Jun 2007
    Posts
    37
    Location
    Solved with the Pivot Table. Thanks El Xid.

    Also never come across SumProduct before, looks like its worth investigation.

    Thanks again all.

Posting Permissions

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