Days Tracker in Excel

Peteor

Board Regular
Joined
Mar 16, 2018
Messages
152
Hello! I would like to do something in Excel I don't believe is possible. I would like to count the number of days a cell has a value.

E.G. - Assume the values below have not changed for 10 days. I would like to count the number of days the cell has not been blank.

Action resides with John DoeDays action resided with John Doe
0
X10
0
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Does the user open this everyday? Or do you want this to trigger regardless of opening in the document?
 
Upvote 0
*Bear in mind that the count may not be continuous in nature as well*

E.G.
9/1/2020 - 9/10/2020 - Action resided with John Doe
9/11/2020 - 9/15/2020 - Action did not reside with John Doe
9/16/2020 - 9/21/2020 - Action resided with John Doe

I simply want to count the total days action resided with John Doe.
 
Upvote 0
Maybe something like this...

VBA Code:
Sub Workbook_Open()
Dim numOfDaysWithSameValue As Long
With Sheets("Sheet1")
    If .Range("F2").Value = .Range("A3").Value Then
        numOfDaysWithSameValue = Date - .Range("E2").Value
        If numOfDaysWithSameValue > 0 Then
            .Range("B3").Value = .Range("B3").Value + numOfDaysWithSameValue
            .Range("G2").Value = .Range("B3").Value
            .Range("F2").Value = .Range("A3").Value
            .Range("E2").Value = Date
        End If
    Else
        .Range("F2").Value = .Range("A3").Value
        .Range("E2").Value = Date
        .Range("G2").Value = 0
        .Range("B3").Value = 0
    End If
End With
End Sub

Snag_894357.png
 
Upvote 0
Then I am not sure how you can do this without using VBA.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,817
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top