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
Initial Notification DateDays UnresolvedDate of Resolution
9/30/20194

<colgroup><col><col><col></colgroup><tbody>
</tbody>

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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
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,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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