+ Reply to Thread
Results 1 to 6 of 6

COUNTIFS Function for Multiple Data in the Same Cell

  1. #1
    Forum Contributor
    Join Date
    07-31-2018
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    104

    COUNTIFS Function for Multiple Data in the Same Cell

    Afternoon all, it's nice to have joined this community. I begin with a problem:

    Screen Shot 2018-07-31 at 13.42.25.png

    So I am programming an interactive database for the company I am interning at for data collection on people/demographics etc.

    I have added a selection list data validation in a few columns for data input, as you can see above, and I added a VBA macro to allow multiple selections from the list specifically for impairments (disabilities) which are separated by commas. However, I am using the 'COUNTIFS' function to report the data by number of people of that particular impairment to assess achievement rates, but obviously with multiple inputs the cell no longer "=Hearing" (for example), so the COUNTIFS function does not count them:

    Screen Shot 2018-07-31 at 13.48.51.png

    My question: How do I adjust the formula such that it looks for cells containing the word "Hearing" (for example) in that range, rather than looking for cells that are equal to "Hearing"?

    Thanks in advance, will certainly have more questions to come.
    Last edited by doubleuson; 07-31-2018 at 09:17 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: COUNTIFS Function for Multiple Data in the Same Cell

    First of all, you don't need to put an = sign in the conditions, as this is assumed.

    You can use the wildcard character * before and after your condition to enable you to count if "Hearing" is contained anywhere within the cells, like this:

    =COUNTIF('Group_Details'!$R$4:$R$53,"*Hearing*")

    or if Hearing is in C5, you can use it this way in D5:

    =COUNTIF('Group_Details'!$R$4:$R$53,"*"&C5&"*")

    Copy up and down for the other criteria.

    Hope this helps.

    Pete

  3. #3
    Forum Contributor
    Join Date
    07-31-2018
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    104

    Re: COUNTIFS Function for Multiple Data in the Same Cell

    Exactly what I was looking for. Thanks, Pete

    /SOLVED

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: COUNTIFS Function for Multiple Data in the Same Cell

    Thanks for marking the thread as SOLVED - glad to be of help.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  5. #5
    Forum Contributor
    Join Date
    07-31-2018
    Location
    London, England
    MS-Off Ver
    MS Office 365
    Posts
    104

    Re: COUNTIFS Function for Multiple Data in the Same Cell

    Duly noted and reputation added. Will more than certainly need assistance going forward with more complex things like setting sheets as templates, and the OFFSET function.

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,732

    Re: COUNTIFS Function for Multiple Data in the Same Cell

    Thanks for that.

    I always try to avoid the OFFSET function, as it is volatile and can slow the workbook down. You can often use INDEX to achieve the same results.

    Anyway, feel free to post back when you have other problems to solve. It always helps if you attach a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post. Don't try to use the Paperclip icon (Attachments button), as it doesn't work on this forum.

    Hope this helps.

    Pete

+ 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. Help with countifs or sumproduct with multiple criteria function
    By thezwashere in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-18-2015, 11:26 PM
  2. Using COUNTIFS Function With Multiple Criteria
    By Kingswood in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-16-2015, 05:36 PM
  3. How to use countifs function for multiple criteria
    By Terressa in forum Excel General
    Replies: 1
    Last Post: 06-25-2015, 08:08 AM
  4. Using CountIfS function on multiple lines of data...
    By Buratti in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-07-2014, 03:09 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. Need help using multiple criteria in second argument of CountIfs function
    By bclucas55 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-27-2014, 11:16 AM
  7. [SOLVED] How do I exclude a value using COUNTIFS function for multiple columns
    By kyknifeman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-10-2014, 07:16 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