Stop counting days if another cell is populated

Charry118

New Member
Joined
Oct 18, 2016
Messages
8
Hi All,

First off, I am a self taught excel user, so some of my formulas may go around the world a bit!

I need some help with a spreadsheet I use on a regular basis.

The sheet is used to track customer complaints and how long the investigation takes to complete, therefore the following applies;
D column = Date Raised
E column = KPI Completion date (D1+7)
F column counts the actual number of days to complete the investigation using this formula... =DATEDIF(D1,TODAY(),"d")
Currently I have to manually write the final count in F when the investigation is closed out, however I would like this cell to stop counting when AB1 is "Yes"

I'm not sure if I will need to completely change the formula in the F column.

Any help would be greatly appreciated.
Thanks :)
 

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.
Just to clarify, what do you want to appear in column F once it has stopped counting? Is it the number of days the case took?
 
Upvote 0
Welcome to the Board!
Currently I have to manually write the final count in F when the investigation is closed out, however I would like this cell to stop counting when AB1 is "Yes"
Do you have some cell that tracks/captures the Date that the investigation was closed out?
If so, we could easily incorporate that into our formula.
If not, it will probably require some VBA code to capture the date when someone enters "Yes" in AB1, and then either stores that date somewhere to use in the calculation on the sheet itself, or overwrites your formula in cell F1 with the hard-coded value of the calculation.
 
Upvote 0
If you click inside the cell in column F and press F9, the formula will be converted to a value. Can you work with that?
 
Upvote 0
Welcome to the Board!

Do you have some cell that tracks/captures the Date that the investigation was closed out?

Thanks Joe!

No, I don't - but this could easily be added to the sheet if that would make the formula easier?
Currently I have a column labelled "Closed out" which is a drop down menu for "yes" or "no".

The sheet is used by various different people and I wanted it to be as simple and user friendly as possible.
 
Upvote 0
If you had a date picker in the closed out column instead of a drop-down box, this would be dead easy.
 
Upvote 0
Let's say that you had column Z as your close out date, and that is only populated when it is closed out.
Then you could change your formula to:
Code:
[COLOR=#333333]=DATEDIF(D1,IF(Z1>0,Z1,TODAY()),"d")[/COLOR]
What this would do is if there is a value in Z1, it will use that in your date calculation. Otherwise, it will use the Current date.
 
Upvote 0
If you click inside the cell in column F and press F9, the formula will be converted to a value. Can you work with that?

Hi Ali,

I'm sorry - I'm not sure I follow.

With the formula I'm using in F I currently have a value of "42661" until column D is populated (date appears). Is this what you mean?
 
Upvote 0
Not sure I'm entirely clear. Can you paste your layout here? You can use the ForumTools add-in in my sig line to get tables into your post easily.
 
Upvote 0

Forum statistics

Threads
1,222,220
Messages
6,164,653
Members
451,907
Latest member
Mohammed9877

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