+ Reply to Thread
Results 1 to 8 of 8

Expression

  1. #1
    Registered User
    Join Date
    12-31-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Expression

    I am trying to understand the following expression , can anyone advise?

    = COUNTIFS(Worksheetname!F:F,C:C,Worksheetname!N:N,"Yes")

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Expression

    Hi and welcome to the forum

    What that is doing, is counting stuff, although I think there may be an error in the 2nd range...
    =countifs(criteria-range1,criteria1,criteria-range2,criteria2,criteria-range3,criteria3.........
    soooooo....
    =countifs(in the range Worksheetname!F:F, count how many = C:C, that also = "Yes" in Worksheetname!N:N)

    You would normally use a single cell ref or a hard-coded criteria ("Yes"), rather than a range of cells (C:C) though

    So in english, count how many items in F = C, but ALSO = Yes in N
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    12-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Expression

    Hi Sharon1,

    further to the message above, I got it to work so that it was counting how many times criteria 1, matched criteria 2 as long as criteria three was marked "yes"


    I hope that helps
    Last edited by arlu1201; 01-02-2014 at 09:54 AM.

  4. #4
    Registered User
    Join Date
    12-31-2013
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Expression

    So, count how many items in F = C And How many items in N is "Yes"
    If the first part doesn't have any match it will count as '0' and add it to the 2nd part which is counting Yes.
    Please confirm.

  5. #5
    Forum Contributor
    Join Date
    12-16-2013
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Expression

    so it counted how many instance that f4 = c4 and that n = yes

    and it would not count if f4 did not =c4 or if n did not equal yes

  6. #6
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Expression

    The main problem with the formula as I see it is that only the first value in C:C is being used against values in F:F in the countifs and only for values that match YES in column N. What the other values in C:C are intended to do I don't know.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Expression

    Quote Originally Posted by Sharon1 View Post
    So, count how many items in F = C And How many items in N is "Yes"
    If the first part doesn't have any match it will count as '0' and add it to the 2nd part which is counting Yes.
    Please confirm.
    No, thats not quite right. All criteria have to be met for the count to increase. So is the 1st part finds no matches, the count will be zero - end of counting.

    But, like I said before, Im pretty sure you should be using a specific "single" criteria for "criteria1", and not the entire C column

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Expression

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem. Once you have done this please send me a PM and I will remove this request.

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Regular Expression
    By Kvramana in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2013, 05:32 AM
  2. Need VBA expression
    By SDruley in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-03-2012, 01:32 AM
  3. What this expression does?
    By massaoh in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 03-06-2008, 05:38 PM
  4. [SOLVED] need help with expression
    By Peterpunkin in forum Excel General
    Replies: 5
    Last Post: 05-04-2006, 01:00 PM
  5. [SOLVED] Expression
    By gudway in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 05-04-2006, 08:20 AM

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