+ Reply to Thread
Results 1 to 6 of 6

COUNTIF or SUMIF Formula based on other column value needed urgently please?

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    37

    COUNTIF or SUMIF Formula based on other column value needed urgently please?

    Hi,

    I have this formula to count persons under 18, which works fine: =COUNTIF($C$12:$C$65536,">"&(TODAY()-6574.35958))

    However, I would like to use that exact same functionality (for the counted rows), but this time ONLY if cells ($E$12:$E$65536) = M

    I have tried various combinations of formula's but I'm just not getting it - can anybody help please?

    Many thanks in advance.

    Jamie

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: COUNTIF or SUMIF Formula based on other column value needed urgently please?

    tRY USING sumproduct. Perhaps something like this.

    =SUMPRODUCT(($C$12:$C$65536>(TODAY()-6574.35958))*($E$12:$E$65536="M"))

    untested
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: COUNTIF or SUMIF Formula based on other column value needed urgently please?

    Hi
    As you have Excel 2003 use the sumproduct function or for Excel 2007+ look into the countifs.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  4. #4
    Registered User
    Join Date
    08-30-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: COUNTIF or SUMIF Formula based on other column value needed urgently please?

    Perfect! Thanks so much for your speedy response and your valued help! Works great!

    Incidentally, if anyone else needs this handy formula - I've also added the formula for Males (M) over 18 (or change it to match your own value).


    Under 18
    =SUMPRODUCT(($C$12:$C$65536>(TODAY()-6574.35958))*($E$12:$E$65536="M"))

    Over 18
    =SUMPRODUCT(($C$12:$C$65536<=(TODAY()-6574.35958))*($E$12:$E$65536="M"))


    Thanks again! :o)

  5. #5
    Registered User
    Join Date
    08-30-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    37

    Re: COUNTIF or SUMIF Formula based on other column value needed urgently please?

    Thanks Kevin, Fotis' formula did just what I need. Thanks for your help anyway!

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: COUNTIF or SUMIF Formula based on other column value needed urgently please?

    .......................

+ 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.6.0 RC 1