+ Reply to Thread
Results 1 to 2 of 2

How to Count Contiguous Cells if Data equals certain values

  1. #1
    Registered User
    Join Date
    12-22-2012
    Location
    Melbourne, Australia
    MS-Off Ver
    excel 2010
    Posts
    3

    How to Count Contiguous Cells if Data equals certain values

    Hi


    I have some data like the following:

    2 3 4 8 4 1 3 3 1 8 1 3 5 8 1 2 5 6 1 7 9 3 3

    I would like to be able to count the number of times 1 follows 8 for example. For the data above the answer is 2.

    If possible I would like a formula that will give me the answer.

    I would appreciate some help. thanks.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: How to Count Contiguous Cells if Data equals certain values

    In A1 Cell


    2 3 4 8 4 1 3 3 1 8 1 3 5 8 1 2 5 6 1 7 9 3 3


    In B1 Cell


    =LEN(A1)-LEN(SUBSTITUTE(A1,"1 8", " "))


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

+ 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. Count max contiguous blank cells
    By bebo021999 in forum Excel General
    Replies: 3
    Last Post: 12-24-2011, 12:44 PM
  2. How to count a contiguous range of cells and sum them exactly
    By Ace of Clubs in forum Excel General
    Replies: 1
    Last Post: 07-19-2009, 10:34 PM
  3. count contiguous cells that are identical?
    By dlh in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2008, 04:37 PM
  4. How do I count non-contiguous cells?
    By broush in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-30-2006, 06:20 PM
  5. Count non-contiguous cells where value is greater than 0
    By anre5180 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-22-2006, 09:12 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