+ Reply to Thread
Results 1 to 3 of 3

Count how many times number 1 is showing between hyphen

  1. #1
    Registered User
    Join Date
    11-25-2017
    Location
    New York
    MS-Off Ver
    2016
    Posts
    13

    Count how many times number 1 is showing between hyphen

    Hello,

    I have a list in column A containing a lot of number 1, hyphens and blank cells.

    In the column D there is a problem how to make formula that will count cells with number 1 between two hyphens (while ignoring blank cells).

    I attached xls document for better understanding (in Column D there are a few first results that I'm trying to reach for whole document)
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,062

    Re: Count how many times number 1 is showing between hyphen

    This seems to work

    in D2
    =IF(AND(A2=1,A3="-"),SUM(A$1:A2)-(SUM(D$1:D1)),"")
    and copy down the column
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: Count how many times number 1 is showing between hyphen

    Maybe I was overcomplicating it. I'd been trying to accommodate the situation where the last 1 was followed by n blank cells before the terminal -

    That may not have been necessary, in which case Special K's formula is spot on.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

+ 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] Count the number of times an A appears 5 or more times consecutively
    By CCook310 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-02-2013, 04:02 PM
  2. Replies: 5
    Last Post: 11-22-2010, 06:31 PM
  3. Count number of times a specific number is displayed in a cell ran
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 12:05 PM
  4. [SOLVED] Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  5. Count number of times a specific number is displayed in a cell ran
    By N Harkawat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  6. Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. [SOLVED] Count number of times a specific number is displayed in a cell ran
    By subs in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. Count number of times a specific number is displayed in cells
    By subs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-27-2005, 11:05 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