Solved

Sequential occurances of less than value in excel

Posted on 2014-04-22
6
168 Views
Last Modified: 2014-04-22
I'm looking for a formula that will return the value of 4 in cell A2.  It answers the question:  What is the maximum number of times in sequence was the value of -10 exceeded in A4:A16?

ThanksExample.xlsx
0
Comment
Question by:ronadair
6 Comments
 
LVL 5

Expert Comment

by:dani gammon
ID: 40015832
Hi there,

My first response would be to create a countif formula such as: =COUNTIF(A4:A16,">-10")

However, where is your sequence within a4:a16 ? because that would add to the formula to get an answer of 4.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 40015871
=COUNTIF(A4:A16,">"&A1)

but for the given data the answer is 7
0
 
LVL 8

Expert Comment

by:itjockey
ID: 40015880
Try this but i don't know why your answer is 4 mine is 6
=FREQUENCY(A4:A16,A1)

Thanks
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 27

Accepted Solution

by:
MacroShadow earned 250 total points
ID: 40015900
Put this array formula (Press CTRL+SHIFT+ENTER) in A2:
=MAX(FREQUENCY(IF(A4:A16<=-10,ROW(A4:A16)),IF(A4:A16>-10,ROW(A4:A16))))

Open in new window

0
 

Author Closing Comment

by:ronadair
ID: 40016069
Worked like a charm!
0
 
LVL 8

Expert Comment

by:itjockey
ID: 40016786
Mr.MacroShadow,

will you pls explain the logic behind the  formula & why answer is 4?

Thanks You
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question