+ Reply to Thread
Results 1 to 6 of 6

Can you combine Count + Lookup Functions?

  1. #1
    Registered User
    Join Date
    11-12-2009
    Location
    United States
    MS-Off Ver
    Excel 2010 (or Excel 2003)
    Posts
    24

    Can you combine Count + Lookup Functions?

    I have a spreadsheet (attached) that I'd like to do the following for...

    These are NFL football game results.

    In Cell AG2, I would like to enter a formula that searches data is columns A:AN and tallies the # of times Column N has a CW (close win, which is 7 or less in "DIF"[M] column) for each winning team (column D).

    So, in this case, the formula would see "ARI" five times in column D, then read the values in Column N and count CW three times, and give the result '3' in AG2.

    If I have just this one formula, it will help me endlessly with such spreadsheets in the future, so thanks in advance for your help.
    Attached Files Attached Files
    Last edited by thumper300zx; 01-24-2011 at 01:59 PM.

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Can you combine Count + Lookup Functions?

    This in AG2. But you have to remove the trailing spaces in column D:

    =SUMPRODUCT(($N$2:$N$257="CW")*($D$2:$D$257=$AF2))

  3. #3
    Registered User
    Join Date
    11-12-2009
    Location
    United States
    MS-Off Ver
    Excel 2010 (or Excel 2003)
    Posts
    24

    Re: Can you combine Count + Lookup Functions?

    Quote Originally Posted by StephenR View Post
    This in AG2. But you have to remove the trailing spaces in column D:

    =SUMPRODUCT(($N$2:$N$257="CW")*($D$2:$D$257=$AF2))
    I noticed something was funny about the data -- thanks for pointing out the trailing spaces.

    Much appreciated. 14 thousand some odd trailing spaces removed Must've been a remnant of the table I copied values from.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Can you combine Count + Lookup Functions?

    I assume you knew about TRIM then. Or you must be a very quick typist.

  5. #5
    Registered User
    Join Date
    11-12-2009
    Location
    United States
    MS-Off Ver
    Excel 2010 (or Excel 2003)
    Posts
    24

    Re: Can you combine Count + Lookup Functions?

    Quote Originally Posted by StephenR View Post
    I assume you knew about TRIM then. Or you must be a very quick typist.
    Actually just did REPLACE ALL "<space>" w/ "".

    Could only do that because I know there are no other spaces needed in this spreadsheet, so I'll check out TRIM

  6. #6
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606

    Re: Can you combine Count + Lookup Functions?

    Even better!

+ 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