+ Reply to Thread
Results 1 to 5 of 5

Countif Contains including a cell reference

  1. #1
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Countif Contains including a cell reference

    Hi all

    I had some awesome help the other day to help me figure out some stuff with my sales report. Unfortunately I need some more help.

    I have a sheet that calculates what items are on any given transaction - this works well. I now want another table that counts how many times a certain brand comes up.

    For example one item on a transaction might be "TENSOR REG TRUCK BLK 5.0 x2"

    I need the table to look at this and count if tensor is in it (sheet name: 'Sheet 1') but I want it to look at the list of brands and and reference that brand rather than type it out individually.

    I hope this sort of makes sense. Sample would be clearer.

    Sample attached.

    Many thanks.
    For-Excel-Forum2.xlsm

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Countif Contains including a cell reference

    You're close. Just remove the quotes around the table reference.

    =COUNTIF(PRODUCTS!$B$6:$K$100,"*" & "[@BRAND]" & "*")

    should be

    =COUNTIF(PRODUCTS!$B$6:$K$100,"*" & [@BRAND] & "*")
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Countif Contains including a cell reference

    Maybe..

    =COUNTIF(PRODUCTS!$C:$C,"*"&[@BRAND]&"*")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Countif Contains including a cell reference

    Hi Ace, that's ace (pardon the pun)

    Many thanks.
    Ben

  5. #5
    Forum Contributor
    Join Date
    07-31-2012
    Location
    Derby, UK
    MS-Off Ver
    Excel 2013
    Posts
    138

    Re: Countif Contains including a cell reference

    Also, thanks daffodil11.

    Ben

+ 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] Including a calculated cell reference in another formula?
    By GWCTas in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-15-2012, 06:06 AM
  2. Countif Cell Reference
    By rbpd5015 in forum Excel General
    Replies: 1
    Last Post: 06-24-2010, 01:48 AM
  3. COUNTIF with Cell Reference
    By DB91 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-16-2008, 03:26 PM
  4. COUNTIF less than cell reference
    By stevepain in forum Excel General
    Replies: 3
    Last Post: 07-12-2005, 12:05 PM
  5. Countif with cell reference
    By Nick in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-06-2005, 12:06 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