+ Reply to Thread
Results 1 to 3 of 3

Running counter which resets after threshold

Hybrid View

  1. #1
    Registered User
    Join Date
    11-07-2015
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    91

    Running counter which resets after threshold

    Hi all,

    I'm trying to figure out how to create a counter for how many times a fruit appears, however the count only resets when it appears again after 60 days. I've attached a sample workbook- column F has a running count which resets when the next time that fruit appears is 60 days later, but I cant seem to figure out a formula in column G which isolates that final number for that particular fruit before the counter resets.

    Any help would be appreciated!

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Running counter which resets after threshold

    G5=IF(COUNTIF(C5:INDEX(C:C,LOOKUP(2,1/((C5:C$17=C5)*(B5:B$17<=B5+$C$2)),ROW(B5:B$17))),C5)=1,COUNTIF(C5:INDEX(C$5:C5,MATCH(1,INDEX((C$5:C5=C5)*(B$5:B5>=B5-+$C$2),0),0)),C5),"")
    =IF(COUNTIF(C5:INDEX(C:C,LOOKUP(2,1/((C5:C$17=C5)*(B5:B$17<=B5+$C$2)),ROW(B5:B$17))),C5)=1,COUNTIF(C5:INDEX(C$5:C5,MATCH(1,INDEX((C$5:C5=C5)*(B$5:B5>=B5-+$C$2),0),0)),C5),"")
    Try this and copy towards down
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  3. #3
    Registered User
    Join Date
    11-07-2015
    Location
    Australia
    MS-Off Ver
    Office 365
    Posts
    91

    Re: Running counter which resets after threshold

    Quote Originally Posted by nflsales View Post
    G5=IF(COUNTIF(C5:INDEX(C:C,LOOKUP(2,1/((C5:C$17=C5)*(B5:B$17<=B5+$C$2)),ROW(B5:B$17))),C5)=1,COUNTIF(C5:INDEX(C$5:C5,MATCH(1,INDEX((C$5:C5=C5)*(B$5:B5>=B5-+$C$2),0),0)),C5),"")
    =IF(COUNTIF(C5:INDEX(C:C,LOOKUP(2,1/((C5:C$17=C5)*(B5:B$17<=B5+$C$2)),ROW(B5:B$17))),C5)=1,COUNTIF(C5:INDEX(C$5:C5,MATCH(1,INDEX((C$5:C5=C5)*(B$5:B5>=B5-+$C$2),0),0)),C5),"")
    Try this and copy towards down

    Thank you, works great. Definitely more complicated than what I thought, no wonder I couldn't figure it out!

+ 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] Running Total that resets on Mondays
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-01-2018, 05:17 PM
  2. Replies: 8
    Last Post: 07-19-2017, 12:06 PM
  3. Replies: 1
    Last Post: 11-30-2016, 08:02 PM
  4. calculating the total from a running totalizer that resets
    By superchill435 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-10-2012, 11:04 AM
  5. Running Total and Resets
    By HyMay1180 in forum Excel General
    Replies: 11
    Last Post: 04-20-2011, 03:49 PM
  6. Running counter using time
    By cdrum84 in forum Excel General
    Replies: 1
    Last Post: 06-06-2010, 11:47 AM
  7. Running counter
    By GeorgeBob in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-13-2009, 11:20 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