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

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
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,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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