+ Reply to Thread
Results 1 to 3 of 3

Count how many times a value exceeds another value AND has not occured in previous 24 cell

  1. #1
    Registered User
    Join Date
    09-10-2020
    Location
    Philadelphia
    MS-Off Ver
    Office 365
    Posts
    2

    Count how many times a value exceeds another value AND has not occured in previous 24 cell

    Hello,

    I'm trying to program excel to process raw tidal elevation data. I have hourly tidal elevations over a one year period and I want to know how many times a reading of over 2 feet has occurred. However, I only want to count an exceedance if another exceedance has not occurred in the previous 24 hours. I have a worksheet now with a formula next to every data point which does this, but I was wondering if there is a way to just have one formula that counts it all up in one cell.

    I think the formula will involve a CountIf(), And(), and Index() functions. I guess the best way I can think to describe it right now is:

    =CountIf(And(cell in column 1>value, ***) with the *** being a function which checks the previous 24 cells in that column to see if an exceedance has occurred.

    I can offer more information upon request, but I'm just wondering if this is even possible.

    Thanks in advance

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Count how many times a value exceeds another value AND has not occured in previous 24

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    09-10-2020
    Location
    Philadelphia
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Count how many times a value exceeds another value AND has not occured in previous 24

    I've attached a dummy spreadsheet to this reply. There are notes in the file to help.
    Attached Files Attached Files

+ 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. Replies: 7
    Last Post: 12-27-2017, 08:32 AM
  2. Count how many times a date in column G exceeds respective Row in Column A
    By tangerine7199 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-14-2017, 04:44 PM
  3. [SOLVED] Compare two cells and count how many times either one exceeds 500
    By Losguapos1 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-18-2017, 02:59 PM
  4. Replies: 11
    Last Post: 02-18-2015, 10:49 AM
  5. Replies: 3
    Last Post: 02-07-2014, 03:22 AM
  6. [SOLVED] count no of instaces occured in userform combobox
    By cfinch100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-17-2013, 12:51 PM
  7. Replies: 7
    Last Post: 11-19-2012, 04:28 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