+ Reply to Thread
Results 1 to 6 of 6

COUNTIF specific combination of figures and character

  1. #1
    Forum Contributor
    Join Date
    04-26-2017
    Location
    Brussels, Belgium
    MS-Off Ver
    2010
    Posts
    133

    Question COUNTIF specific combination of figures and character

    Hello,

    I have a range of cells on which I would like to perform a COUNTIF function.

    I have specific rows in my table where I list up product numbers.
    This is an example of the contents:
    cell A1: BTA 3512; BTA 1875; BTA H333
    cell B1: BTA 1873

    I would like to count the number of occurences of a BTA numer and also of a BTA H number.

    This would be the result I look for (in case the countif range is A1:B1):
    BTA: 3
    BTA H: 1

    Count anyone help me out?

    I attached a sample file in case it's not clear.

    Thank you for looking into this!

    Solvax
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Root_'s Avatar
    Join Date
    07-29-2017
    Location
    _
    MS-Off Ver
    2010+
    Posts
    485

    Re: COUNTIF specific combination of figures and character

    Try these:

    to count the number of "BTA H" =SUMPRODUCT(LEN(A1:B1)-LEN(SUBSTITUTE(A1:B1,"BTA H","")))/5
    to count the number of "BTA" =SUMPRODUCT(LEN(A1:B1)-LEN(SUBSTITUTE(A1:B1,"BTA","")))/3-SUMPRODUCT(LEN(A1:B1)-LEN(SUBSTITUTE(A1:B1,"BTA H","")))/5

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: COUNTIF specific combination of figures and character

    Slightly shoreter/simpler...
    BTA H =(LEN(A1)-LEN(SUBSTITUTE(A1,"BTA H","")))/5
    BTA =(LEN(A1)-LEN(SUBSTITUTE(A1,"BTA","")))/3
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,598

    Re: COUNTIF specific combination of figures and character

    Try this
    To count BTA
    Please Login or Register  to view this content.
    To count BTA H
    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  5. #5
    Forum Contributor
    Join Date
    04-26-2017
    Location
    Brussels, Belgium
    MS-Off Ver
    2010
    Posts
    133

    Re: COUNTIF specific combination of figures and character

    Thank you everyone, these solutions solved my problem!
    Much appreciated

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,944

    Re: COUNTIF specific combination of figures and character

    happy to help and thanks for the feedback

+ 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] Combination of count and countif
    By jonas-martens in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-06-2018, 05:31 AM
  2. Conversion of an array of figures inputted into cells as word figures to Excel figures
    By Allan Simpson730 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-08-2013, 07:25 AM
  3. Replies: 1
    Last Post: 03-30-2012, 08:17 AM
  4. Combination of CountIF, IF, and NOT
    By shani20 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-08-2011, 06:58 PM
  5. Complex Character Combination Validation Code Needed
    By swordswinger710 in forum Excel Programming / VBA / Macros
    Replies: 41
    Last Post: 12-22-2009, 10:08 PM
  6. Lookup and Countif combination
    By blackhawk in forum Excel General
    Replies: 6
    Last Post: 05-11-2009, 04:53 PM
  7. COUNTIF COMBINATION??
    By Heather in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-25-2005, 10: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