+ Reply to Thread
Results 1 to 9 of 9

Using Wildcards in CountIf

  1. #1
    Registered User
    Join Date
    01-16-2017
    Location
    Cape Town, South Africa
    MS-Off Ver
    2016
    Posts
    51

    Using Wildcards in CountIf

    Hi All

    I have recently started using CountIf and was wondering how I could use the wildcard characters to find the number of people who's surname whose 3rd letter begins with a "n". I have been able to do this with the first name (as the first name is where the text starts from i.e. the left of the cell) but am finding it increasingly difficult to do this with the second names only.

    Please see attachment (yellow highlighted cell I3) and see if you can help out if possible!

    Thanks in advance for any suggestions.
    Attached Files Attached Files
    Last edited by SilverBullet17; 01-16-2017 at 03:08 AM.

  2. #2
    Registered User
    Join Date
    01-16-2017
    Location
    Cape Town, South Africa
    MS-Off Ver
    2016
    Posts
    51

    CountIf Wildcard Help!

    Hi All

    I have recently started using CountIf and was wondering how I could use the wildcard characters to find the number of people whose surname has a 3rd letter which begins with a "n". I have been able to do this with the first name (as the first name is where the text starts from i.e. the left of the cell) but am finding it increasingly difficult to do this with the second names only.

    Please see attachment (yellow highlighted cell I3) and see if you can help out if possible!

    Thanks in advance for any suggestions.
    Attached Files Attached Files
    Last edited by SilverBullet17; 01-16-2017 at 03:06 AM.

  3. #3
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,904

    Re: Using Wildcards in CountIf

    please attach a sample excel file with desired result
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  4. #4
    Registered User
    Join Date
    01-16-2017
    Location
    Cape Town, South Africa
    MS-Off Ver
    2016
    Posts
    51

    Re: Using Wildcards in CountIf

    Apologies Siva (new to the forum so still learning) - it should have the attachment now?

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,904

    Re: Using Wildcards in CountIf

    Please Login or Register  to view this content.
    =COUNTIF(A3:A1001,"??n*")
    try this

  6. #6
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,215

    Re: CountIf Wildcard Help!

    Try in "I3"
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: CountIf Wildcard Help!

    Seems this was a forum-induced duplicate thread. I would combine it with the other 1 (they both have answers)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  8. #8
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Using Wildcards in CountIf

    For the surname I would suggest a helper column where you have a formula like this
    Please Login or Register  to view this content.
    as this will add 1 in the helper column if the 3de letter in the surname is "n" and then you sum the helper column or you just split the names i.e. surname in helper column and use the "COUNTIF" function.

    Alf

  9. #9
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,892

    Re: Using Wildcards in CountIf

    Surname with 3rd Letter = "n" using CountIf Formula
    Try this...

    =COUNTIF(A3:A1001,"* ??n*")

+ 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. Ignoring Wildcards in Countif
    By hullmo in forum Excel General
    Replies: 5
    Last Post: 05-11-2021, 02:41 AM
  2. CountIF and Wildcards
    By Justmegan93 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2014, 09:05 AM
  3. [SOLVED] Writing out a list of wildcards in a formula? involves COUNTIF
    By jasonbwt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-26-2012, 09:42 AM
  4. [SOLVED] COUNTIF Using Wildcards
    By JoeJaycee in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-24-2012, 02:52 PM
  5. Countif with wildcards
    By seanjoe in forum Excel General
    Replies: 4
    Last Post: 06-02-2010, 09:04 AM
  6. is it possible to use countif with a cell ref and wildcards?
    By videot96 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-25-2009, 05:10 PM
  7. countif wildcards?
    By Ltat42a in forum Excel General
    Replies: 3
    Last Post: 12-18-2005, 12:59 PM

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