+ Reply to Thread
Results 1 to 4 of 4

Search a cell for "Company Name", and count if the adjacent cell says "open"

  1. #1
    Registered User
    Join Date
    08-21-2012
    Location
    New Zeland
    MS-Off Ver
    MS365
    Posts
    11

    Search a cell for "Company Name", and count if the adjacent cell says "open"

    Hello world,

    I work for a construction company, and I've got an excel file for tracking all outstanding items from our various workshops.

    In a row, I have a brief description of the item in the first column, then the companies responsible for providing an answer in the second column, then "open" or "closed" in the third column. I want to count how many "open" items each company has at any one time. The challenge is that the cell containing the company names can contain many company names, not just one.

    To count the number of times a company is mentioned, I used a COUNTIF command which searched for the company name in the cell, but I then need to add the option that it only counts it if the cell next to it says "open". I tried using SUMPRODUCT command, but that seems to only work if there's only one company in the cell - I can't seem to get it to work when it's looking for one company name in a cell that contains many.

    Can anyone please help me with this? I've attached the example file, and any help would be much appreciated!

    Thank you!
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Search a cell for "Company Name", and count if the adjacent cell says "open"

    Hi, welcome to the forum
    I don't know it it works but you could try the CountIfs again and the company name surrounded by a *

    Please Login or Register  to view this content.
    Hope it makes sense, just typing it directly no Excel at hand now
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Search a cell for "Company Name", and count if the adjacent cell says "open"

    Formula for F2 =SUMPRODUCT(--NOT(ISERROR(SEARCH("*"&C12&"*",$C$2:$C$9)))*(--($D$2:$D$9="Open")))

    or:

    =SUMPRODUCT(--NOT(ISERROR(SEARCH("*"&$C12&"*Open",$C$2:$C$9&$D$2:$D$9))))
    Last edited by mehmetcik; 03-10-2020 at 07:38 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Registered User
    Join Date
    08-21-2012
    Location
    New Zeland
    MS-Off Ver
    MS365
    Posts
    11

    Re: Search a cell for "Company Name", and count if the adjacent cell says "open"

    You, my friend, are a God amongst men.

    Thank you for helping me!

+ 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. [SOLVED] Identify specific numeric values in a cell such as "1" without counting "11" as two "1"s
    By MHanna39 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-03-2019, 01:35 PM
  2. Replies: 2
    Last Post: 07-13-2018, 11:52 PM
  3. [SOLVED] If cell contains "No", adjacent cells auto-populate "NA"
    By chaijing in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-05-2016, 04:41 AM
  4. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  5. [SOLVED] Cell Formula to count time with "Greater Than or Equal to" and "Less Than"
    By chriswhite1982 in forum Excel General
    Replies: 3
    Last Post: 06-16-2013, 12:30 AM
  6. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  7. Replies: 7
    Last Post: 05-13-2006, 05:02 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