+ Reply to Thread
Results 1 to 7 of 7

Case Sensitive Countif?

Hybrid View

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

    Case Sensitive Countif?

    Hi everyone,
    I have the following formula that I'm using to add an underscore and number to a column of IDs-some of these ids are only differentiated by having a capital letter on the end or a small letter, which means they are different, even if the letter itself if the same:
    Example:
    abedA
    abeda

    =B2&"_"&COUNTIF($B$2:B2,B2)

    Is there a way to make countif case sensitive so it knows that the Ids with a capital letters are different than ids with small letters?

    Thank you!

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Case Sensitive Countif?

    Hi,

    Perhaps:

    =B2&"_"&SUMPRODUCT(--EXACT($B$2:B2,B2))

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Case Sensitive Countif?

    Try this...

    =B2&"_"&SUMPRODUCT(--EXACT(B$2:B2,B2))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  4. #4
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Case Sensitive Countif?

    Hi,



    -----

    edit : same answer, sorry I did not mean to overlap!

    Stefano

    ---------
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  5. #5
    Forum Contributor vamosj's Avatar
    Join Date
    04-23-2004
    Location
    Oregon
    MS-Off Ver
    2010
    Posts
    294

    Re: Case Sensitive Countif?

    Use the EXACT Function to check exact strings.


    =B2&"_"&COUNTIF($B$2:B2,EXACT(B2,UPPER(B2)))
    Janos S. Vamos
    Data Systems Technician/Fire Controlman PO1(SW/AW)
    US Navy Retired


    Remember, Record Macro can be your friend for figuring out solutions.

    Good or Bad, let me know how I did by clicking on the "Add Reputation" * just to the lower left of here. it only takes a few seconds to let someone know.

  6. #6
    Registered User
    Join Date
    12-23-2013
    Location
    Chicago
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Case Sensitive Countif?

    Thanks Canapone- that worked! What does the double dash represent?

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Case Sensitive Countif?

    Quote Originally Posted by jessbr View Post
    What does the double dash represent?
    See this:

    http://xldynamic.com/source/xld.SUMPRODUCT.html

+ 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. Making COUNTIF Function Case-Sensitive for any string
    By p4carr in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2013, 05:22 PM
  2. how to make countif case sensitive
    By vsbhogar in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-19-2012, 02:02 PM
  3. [SOLVED] SUMPRODUCT Or SUMIF - In case of Case sensitive???
    By lifeisaspreadsheet in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-28-2012, 07:57 AM
  4. Modify COUNTIF to make it case sensitive
    By singhabhijitkumar in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-08-2010, 06:26 AM
  5. Case Sensitive
    By hemants in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-09-2005, 04:20 AM

Tags for this Thread

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