+ Reply to Thread
Results 1 to 5 of 5

Countif with Concatenate not working properly

  1. #1
    Registered User
    Join Date
    12-07-2018
    Location
    Belfast, Ireland
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Countif with Concatenate not working properly

    Hi folks,

    I am trying to use the following formula to count the number of "W" values in a range - simple example below.

    =COUNTIF('Raw Data'!C55:C57,"W")

    But i want to C57 part of the range to be dynamic, based on a header date.

    Basically i want to the range to be built like this - the MATCH formula below returns a row number; say 57.

    CONCATENATE("'Raw Data'!C55:", "C", MATCH(D5,'Raw Data'!$B:$B,0))

    So I am using the following formula to get it.

    =COUNTIF(CONCATENATE("'Raw Data'!C55:", "C", MATCH(D5,'Raw Data'!$B:$B,0)),"W")

    But i keep getting "We found a problem with this formula" error.

    For info the following formula succesffuly returns 'Raw Data'!C55:C57

    =CONCATENATE("'Raw Data'!C55:", "C", MATCH(F5,'Raw Data'!$B:$B,0))

    So it seems to be the connect with the Countif formula.

    Am i doing something wrong with the syntax?

    Thanks in advance.
    Last edited by mickland; 12-07-2018 at 10:57 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,681

    Re: Countif with Concatenate not working properly

    You need to use the INDIRECT function to convert the string which represents a range reference into an actual reference that Excel can make use of. Try it this way:

    =COUNTIF(INDIRECT("'Raw Data'!C55:C" & MATCH(D5,'Raw Data'!$B:$B,0)),"W")

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    12-07-2018
    Location
    Belfast, Ireland
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Re: Countif with Concatenate not working properly

    Pete - you are a wee star!

    Thanks!

  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,681

    Re: Countif with Concatenate not working properly

    You're welcome - glad to help.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark this thread as SOLVED.

    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
    Registered User
    Join Date
    12-07-2018
    Location
    Belfast, Ireland
    MS-Off Ver
    MS Office 2013
    Posts
    3

    Re: Countif with Concatenate not working properly

    Done - Cheers

+ 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. countif not working properly
    By Patcheen in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-18-2018, 06:44 PM
  2. CONCATENATE Is not working properly
    By HaroonSid in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-19-2017, 12:02 PM
  3. Concatenate does not work properly
    By NIdubhd in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-25-2014, 08:53 AM
  4. [SOLVED] use CONCATENATE properly, how to
    By johnandrews in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-30-2013, 12:08 PM
  5. How to properly use CountIf and vlookups.
    By dmejia174 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-28-2013, 07:37 PM
  6. [SOLVED] How to use CountIF and VlookUps properly.
    By dmejia174 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-26-2013, 07:29 AM
  7. Can not concatenate properly
    By cell-dweller in forum Excel General
    Replies: 3
    Last Post: 05-14-2012, 01:28 AM

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