+ Reply to Thread
Results 1 to 18 of 18

Formula counting from 2 columns, countif function

  1. #1
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Formula counting from 2 columns, countif function

    Hi all

    I have a formula that simpl counts the number in a column that is equal to a certain word.

    =COUNTIF(owssvr!C:C,"Initiate")

    This looks up the tab then the column in the tab then the specific word and counts them.

    What I am trying to do now is also use column A as I only want the formula to count the word initiate to the ones in column A that is equal to the word open.

    At the moment it counts them all, which picks up collumn A which has cancelled, closed and so on.

    Is this possible?

    Regards

    Matt
    Last edited by MattExcelLearner; 10-21-2019 at 04:40 AM. Reason: SOLVED

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Formula counting from 2 columns, countif function

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please DO NOT attach a picture of an Excel sheet (I do not have the patience to re-type any/all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. For example, don't show text in a column if it's really a number. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually). To be honest, I am not interested in seeing a non-working formula... or a pile of blank cells. However, I am very interested in seeing your EXPECTED results in their EXPECTED location.

    4. Try not to use merged cells. They cause lots of problems and are DEFINITELY best avoided!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    Sure, Hope this helps
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Formula counting from 2 columns, countif function

    We started posing a banner at the top of the page to encourage people to post attachments.... I, for one, can't visualise a problem from a pile of words!!

  5. #5
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    Was my bad

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Formula counting from 2 columns, countif function

    =COUNTIFS(owssvr!C:C,"Initiate",owssvr!A:A,"open")

    maybe?

  7. #7
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: Formula counting from 2 columns, countif function

    Instead of countif you can go with countifs function as you have more than one condition.

    Try

    D10=COUNTIFS(owssvr!C:C,B10,owssvr!A:A,"Open")
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  8. #8
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    Tried: =SUMPRODUCT((owssvr!C:C="Initiate")+(owssvr!A:A="Open"))

    This totally gave me a silly number lol

  9. #9
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    Awesome that works

    Checked against the data and it's totaling correctly, thanks

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Formula counting from 2 columns, countif function

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  11. #11
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    Just have to workout now how to expand on this formula to show at each stage which is column C and is equal to Open on column A to add in if the date has past from column G to count it

    This one looks complicated, any ideas anyone?

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Formula counting from 2 columns, countif function

    Try:
    =COUNTIFS(owssvr!C:C,"Initiate",owssvr!A:A,"open",owssvr!G:G,"<"&TODAY())

  13. #13
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    Looking at the data and counting it looks to work

    Many thanks chap

  14. #14
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    Long shot, but if I wanted to maybe count each open row from G which has been open more than one month from date supplied in G

    would it be something like:

    =COUNTIFS(,owssvr!A:A,"open",owssvr!G:G,"<"&+1MONTH())

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Formula counting from 2 columns, countif function

    No. See sheet, for all 3. I filtered the data for ease of checking. How can row 3 be open when it has an actual completion date??
    Attached Files Attached Files

  16. #16
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    The system didn't pull the data list through right so I have corrected those with a completion date stating open - doh!

    Following the formula <"&EDATE(TODAY(),-1)) looks like it works so thank you very much for that sir

    Learning loads today, I'm well happy

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,137

    Re: Formula counting from 2 columns, countif function

    The system didn't work!! LoL. Does the system... any system work anywhere???

  18. #18
    Forum Contributor
    Join Date
    09-19-2018
    Location
    England
    MS-Off Ver
    O365
    Posts
    266

    Re: Formula counting from 2 columns, countif function

    the system had default to open and the user didn't change it to completed when updating - tut, tut haha

    I made a change to system haha

    Scared the system might turn into Skynet lol

+ 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] Countif not counting multiple columns accurately.
    By kreiner2006 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-16-2019, 09:56 AM
  2. [SOLVED] COUNTIF Counting for Only One Occurrence in Two Columns
    By quibilty in forum Excel General
    Replies: 8
    Last Post: 11-16-2018, 08:24 AM
  3. Replies: 2
    Last Post: 04-18-2013, 02:03 PM
  4. Replies: 7
    Last Post: 12-16-2012, 08:24 PM
  5. [SOLVED] Countif function not counting text
    By Liz23 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-12-2012, 01:12 AM
  6. [SOLVED] COUNTIF function not counting dates on 31st
    By mattmorris in forum Excel General
    Replies: 2
    Last Post: 07-03-2012, 10:37 AM
  7. countif function not counting :(
    By fsutaylor31 in forum Excel General
    Replies: 7
    Last Post: 01-06-2009, 04:39 PM

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