+ Reply to Thread
Results 1 to 7 of 7

SUBSTITUTE as function for criteria within COUNTIFS

  1. #1
    Registered User
    Join Date
    07-06-2015
    Location
    Central, Oregon
    MS-Off Ver
    2013
    Posts
    56

    SUBSTITUTE as function for criteria within COUNTIFS

    Hi all,

    I am having difficulty getting the following to work. =COUNTIFS($C4:$C24,(=SUBSTITUTE(D34,"","")),D4:D24,1) I have a string in a D34 which is ELECTRICIAN APPRENTICE. This is the match I want to return in the group $C4:$C24 but it won't work or if I get it to work it returns the wrong number. I thought if I could use SUBSTITUTE it would work but I can't seem to get it to work in the critera portion of the COUNTIFS function. I would appreciate any one that could help me. I have attached a copy of the worksheet

    Thanks in advance!

    Attached Files Attached Files

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

    Re: SUBSTITUTE as function for criteria within COUNTIFS

    I downloaded your file but I can't figure out what you're trying to do.

    Please explain in words what you want to do.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUBSTITUTE as function for criteria within COUNTIFS

    Clean up the trailing spaces in column C. Then try this in D34.



    =COUNTIFS($B4:$B24,C34,D4:D24,1)
    Dave

  4. #4
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Office 365
    Posts
    3,937

    Re: SUBSTITUTE as function for criteria within COUNTIFS

    HTML Code: 
    you can use this formula in D34.

  5. #5
    Registered User
    Join Date
    07-06-2015
    Location
    Central, Oregon
    MS-Off Ver
    2013
    Posts
    56

    Re: SUBSTITUTE as function for criteria within COUNTIFS

    http://www.excelforum.com/members/763499.html
    http://www.excelforum.com/members/698868.html


    Thank you both Shukla and Dave. The trailing spaces was the killer. Since I have no control of the source data entry I think that the sumproduct and trim functions will be very helpful. I'll know more to look for that space problem in the future.

  6. #6
    Registered User
    Join Date
    07-06-2015
    Location
    Central, Oregon
    MS-Off Ver
    2013
    Posts
    56

    Re: SUBSTITUTE as function for criteria within COUNTIFS

    http://www.excelforum.com/members/763499.html
    http://www.excelforum.com/members/698868.html


    Thank you both Shukla and Dave. The trailing spaces was the killer. Since I have no control of the source data entry I think that the sumproduct and trim functions will be very helpful. I'll know more to look for that space problem in the future.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: SUBSTITUTE as function for criteria within COUNTIFS

    You are welcome. Glad you found a solution.

+ 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. How to use countifs function for multiple criteria
    By Terressa in forum Excel General
    Replies: 1
    Last Post: 06-25-2015, 08:08 AM
  2. In Case of many criteria Use COUNTIFS Function
    By IMA_Saihat in forum Tips and Tutorials
    Replies: 4
    Last Post: 04-06-2015, 11:48 PM
  3. In Case of many criteria Use COUNTIFS Function
    By IMA_Saihat in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-06-2015, 09:20 AM
  4. [SOLVED] Using The Countifs Function With Three Criteria
    By samerz in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-08-2014, 01:56 PM
  5. [SOLVED] COUNTIFS using multiple criteria - maybe an OR function?
    By Calder in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-28-2014, 12:10 PM
  6. Excel 2010 COUNTIFS Substitute
    By Snipeston in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-11-2013, 04:45 PM
  7. Criteria values in COUNTIFS function
    By jsnoz in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-21-2011, 12:46 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