Results 1 to 9 of 9

Offset function to count number of times in range, value is below Last Cell value

Threaded View

  1. #1
    Forum Contributor
    Join Date
    08-17-2013
    Location
    Asia
    MS-Off Ver
    Excel 2021
    Posts
    271

    Offset function to count number of times in range, value is below Last Cell value

    Hello Seniors /Experts,

    Sample Workbook is attached.
    Background
    Data range A31:M205. Row 31 acts as HEADER. This list will keep expanding down as days progresses in Column B, and corresponding data will be filled in adjacent cells.

    Currently, Last Cell is B205, and corresponding value exist in Cell M205.

    LATEST VALUE in cell M205 is 57.43, which has to be compared with preceding upside N values in same Column M.

    Last range (N Days) which has to be compared could be last 50, 100, 150, or any custom number to lookback (upside from last Cell in Column M) for comparision purpose. This control (lookback number) could be in Cell E11

    Currently I am using formula
    =COUNTIF(M32:M204,"<"&M205)
    in Cell E12. As and when new data (days) comes in, range will expand but always beginning from M31 which is header, and real data starts from M32, and Range will keep rolling like, M32:M204 (last row 205), M33:M205 (last row 206), M34:M206 (last row 207) and so on.

    Above formula compares number of cells within Range (M32:M204), that has value less than what is being specified in Cell M205

    (M205 is 57.43. Occurrence 1) M58=66.1, Occurrence 2) M117 has 59.07, and Occurrence 3) M118 has 82.49 values which are above M205 value of 57.43)

    So, result is Number of times, last value = 170 out of 174 rows (I guess, one is missing number of record is 174 [Row 32 to row 205 = 174], three occurrence should return 171 !!!)


    QUERY
    How should I change the Formula to achieve the result considering

    Last Cell in Column M is always changes, and goes down, as number of days gets update in future.

    Look-back period, (controlled through Cell E11) should make comparison range in last N Days only which will also keep moving ignoring the last Cell in Column M and count / compare in reverse direction.

    Thanks for your valuable time, and guidance.

    P.S.: My earlier thread was here, but i guess, that could not be twisted to get desired result here in above case !!!
    https://www.excelforum.com/excel-for...nding-row.html
    Attached Files Attached Files
    Last edited by analystbank; 08-06-2018 at 07:14 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Count number of times a number appears with count start from next cell of last occurr
    By lesliewheeler in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-29-2018, 09:34 AM
  2. [SOLVED] Count the number of times a date appears in a range
    By uhtfgy in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 07-12-2015, 05:53 AM
  3. count the number of times a number appears in a specific range
    By myjebay1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2013, 11:01 AM
  4. [SOLVED] Want to count the number of times a particular letter appears within a range
    By dwhite30518 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-11-2013, 01:24 PM
  5. Count number of times numbers go outside spesified range
    By Test123Test in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-14-2012, 04:57 PM
  6. Count how many times a number appears within a range of two numbers
    By Maristar in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-02-2009, 10:56 AM
  7. Replies: 3
    Last Post: 07-14-2005, 08:53 AM

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