+ Reply to Thread
Results 1 to 6 of 6

vlookup and countif???

  1. #1
    Joe
    Guest

    vlookup and countif???

    help I am trying to write a formula that says the following.

    if coloum a = main and if coloum b = yes please count the yes's

    I have tried using vlookup and count if but I just get a null value returned

    hope there is somebody there who can help

    thanks



  2. #2
    Aladin Akyurek
    Guest

    Re: vlookup and countif???

    =SUMPRODUCT(--($A$2:$A$100="Main"),--($B$2:$B$100="Yes"))

    Joe wrote:
    > help I am trying to write a formula that says the following.
    >
    > if coloum a = main and if coloum b = yes please count the yes's
    >
    > I have tried using vlookup and count if but I just get a null value returned
    >
    > hope there is somebody there who can help
    >
    > thanks
    >
    >


  3. #3
    Joe
    Guest

    Re: vlookup and countif???

    Hello

    I have tried to us this formula but it returns a #NUM! value.

    I am trying to count no sum the cells

    Thanks
    --
    Cheers


    "Aladin Akyurek" wrote:

    > =SUMPRODUCT(--($A$2:$A$100="Main"),--($B$2:$B$100="Yes"))
    >
    > Joe wrote:
    > > help I am trying to write a formula that says the following.
    > >
    > > if coloum a = main and if coloum b = yes please count the yes's
    > >
    > > I have tried using vlookup and count if but I just get a null value returned
    > >
    > > hope there is somebody there who can help
    > >
    > > thanks
    > >
    > >

    >


  4. #4
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Only a slight ammendment
    =SUMPRODUCT(($A$2:$A$100="Main")*($B$2:$B$100="Yes"))

    I have enclosed the yes in " but it displays with a space above, it should not be there! just "yes"

    The conditions return a list of true and false, if they are multiplied together you get
    true x true =1
    true x false =0
    false x true =0
    false x false=0

    So it only sums the values when its true

    The original formula tries to sum text and is not happy hence #num

    Regards

    Dav
    Last edited by Dav; 03-13-2006 at 05:24 AM.

  5. #5
    Joe
    Guest

    Re: vlookup and countif???

    =SUMPRODUCT(('Next Ref No - 1st Qtr'!E:E="main")*('Next Ref No - 1st
    Qtr'!K:K="yes"))

    thank you so much for your response, i am now putting in the above formula
    but i am still getting #NUM!

    What am i doing wrong?

    thanks
    --
    Cheers


    "Dav" wrote:

    >
    > Only a slight ammendment
    > =SUMPRODUCT(($A$2:$A$100="Main")*($B$2:$B$100="Yes"))
    >
    > I have enclosed the yes in " but it displays with a space above, it
    > should not be there! just "yes"
    >
    > The conditions return a list of true and false, if they are multiplied
    > together you get
    > true x true =1
    > true x false =0
    > false x true =0
    > false x false=0
    >
    > So it only sums the values when its true
    >
    > The original formula tries to sum text and is not happy hence #num
    >
    > Regards
    >
    > Dav
    >
    >
    > --
    > Dav
    > ------------------------------------------------------------------------
    > Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
    > View this thread: http://www.excelforum.com/showthread...hreadid=520293
    >
    >


  6. #6
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    Sumproduct does not work with column references, If your first row is column headings replace.

    E:E with e2:e65536 should your range need to be this long, an similarly for K:K

    Regards

    Dav

+ 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