+ Reply to Thread
Results 1 to 7 of 7

Checking if 20 consecutive numbers in a raw are below a given value

Hybrid View

  1. #1
    Registered User
    Join Date
    06-18-2015
    Location
    Israel
    MS-Off Ver
    2010
    Posts
    2

    Checking if 20 consecutive numbers in a raw are below a given value

    Hi all Excelperts!!!

    i have the need to progressly check if X (currently 60) consecutive numbers in a specific raw are below given value.
    i am currently using the following formula which is very laborious. i'm entering it into the cell to the right and dragging all the way.

    =AND(K66<375,K65<375,K64<375,K63<375,K62<375,K61<375,K60<375,K59<375,K58<375,K57<375,K56<375,K55<375,K54<375,K53<375,K52<375,K51<375,K50<375,K49<375,K48<375,K47<375,K46<375,K45<375,K44<375,K43<375,K42<375,K41<375,K40<375,K39<375,K38<375,K37<375,K36<375,K35<375,K34<375,K33<375,K32<375,K31<375,K30<375,K29<375,K28<375,K27<375,K26<375,K25<375,K24<375,K23<375,K22<375,K21<375,K20<375,K19<375,K18<375,K17<375,K16<375,K15<375,K14<375,K13<375,K12<375,K11<375,K10<375,K9<375,K8<375,K7<375)

    i will appreciate your help in developing a formula (or other) to be able and do this differently and also in a way that i will be able to control the how many numbers back in the raw to test

    thank yo in advanced
    Haim

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

    Re: Checking if 20 consecutive numbers in a raw are below a given value

    =max(K7:k66)<375

    will produce TRUE or FALSE as appropriate
    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

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Checking if 20 consecutive numbers in a raw are below a given value

    With
    A1: the number of consecutive values to check.....60
    A2: the threshhold.....................................375

    This formula returns TRUE if that number of consecutive values, beginning with cell K7, is less than the A2 value (375)
    =MAX((K7:INDEX(K:K,ROW(K7)+A1-1)))<A2
    If you change A1 the referenced range will change

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Checking if 20 consecutive numbers in a raw are below a given value

    Assuming that you are checking the previous 60 entries and the entries start in K2, enter this in K62 and fill down. TRUE will be returned if all the previous 60 entries are less than 375.

    Formula: copy to clipboard
    =IF(COUNTIF(K3:K62,"<375")=60,"True","")


    or simply:
    Formula: copy to clipboard
    =MAX(K2:K61)<375
    Last edited by newdoverman; 06-18-2015 at 11:23 AM.
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Checking if 20 consecutive numbers in a raw are below a given value

    Here is yet another way. This is easily customizable with the rows value in P1 and the Threshold in P2. If P1 is negative, the rows before are counted (blank if insufficient rows), positive is for rows after.

    Formula: copy to clipboard
    =IF(AND($P$1<0,ROW()-1<$P$1*-1),"",MAX(OFFSET(K2,0,0,$P$1))<$P$2)

  6. #6
    Registered User
    Join Date
    06-18-2015
    Location
    Israel
    MS-Off Ver
    2010
    Posts
    2

    Re: Checking if 20 consecutive numbers in a raw are below a given value

    Hi All;

    thank you for your help as it all does the exact trick i need
    i have learned new things as well on the way based on your help - which is even much better

    Thank you!!

  7. #7
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Checking if 20 consecutive numbers in a raw are below a given value

    If that takes care of your original question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

    You may also say thanks to those who have put their time and efforts to help you in this forum by clicking the Add Reputation link under their posts, another way to say thanks.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. Checking Cell Data and Consecutive Increasing Row Values
    By ceres in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-25-2015, 03:17 AM
  2. Finding 5 consecutive numbers in a set of 7 numbers
    By Namejs in forum Excel General
    Replies: 13
    Last Post: 05-20-2015, 06:35 AM
  3. Replies: 6
    Last Post: 03-23-2012, 06:03 PM
  4. checking for consecutive values
    By normality in forum Excel General
    Replies: 14
    Last Post: 08-30-2011, 10:05 AM
  5. Excel macro to "fill in" consecutive numbers in non-consecutive list?
    By Tomkat in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-03-2009, 01:13 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