+ Reply to Thread
Results 1 to 3 of 3

Counting Cells Containing Part of a Text, that matches critera in another column

  1. #1
    Registered User
    Join Date
    07-14-2011
    Location
    plymouth
    MS-Off Ver
    Excel 2003
    Posts
    26

    Counting Cells Containing Part of a Text, that matches critera in another column

    Hi
    Iam trying to find a formula that will search the beginning part of a cell, for a certain piece of text, and then counting the result if criteria in another column is true.

    I have used the sumproduct formula before, but this only works if the cells specifically contain the text that is searched for.

    =SUMPRODUCT(($B$2:$B$72="N/R")*($C$2:$C$72=1))

    the data that I have has the "N/R" at the beginning of each cell eg Cell B8 = N/R BLACK DRAWING PAD or some of the text looks like this eg Cell B12 = (N/R)POSTER PAINT NEON

    so what I want the formula to do, is search column B for any cells that have N/R or (N/R) at the beginning. then count if it matches certain data in column C

    any help will be much appreciated
    Last edited by COLIN_303; 07-15-2011 at 04:04 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Counting Cells Containing Part of a Text, that matches critera in another column

    Use LEFT:

    =SUMPRODUCT((LEFT($B$2:$B$72,2)="N/R")*($C$2:$C$72=1))

    or Search

    =SUMPRODUCT((ISNUMBER(SEARCH("N/R",$B$2:$B$72)))*($C$2:$C$72=1))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    07-14-2011
    Location
    plymouth
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: Counting Cells Containing Part of a Text, that matches critera in another column

    Great!! thank you very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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