Habit Tracker Streak for Habits That Aren't Daily Google Sheets

crutty

New Member
Joined
Jul 15, 2019
Messages
2
I am building a habit tracker where my habits are the columns and each day is a row. Near the top, I have a 'streak' row which is meant to be how many days from today that I have successfully completed the habit. I have managed to figured out a way to calculate this field for habits that are daily. However, a couple of my habits are not daily. For example, they may be every Monday and Thursday, or only on Wednesdays, etc. If I complete say the 'every Wednesday habit' every Wednesday, I want the streak to reflect that I am doing it each time.

Additionally, I have another row that calculates overall percentage of habit completion. This one should be easier, but still might be more complicated for habits that aren't daily.

As someone who is familiar but by no means an expert at Excel, I'm not really sure where to start. Spent a couple hours googling with no success, so if you can help me out I'd greatly appreciate it!

(Note: I'm actually working this in Google Sheets so I will link an example, but I figure other than formatting the formula to be an array formula there should really be no difference.)


Here is the link. The cells in yellow are the one's I need help with! Thanks so much and let me know if I need to do anything else.

https://docs.google.com/spreadsheets/d/11m989S7Bvt7GmiRE8lFJUYtU1AbcGxOo8raqaoaz16Q/edit?usp=sharing
 

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

crutty

New Member
Joined
Jul 15, 2019
Messages
2
Re: Habit Tracker Streak for Habits That Aren't Daily

Just for reference, the formula I am using to calculate the streak for daily habits is (Example for cell C3):
=IFERROR(ARRAYFORMULA(MAX(IF(C5:C=TRUE,ROW(C5:C))))-ARRAYFORMULA(MAX(IF(C5:INDIRECT("C"&ARRAYFORMULA(MAX(IF(C5:C=TRUE,ROW(C5:C)))))=FALSE,ROW(C5:C),4))),0)

For the 'Overall %' row it is (Example for cell C4):
=IFERROR(COUNTIF(C5:C,TRUE)/COUNTA(C5:INDIRECT("C"&ARRAYFORMULA(MAX(IF(C5:C=TRUE,ROW(C5:C)))))))
 

Ynwaps

New Member
Joined
Sep 11, 2019
Messages
1
Re: Habit Tracker Streak for Habits That Aren't Daily

Hey crutty,
I was looking for a habit streak formula and found your thread here on google.
Anyway it worked very well so I have improved your sheet a bit:
https://docs.google.com/spreadsheets/d/1-2Oihk_aN13n6ZqEoyD0qBrlfPJtf17RpHKKNXpL438/edit?usp=sharing

The only thing that is not working yet is to calculate streaks on off gym days for example.
But the overall% is correct.

Anyway feel free to improve this sheet further. I only registered here to give back :)
Enjoy!
 

bencole123

New Member
Joined
Jan 21, 2020
Messages
1
Platform
MacOS
Hey crutty, or Ynwaps, do you know how to translate this to apple numbers? is arrayformula the same thing as Index in apple numbers? I got the overal % to work but i need the streak to convert and im having trouble.
 

Watch MrExcel Video

Forum statistics

Threads
1,101,756
Messages
5,482,698
Members
407,358
Latest member
Maze123

This Week's Hot Topics

  • Finding issue in If elseif else with For each Loop
    Finding issue in If elseif else with For each Loop I have tried this below code but i'm getting in Y column filled with W005. Colud you please...
  • MsgBox Error
    Hi Guys, I have the below error show up when i try and run my macro in File1 but works fine if i copy and paste the same code into file2. [ATTACH...
  • CELL FORMAT - IF CONDITION
    My Cell Format is [B]""0.00" Cr". [/B]But in the cell, it is showing 123.00 for editing. (123 is entry figure). (Data imported from other...
  • Show numbers nearly the same
    Is this possible. I have a number that can change very time eg 0.00001234 Then I have a lot of numbers 0.0000001, 0.0000002, 0.00000004...
  • Please i need your help to create formula
    I need a formula in cell B8 to do this >>if b1=1 then multiply ( cell b8) by 10% ,if b1=2 multiply by 20%,if=3 multiply by 30%. Thank you in...
  • Got error while adding column and filter
    Got error while adding column and filter In column Z has some like "Success" and "Error". I want to add column in AA if the Z cell value is...
Top