+ Reply to Thread
Results 1 to 7 of 7

Count IF To sort/classify

  1. #1
    Registered User
    Join Date
    01-15-2014
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    11

    Count IF To sort/classify

    Hi,

    At the beginning, I would like to thank you for your help.

    However, I need your help with choosing the right function.

    The Data that I have is Grades:

    Gade 1/Class A

    Grade 2/Class B

    Grade 3

    Grade 4

    Grade 5

    Grade 6

    Grade 7

    Grade 8

    Grade 9

    Grade 10

    Grade 11

    Grade 12

    Grade 12

    Grade 13

    Grade 14

    Grade 15

    Manager

    Supervisor

    Engineer

    Judge

    Laywer

    Etc..
    I wanted to use if function, but I couldn't as there's a limit on the characters that can be used in "IF Function", but unfortunately, I can't because I exceeded the limit, as I have too many grades to include in "Logical_Test",

    What I am looking for if one of this data was found write 45 Days, if other grades that is not listed was found write 30 Days.

    Thank you.
    Last edited by Lyaliuae; 01-20-2014 at 05:54 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Choosing the right function

    If you make a list of the roles in a column somewhere, maybe on another sheet, you could use COUNTIF to check if the role is present. For example:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    01-14-2014
    Location
    Baku
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Choosing the right function

    You can use countif function:If value exists in this range,cell is equal to 30 days,if not 45 days.So if you range is in A1:A21,and your values are in B column,you write this formula in C1 and fill:
    =IF(COUNTIF(A1:A21;B1)>0;"30 days";"45 days")

  4. #4
    Registered User
    Join Date
    01-15-2014
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Choosing the right function

    Quote Originally Posted by TMShucks View Post
    If you make a list of the roles in a column somewhere, maybe on another sheet, you could use COUNTIF to check if the role is present. For example:

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Regards, TMS
    Thanks TMS for the reply, but can you attach a sample so that I have an example?

  5. #5
    Registered User
    Join Date
    01-15-2014
    Location
    UAE
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Choosing the right function

    Quote Originally Posted by Vuqar View Post
    You can use countif function:If value exists in this range,cell is equal to 30 days,if not 45 days.So if you range is in A1:A21,and your values are in B column,you write this formula in C1 and fill:
    =IF(COUNTIF(A1:A21;B1)>0;"30 days";"45 days")
    Hi,

    Thank you for you help.

    I've created a sample. Can you please take a look at it, and tell me the formula for this sample?

    COUNTIF.xlsx
    Last edited by Lyaliuae; 01-20-2014 at 05:59 AM.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Count IF To sort/classify

    The example you have given is not the same as the scenario you originally described. In the OP, you said
    What I am looking for if one of this data was found write 45 Days, if other grades that is not listed was found write 30 Days.
    .

    That requires a VLOOKUP:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    This looks for the Grade in the table and, if it finds it, returns the number of days. If it is not found in the table, the IFERROR function will return "30 days".


    Regards, TMS

  7. #7
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Count IF To sort/classify

    You're welcome. Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Optimal Seal Choosing Function
    By danderson2692 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2013, 03:16 PM
  2. Replies: 0
    Last Post: 07-24-2013, 01:36 AM
  3. Choosing Name Range inside Index / Match Function
    By gallow in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2012, 07:08 AM
  4. Choosing cell's index by function
    By bgaboveall in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-30-2011, 04:49 PM
  5. Choosing the date with IF function having other functions included
    By george1982 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-27-2009, 08:47 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