+ Reply to Thread
Results 1 to 9 of 9

COUNTIF Problem

Hybrid View

  1. #1
    Registered User
    Join Date
    06-18-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    19

    COUNTIF Problem

    Hi Everyone,

    Could you let me know how to rework this formula to better serve me ...

    I am currently using this:
    =LOOKUP(COUNTIF(J5:FU5,"Completed"),{0,19,48,71,85,95,101,111,130,150,168},{"Starting Grade (£6.31)","Grade 1 (£6.45)","Grade 2 (£6.55)","Grade 3 (£6.75)","Grade 4.1 (£6.95)","Grade 4.2 (£7.25)","Grade 4.3 (£7.45)","Grade 4.4 (£7.55)","Grade 5 (£7.95)","Grade 6 (£8.45)","Grade 7 (£8.95)"})

    So if 0-18 occurrences of "Completed" are found within the range then "Starting Grade (£6.31)" is displayed in the cell. If 19-47 occurrences are found then "Grade 1 (£6.45)" is displayed and so on.

    I want to update this and change the "Completed" to a choice of multiple words (i.e. January, February, March, April ... December) so if any of these words are found they count as 1 value. So any month would count the same as one "Completed" in the old formula.

    Is this possible?

  2. #2
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: COUNTIF Problem

    Hello
    Everything in your formula appears to be Hard-Coded, which makes change difficult. You need to use lookup tables and cell references to make it truly dynamic.

    DBY

  3. #3
    Forum Contributor jayajaya_4's Avatar
    Join Date
    05-09-2015
    Location
    India
    MS-Off Ver
    2007
    Posts
    259

    Re: COUNTIF Problem

    try replacing if(or(J5:FU5={"january","february","march","April","may","june","july","august","september","october",november","December"}

    I m not sure as I don't have the file...see if this helps u...

  4. #4
    Registered User
    Join Date
    06-18-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    19

    Re: COUNTIF Problem

    Example File.xlsx

    I have attached an example file. Now the drop down box gives the option that I want as opposed to the original "Completed". If someone could think of a way to help that would be great.

    Thanks so much,

    Ewan

  5. #5
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: COUNTIF Problem

    Hello Ewan
    I'll have a look at your file shortly but I have to leave the computer for an hour or so. Perhaps in the meantime someone else will assist.

    DBY

  6. #6
    Registered User
    Join Date
    06-18-2014
    Location
    Scotland
    MS-Off Ver
    2010
    Posts
    19

    Re: COUNTIF Problem

    Thanks so much DBY I really appreciate it!

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: COUNTIF Problem

    Try changing this part
    COUNTIF(J5:FU5,"Completed")

    to
    SUMPRODUCT(COUNTIF(J5:FU5,TEXT(DATE(1,ROW($1:$12),1),"mmmm")))

  8. #8
    Forum Expert
    Join Date
    09-20-2011
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    2,278

    Re: COUNTIF Problem

    As I mentioned initially, I was thinking of Lookup Tables for your grades and criteria lists, as these can easily be changed or amended with new values. Take a look at the attached amended version of your file. Are these the values you're trying to return?

    DBY
    Attached Files Attached Files

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

    Re: COUNTIF Problem

    Laingy24... if you're still out there, it'd be good if you checked out the responses to your double post on this site which two more of us have been looking at!!

    http://www.excelforum.com/showthread...72#post4086172

    For future reference please remember that double posting on this site breaks forum rules. In addition, posting on other sites as well, without referenceing the external post, also breaks forum riules. Since there are now two fairly extensive streams of posts addressing the same Q, it's probably pointless trying to merge the parallel threads.
    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

+ 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. Countif problem
    By Danicuts in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-01-2013, 10:43 AM
  2. Countif problem
    By Werner87 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-11-2012, 09:21 PM
  3. Countif Problem
    By windme in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2008, 05:13 PM
  4. =COUNTIF Problem
    By Mike in forum Excel General
    Replies: 4
    Last Post: 04-26-2005, 06:06 PM
  5. countif problem
    By WYN in forum Excel General
    Replies: 4
    Last Post: 04-25-2005, 12:06 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