Trying to only calculate from a start date to today only when a certain cell contains "Pending"

fifi8495

New Member
Joined
Jan 4, 2024
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Good afternoon,

I am trying to get a formula to only calculate when another cell contains the word "Pending" from a start date to today. Once The cell changes to Complete, I want the number of days to stay present but not calculate anymore.

For example,
-B3 = Start Date​
-E3 = Pending / Complete​
-H3 = Number of days between Start Date and Today​


If anyone can assist, that would be greatly appreciated.
 

Attachments

  • Capture.PNG
    Capture.PNG
    6.8 KB · Views: 27

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Maybe

VBA Code:
IF(E3="Pending",TODAY()-B3+1,"")

I missed your second requirement on this one. Once it changes to complete, would it be possible to paste as values to keep the value on the cell?
 
Upvote 0
Maybe

VBA Code:
IF(E3="Pending",TODAY()-B3+1,"")

I missed your second requirement on this one. Once it changes to complete, would it be possible to paste as values to keep the value on the cell?
The first one worked but lost the value once it when to complete. What do you mean paste as values?
 
Upvote 0
The first one worked but lost the value once it when to complete. What do you mean paste as values?
The formula is only looking for the word "Pending". So a workaround would be to click on the cell where you have the formula, Copy it(Ctrl +C) and then right click on the same cell and paste the formula as value(Can also be done by pressing Ctrl +Shift + V).

1704391726647.png
 
Upvote 0
The formula is only looking for the word "Pending". So a workaround would be to click on the cell where you have the formula, Copy it(Ctrl +C) and then right click on the same cell and paste the formula as value(Can also be done by pressing Ctrl +Shift + V).

View attachment 104400
So is there no other way for it to do it automatically?
 
Upvote 0
So is there no other way for it to do it automatically?
There might be a way of doing it automatically. But a few things I can think of are, the formula I provided is using Today in the calculation. Would there be an instance where the status changed from Pending to Complete on a day that isn’t today?

Will the Date completed tab be populated? If so I can alter the formula to calculate based on the date it was completed?
 
Upvote 0
There might be a way of doing it automatically. But a few things I can think of are, the formula I provided is using Today in the calculation. Would there be an instance where the status changed from Pending to Complete on a day that isn’t today?

Will the Date completed tab be populated? If so I can alter the formula to calculate based on the date it was completed?
It will be eventually, but I will need the number of days during the process before its completed. Having the information stay is more for tracking purposes for the future. The numbers of days during the process is more important.
 
Upvote 0
It will be eventually, but I will need the number of days during the process before its completed. Having the information stay is more for tracking purposes for the future. The numbers of days during the process is more important.
Sadly, I'm at a lost as to how to accomplish this.

The best I can think of(Limited Knowledge) would be this formula. This would require for the Completed tab to be filled out as this formula will look at Column J and subtract that from the Date column.

VBA Code:
=IFNA(IFS(E3="Pending",TODAY()-B3+1,E3="Complete",J3-B3+1),"")
 
Upvote 0
Sadly, I'm at a lost as to how to accomplish this.

The best I can think of(Limited Knowledge) would be this formula. This would require for the Completed tab to be filled out as this formula will look at Column J and subtract that from the Date column.

VBA Code:
=IFNA(IFS(E3="Pending",TODAY()-B3+1,E3="Complete",J3-B3+1),"")
This one will actually work for what we need. Thank you so much!
 
Upvote 0

Forum statistics

Threads
1,223,898
Messages
6,175,274
Members
452,628
Latest member
dd2

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