SOLVED

Freeze or Stop Formula

Copper Contributor

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

@inawolters 

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.

@Hans Vogelaar 

 

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

 

 

@inawolters 

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

 

S3547.png

 

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

best response confirmed by inawolters (Copper Contributor)
Solution

@inawolters ,,

 

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

 

Rajesh-S_0-1601463968996.png

 

  • Formula in cell AC4:

 

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

 

 

Rajesh-S_1-1601464142433.png

 

  • 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.

 

@Rajesh_Sinha 

 

Thank you! It works!

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 ☺
1 best response

Accepted Solutions
best response confirmed by inawolters (Copper Contributor)
Solution

@inawolters ,,

 

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

 

Rajesh-S_0-1601463968996.png

 

  • Formula in cell AC4:

 

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

 

 

Rajesh-S_1-1601464142433.png

 

  • 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.

 

View solution in original post