+ Reply to Thread
Results 1 to 23 of 23

Converting Countifs to 2003 formula

  1. #1
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37

    Converting Countifs to 2003 formula

    Hello,
    I am having trouble converting the following Countifs formula developed in 2007 to work in 2003 Excel.

    Basically, I want to count the frequency of "N" in 'Data_Q2 2008'!$S$2:$S$9806, where 'Data_Q2 2008'!$B$2:$B$9806 = 'Metric Upload'!C2.

    'Data_Q2 2008'!$B$2:$B$9806 is a list of physicians. 'Metric Upload'!C2 is a pick list for selecting the physican that is in the larger data set using Data Validation.


    Thank you!

    2007 Countifs Formula:

    =COUNTIFS('Data_Q2 2008'!$S$2:$S$9806,"N",'Data_Q2 2008'!$B$2:$B$9806,'Metric Upload'!C2)
    Last edited by rgold; 10-06-2008 at 03:37 PM.

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    re: Converting Countifs to 2003 formula

    =SUM(--('Data_Q2 2008'!$S$2:$S$9806="N")*('Data_Q2 2008'!$B$2:$B$9806='Metric Upload'!C2))
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

  4. #4
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    Thank you! Your formula worked. I have been working on that all night.

  5. #5
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    How would you develop the formula if you want to do multiple filters. Right now, there is only one filter for "N"? Thanks.

  6. #6
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Put the criteria between a set of {} s

    Please Login or Register  to view this content.
    would become

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    mdbct,
    Thank you! That worked. Ok, last related question. Your last post worked for multiple filters in the same column. What if you have multiple filters, say 3, and they are each in a separate column? Thank you for your prompt posting. Saving me a lot of time!

    Rob

  8. #8
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Just keep adding the criteria. The following will count the rpw matching your original criteria with the added criteria of the "ALL" being the data in column T and "NEW" being the data in column U

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    I tried this formula is no value is calculating. There is a blank as opposed to an error message. Below is what I did from your post

    =SUMPRODUCT(('Step 1_Data_Q2 2008'!T3:T10000="N")*('Step 1_Data_Q2 2008'!U3:U10000="*")*('Step 1_Data_Q2 2008'!C3:C10000='Metric Upload'!C2)*1)

    N=First filter
    *= is filtering for any value present
    The last statement is a lookup

  10. #10
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Change this
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    SUMPRODUCT doesn't play well with wildcards.

  11. #11
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    Successful!!! Thank you again! Great site!

  12. #12
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    For the future if I need to use a wildcard, what is the correct character to use? Thanks

  13. #13
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    I should have said that SUMPRODUCT doesn't play with wild cards at all.

    There are a couple methods you could use to check the text is portions of a cell.

    For cells starting with specific characters you can use the left function (Left, Mid and Right functions will all work). The following checks for cells that start with the letter A:
    Please Login or Register  to view this content.
    If you want to find specific text within the cells you have to use either a Find (case sensitive) or Search (not case sensitive) on the column. The following looks for the letter "a" or "A" within the cells.
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    I am having trouble with the syntax with that formula. How would I change the following to incorporate it for searching for "Picu":

    =SUMPRODUCT(('Step 1_Data_Q2 2008'!T2:T10000="N")*('Step 1_Data_Q2 2008'!C2:C10000='Metric Upload'!C2)*1)*('Step 1_Data_Q2 2008'!U2:U10000="Picu*")*1))

  15. #15
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    Try this one:
    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    Thank you! It worked. Still building my formula skills.

  17. #17
    Registered User
    Join Date
    10-24-2008
    Location
    Chicago
    Posts
    2

    Help with 2007 to 2003

    Okay, perhaps I'm just missing something here. It seems quite simple to convert the COUNTIFS function to a 2003 equivalent but I'm missing it.

    I have a worksheet with several thousand rows of data and need to get a count of one column ("C") with dates that fall between a certain range.

    I got the following example to work in 2007 but am not sure how to convert it for 2003:

    =COUNTIFS(C:C,">=9/1/2008",C:C,"<=10/17/2008")

    Any help would be greatly appreciated.

  18. #18
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848
    One way:
    Please Login or Register  to view this content.

  19. #19
    Registered User
    Join Date
    10-24-2008
    Location
    Chicago
    Posts
    2

    Perfect!!

    Thank you so much for your quick reply. That worked exactly as expected!!!

  20. #20
    Registered User
    Join Date
    07-21-2011
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Converting Countifs to 2003 formula

    I am trying to convert this to 2003 in a hurry. My 4th up manager doubts I can get this done.... at all! Any help will help. Thank you.

    =_xlfn.COUNTIFS(DATA!$BS$5:$BS$1000,TRUE,DATA!$D$5:$D$1000,'summary NEW'!E$8,DATA!$C$5:$C$1000,1)

  21. #21
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Converting Countifs to 2003 formula

    You should really have started a new thread. Threads marked as solved are often ignored.

    Try this:
    Please Login or Register  to view this content.

  22. #22
    Registered User
    Join Date
    07-21-2011
    Location
    Illinois, USA
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Converting Countifs to 2003 formula

    This did not work. It is giving me a 1 as a result.

    This is the information I am trying to count:

    DATA!$BS$5:$BS$1000 is either "TRUE" or "FALSE"
    DATA!$D$5:$D$1000 is a year (2007)
    DATA!$C$5:$C$1000 is either a "1" or "0"

  23. #23
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Converting Countifs to 2003 formula

    Actually it is working. If it were not working, the formula result would either be an error or 0 (zero). It is finding one occasion where a row has a TRUE (the Boolean, not the text "TRUE") value in the BS column, a value in the D column that matches the value in E8 on the "summary New" tab and a 1 (the number, not a text "1") in the C column.

    I've attached a sample sheet. To eliminate scrolling, I changed the BS column to the B column and linked the value on the summary New tab to cell B2 on the Data tab.
    Attached Files Attached Files

+ 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. A formula template
    By ajaysehgal in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-07-2013, 06:12 AM
  2. Replies: 4
    Last Post: 05-16-2008, 02:27 AM
  3. Looking for a macro that copies a formula from column to column as I change the month
    By caliskier in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-18-2007, 03:32 PM
  4. How do I subsitute part of a formula linked to another workbook?
    By Scej12 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-03-2007, 10:10 AM
  5. Excel Formula Help (Excel 2003)
    By boka in forum Excel General
    Replies: 1
    Last Post: 10-13-2006, 02:11 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