+ Reply to Thread
Results 1 to 4 of 4

Need a formula to get the frequency of consecutive Mode values

  1. #1
    Registered User
    Join Date
    10-09-2018
    Location
    Florida
    MS-Off Ver
    2013
    Posts
    2

    Unhappy Need a formula to get the frequency of consecutive Mode values

    Hi guys,

    This my first post here and I am in desperate need of help.

    I need a formula to look up a range and count (frequency) the most frequent value (mode) that are consecutive. Below is an example of the values:

    5,0,5,0,10,0,5,10,0,0,0,5,12,5. The formula should give me 1 because the mode is 5 and none of them are occurring consecutively.

    I have come this far so far:
    =MAX(FREQUENCY(IF(B1:AZ1=IFNA(MODE(B1:AZ1),0),COLUMN(B1:AZ1)),IF(B1:AZ1=0,COLUMN(B1:AZ1))))

    This array formula gives me 2 because of the last 5,12,5 that is occurring consecutively but the middle value is not a mode value, so it should not count this as consecutive. It should count as consecutive only when the mode value is side by side. If there are 2 of them side by side, it should return 2, and if there are 3 side by side, it should return 3, and so on.

    The highlighted column is where the formula is. Also, I am certain there is a better way of doing this but this is all I could find right now.

    Sample of the data attached (I hope I did it correctly).

    Thank you guys so much!!
    Attached Files Attached Files

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Need a formula to get the frequency of consecutive Mode values

    Hello nmansoorn. Welcome to the forum.

    Try array entering this formula.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  3. #3
    Registered User
    Join Date
    10-09-2018
    Location
    Florida
    MS-Off Ver
    2013
    Posts
    2

    Re: Need a formula to get the frequency of consecutive Mode values

    Sorry for the delayed response. This works like a charm! Thank you so much!!!!!!!!

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,407

    Re: Need a formula to get the frequency of consecutive Mode values

    You are welcome.
    Thank you for the feedback and added rep.

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

+ 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. Mode or Frequency formula help
    By Pritirus in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-24-2018, 10:49 AM
  2. How to do MODE/FREQUENCY with text strings
    By Inds in forum Excel Formulas & Functions
    Replies: 32
    Last Post: 11-09-2016, 04:17 PM
  3. Finding/counting consecutive # of values in a row - frequency function?
    By Elijah in forum Excel Formulas & Functions
    Replies: 26
    Last Post: 10-27-2016, 05:38 PM
  4. Replies: 3
    Last Post: 01-21-2016, 02:23 PM
  5. Mode (Most Frequency) in Ranges
    By dluhut in forum Excel General
    Replies: 6
    Last Post: 04-13-2012, 03:29 PM
  6. Simple Frequency Distribution Mode
    By michaelneedshelp in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-22-2009, 11:22 AM
  7. Mode or frequency
    By Laffin in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-21-2006, 12:55 PM

Tags for this Thread

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