+ Reply to Thread
Results 1 to 8 of 8

formula to count the instances of a type of number in cells

  1. #1
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    formula to count the instances of a type of number in cells

    Hi Folks,
    I have a formula =COUNTIF(G835:I835, "<" & F835) + SUMPRODUCT(--IFERROR(SEARCH("_", G835:I835), 0)) but it does not do what I want it to do.
    Could someone look at the uploaded spreadsheet and offer a formula that works ?
    Thank you
    Doofus1


    Sorry , CORRECTION 1. Count the number of times the number in D2:F2 are below/lower than the number in C2
    2. If any of those numbers are either underlined or bold, it is to be counted twice.
    3. in D2:F2, numbers that are above the figure in C2 get a minus count of 1

    MINUS

    4 Count the number of times the number in D3:F3 are below/lower than the number in C2
    5. If any of those numbers are either underlined or bold, it is to be counted twice.
    6. in D3:F3, numbers that are above the figure in C2 get a minus count of 1


    This has to repeated for the number in C3 too

    Need help with writing a formula to achieve this
    Attached Files Attached Files
    Last edited by Doofus1; 11-23-2023 at 03:39 PM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,428

    Re: formula to count the instances of a type of number in cells

    A formula cannot check for underlining or bold: you will need VBA to do this.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: formula to count the instances of a type of number in cells

    Hi Mr Topley,
    Not very conversant with VBA.
    How and what do I do to achieve this?
    Thank you

  4. #4
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: formula to count the instances of a type of number in cells

    Or, can this be done if, for instance, if I typed the letter "W" next to the number eg 3W. ? Instead of using VBA - which I am not conversant with.

    If anyone knows how to write this, feel free to contribute

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,706

    Re: formula to count the instances of a type of number in cells

    This proposal employs three helper columns (G:I) populated using: =IF(ISTEXT(D2),LEFT(D2,LEN(D2)-1)+0,D2)
    The following formula yields the expected result in cell K2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    In cell K3 it yields 2 instead of -1.
    In cell J3 I don't understand how the minus three in (3-1)-3 is derived.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Forum Contributor
    Join Date
    06-04-2014
    Location
    Nevada, USA
    MS-Off Ver
    2010, 2013
    Posts
    342

    Re: formula to count the instances of a type of number in cells

    Hi JetMc,
    Sorry for the delay in responding.
    Thank you.!!
    This works too.
    Best regards
    Doofus.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,834

    Re: formula to count the instances of a type of number in cells

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,706

    Re: formula to count the instances of a type of number in cells

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. If Formula to count number of instances group of cells contain specific work
    By marcusjames in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-18-2019, 05:43 AM
  2. Count number of instances & apply formula
    By jonhat in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-09-2018, 03:49 PM
  3. Totalling number of instances for each type
    By scorchednickel in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-13-2015, 12:42 PM
  4. [SOLVED] Require a formula to progressively count the instances and allocate a number to each
    By john dalton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2014, 10:45 AM
  5. [SOLVED] Formula To Count Number Of Instances
    By mamuka12 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-03-2013, 12:45 AM
  6. [SOLVED] Count number of instances of a character in a column of cells
    By mforbes6186 in forum Excel General
    Replies: 3
    Last Post: 02-09-2013, 12:12 PM
  7. Count number of cells with blue type
    By shy07014 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-10-2009, 08:11 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