+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    02-24-2010
    Location
    Columbia, SC, USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Counting within a list

    I have a list on Sheet2 with entries listing student names with their graduation years (Column B) and whether or not they were awarded one of two scholarship (marked with an asterisk in Column C and/or D). On Sheet1 I've set up a table that totals up how many people are from each year and how many got their scholarship in the respective years. Currently I'm running using the following formula (this one checks to see if they are a 2010 graduate and have scholarship C...

    =SUMPRODUCT((Sheet2!B:B=2010)*(Sheet2!C:C="*"))

    While this works, checking through all of Column B and all of Column C makes any alteration of the sheet take about 30 seconds because it's rechecking both columns in full. I know I can set it to only check through a certain number of cells, but as the list is updated every year with additional students I'd rather have it scale automatically. Is there a way have the formula only check cells that are in the list? Or the last non-blank cell in the list (or sheet, as the list starts at A1)? I'm on a Mac so VBA scripts are out of the question unfortunately.

  2. #2
    Forum Moderator NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003, 2007, 2010
    Posts
    31,147

    Re: Counting within a list

    Try possibly:

    First get last filled row number, so in say X1 in current sheet...:

    =Match(9.999999999,Sheet2!B:B)

    Then formula:


    =SUMPRODUCT((Sheet2!B1:INDEX(Sheet2!B:B,X1)=2010)*(Sheet2!C1:INDEX(Sheet2!C:C,X1)="*"))

    if you put the last row formula in sheet2, then precede X1 with Sheet2!

    Note also, in 2007, you can use Countifs... which may be more efficient...

    =COUNTIFS(Sheet2!B1:INDEX(Sheet2!B:B,X1),2010,Sheet2!C1:INDEX(Sheet2!C:C,X1),"~*")) .. note the ~ to "void" the wildcard assumption
    Last edited by NBVC; 02-24-2010 at 11:52 AM.
    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.

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