+ Reply to Thread
Results 1 to 3 of 3

Thread: Formula for Lookup and Count function in new Excel update

  1. #1
    Registered User
    Join Date
    11-07-2008
    Location
    Austin, TX
    Posts
    7

    Formula for Lookup and Count function in new Excel update

    Having trouble getting a formula to work that will lookup a site number and count the number of times the site has a particular type of visit. For instance:

    Site # Visit
    1001 Active
    1001 Active
    1001 Discont.
    1001 Screen Fail
    1001 Active
    1002 Discont.
    1002 Active
    1002 Screen Fail
    1002 Active

    I want a formula that will return the number of active instances for each site, like:

    Site # # of Active Visits
    1001 3
    1002 2
    Last edited by VBA Noob; 11-11-2008 at 02:46 PM.

  2. #2
    Forum Guru NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    32,636
    Try Sumproduct()

    e.g. =Sumproduct(($A$1:$A$10="1001")*($B$1:$B$100="Active"))

    adjust ranges to suit.

    You can replace the "1001" and/or "Active" with cell references containing those strings.
    Microsoft MVP - Excel

    Where there is a will there are many ways. Pick One!


    Please read the Forum Rules

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

    Preferred Charities: Lupus Canada and Sick Kids Foundation.
    Feel Free to Donate if you want to, for the assistance you received today.

  3. #3
    Registered User
    Join Date
    11-07-2008
    Location
    Austin, TX
    Posts
    7
    Thank you so much. It worked perfectly.

+ 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.2.0