SOLVED

Highlighted
New Contributor

# Freeze or Stop Formula

Hello!

I have created an overview of the fleet: date of car in garage, number of days in, date back ...

I used the 'today' function to count how many days the car is in the garage. Now I would like that when I fill in the cell 'date back', the number of days no longer starts counting, because this is of course no longer necessary. So the formula should automatically freeze for this line when I fill in a particular cell.

Can anyone help me with this?

Greetings,
Ina

6 Replies
Highlighted

# Re: Freeze or Stop Formula

Let's say Date In is in cell D2, Date Back in E2, and Number of Days in F2.

Use the following formula in F2:

=IF(D2="","",IF(E2="",TODAY(),E2)-D2+1)

This can be filled down.

Highlighted

# Re: Freeze or Stop Formula

For some reason this does not work. I get an error.

Highlighted

# Re: Freeze or Stop Formula

You have to replace D2 and E2 with the cells that contain Date In and Date Back, of course.

If you can't make it work, could you attach a small sample workbook without sensitive/proprietary data?

Highlighted
Best Response confirmed by inawolters (New Contributor)
Solution

# Re: Freeze or Stop Formula

I'm sure this is what you are looking for:

• Formula in cell AC4:

``=IF(NOT(ISBLANK(AB4)),"",DATEDIF(AA4,TODAY(),"D"))``

• As soon you fill cell Date back with any data, may be Text, Number or Date even, you get blank in cell AC4.

You may use this one also:

``=IF(NOT(ISBLANK(AB4)),"Vehicle Delivered",DATEDIF(AA4,TODAY(),"D"))``

• Adjust cell references in the formula as needed.
• If this not what you are looking for  then please share some sample data with us.

*** In cease if this post solves the issue, please mark it as Best Solution.

Highlighted

# Re: Freeze or Stop Formula

Thank you! It works!

Highlighted

# Re: Freeze or Stop Formula

Glad to help you,, since what I've suggested is working so if you feel then you may mark my post/answer as,, Best Response ☺