+ Reply to Thread
Results 1 to 3 of 3

Max frequency with positive numbers

  1. #1
    Registered User
    Join Date
    09-30-2020
    Location
    Bath, England
    MS-Off Ver
    Excel 2016
    Posts
    17

    Max frequency with positive numbers

    I have a row of numbers as follows:
    1 2 3 0 1 1 0 1 1 2 0 2 2 2 2 2 2 2 2 1 1 1 1 1 1

    I have worked out the formula to identify the longest run of 0s: =MAX(FREQUENCY(IF(I2:AH2=0,COLUMN(I2:AH2)),IF(I2:AH2<>0,COLUMN(I2:AH2))))

    I am trying to work out how I can use a similar formula to show the longest consecutive run of numbers which are 1 or above. In this case it should be 14. I'm sure it's just a simple amendment to the above but I've tried several ways to show greater than 1 but it doesn't seem to work!

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,943

    Re: Max frequency with positive numbers

    You are correct - a simple adjustment:

    =MAX(FREQUENCY(IF(I2:AH2>=1,COLUMN(I2:AH2)),IF(I2:AH2<1,COLUMN(I2:AH2))))
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    09-30-2020
    Location
    Bath, England
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: Max frequency with positive numbers

    Must have been about the only combination I didn't try! Huge thanks.

+ 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] time series return positive and negative numbers and numbers following
    By thedrinkerparadox in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-13-2020, 02:23 PM
  2. Replies: 3
    Last Post: 01-21-2016, 02:23 PM
  3. [SOLVED] Negative Numbers in Red Brackets, Positive Numbers in Accounting Format
    By STUARTXL in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-24-2015, 08:29 AM
  4. Convert negative to positive in sheet containing both positive/negative numbers
    By sa02000 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-29-2010, 07:52 PM
  5. adding positive and negative numbers all as positive
    By tomvh444 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-18-2009, 04:08 PM
  6. [SOLVED] change 2000 cells (negative numbers) into positive numbers
    By lisbern in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-16-2006, 01:00 PM
  7. [SOLVED] convert negative numbers to positive numbers and vice versa
    By bill gras in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-06-2005, 09:45 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