Stop counting day if another cell is populated

AHUETE

New Member
Joined
Oct 4, 2019
Messages
1
Hi :)

I need help trying to create a formula that will stop counting in B2 once I enter a date in C2 and want B2 to retain the count it stopped at.


Currently B2 is =TODAY()-A2


A B C[TABLE="width: 330"]
<colgroup><col><col><col></colgroup><tbody>[TR]
[TD]Initial Notification Date[/TD]
[TD]Days Unresolved[/TD]
[TD]Date of Resolution[/TD]
[/TR]
[TR]
[TD]9/30/2019[/TD]
[TD]4[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Is anyone able to please assist me with this issue? I have read many blog post but was not able to locate any that did exactly what I needed.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Welcome to the Board!

The only way I know how to do that is with VBA.

Right-click on the sheet tab name at the bottom of the screen, select "View Code", and paste this VBA code in the resulting VB Editor window:
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

'   See if cell C2 updated
    If Not Intersect(Target, Range("C2")) Is Nothing Then
        If Range("C2") <> "" Then
            Range("B2").Value = Range("B2").Value
        End If
     End If
     
End Sub
This will automatically hard-code the value in cell B2 as you add an entry into cell C2.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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