Stop Counting

Vtookup

Board Regular
Joined
May 30, 2017
Messages
124
Office Version
  1. 2016
  2. 2013
Hi All.
I need help with formula or vba to stop counting and retain last count (E5 or column E)
E5=Today()-C1
C1=Today()
D5=Blank or not Blank
If D5=Blank then E5 counts
If D5 is not blank or populated then counting stop and retain the number

Thanks in advance for the help.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Today-Today will always be 0. Not sure what you are trying to do.
 
Upvote 0
Hi
Sorry I messed up. Let's start over.
found this code, I'll change detail to match the vba.
B4 =Date of Entry
C4 = Today()-B4
D4 =blank or not blank ("Y")
Goal is for C4 to continue counting until D4 is filled up with "Y". Then C4 stop the count and convert number into value.
like it to work in column C (beyond C4)
here's the code shared...
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target <> Range("D4") Then Exit Sub
If UCase(Range("D4").Value) = "Y" Then
    Range("C4") = Range("C4").Value
Else
    Range("D4").Formula = "=TODAY()-B4"
End If
End Sub
Thanks
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,676
Messages
6,126,162
Members
449,295
Latest member
DSBerry

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