+ Reply to Thread
Results 1 to 4 of 4

Count first instance in series above a condition

  1. #1
    Registered User
    Join Date
    04-14-2020
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Count first instance in series above a condition

    Hi all,

    I have a series of acceleration data that is sampled at 0.1s from which I am trying to count efforts above a threshold of 2.5m/s/s

    Currently, if I do a normal count using a condition, I am getting a count of all occurrences in a series that are above 2.5 where I only want to count the first occurrence as they are all in the same effort. For the below example =countif(array,>=2.5) would result in a count of 5. I want it to be 1 as they are the same effort. The data set is large and many of these efforts occur.

    0.831396818
    1.749603987
    2.432745457
    2.874011517
    3.082041025
    3.082629681
    2.915354013
    2.620022297
    2.236617327
    1.8116467


    Thanks in advance

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Count first instance in series above a condition

    Hi Jake,

    I took your numbers and appended them 3 times, thinking you have a very long set of data. Then using 2 helper columns, I think I have your answer.
    The first helper determines if the acceleration is GT 2.5 and the second using some If() functions determines if it is the first in a series.
    The answer is in the yellow box and is the sum of all those first 1s.
    Count Accelerations only once.xlsx
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,417

    Re: Count first instance in series above a condition

    please use the attached file of MarvinP GURU (Say TQ)

    Cell E3 formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-14-2020
    Location
    Australia
    MS-Off Ver
    365
    Posts
    10

    Re: Count first instance in series above a condition

    Perfect MarvinP thank you so much!

+ 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] Formula to count each instance of a Text Value (not total count)
    By Webbers in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-09-2021, 06:06 PM
  2. Count Based on First Instance and Criteria
    By Barieq in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2021, 12:05 PM
  3. Obtain count of items within a series (within a series collection) VBA
    By jonfurn in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-26-2019, 12:35 PM
  4. [SOLVED] Identify the first instance the condition is meet and make remaining cells zero
    By excobra in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-25-2016, 03:10 PM
  5. Running count of value instance
    By jchrystal in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-22-2014, 10:32 AM
  6. [SOLVED] Count in a range, where identical adjacent cells count as one instance.
    By the-algebraist in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-05-2013, 11:18 AM
  7. Changing the condition of a For Each loop for a single instance
    By akh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-23-2010, 11:23 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