Days Elapsed Based on Cell Value

ChrisM7872

New Member
Joined
Mar 21, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Team,

First off, thank you for helping me with what has been racking my brain for a few days. I've read multiple sites on how to do this, but nothing has been helpful so I am turning to the experts.

What I need is a formula that lives in column C that looks at column D and if the value in that cell is "completed" then the formula returns the days elapsed between "Date Received" and "Date Completed". If the value is "in progress", then the formula returns the days elapsed from "Date Received" to the current date.

Thanks in advance.

1679436363994.png
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Excel Formula:
=IF(D2="completed",B2-B1,Today()-B1)
 
Upvote 0
Solution
Excel Formula:
=IF(D2="completed",B2-B1,Today()-B1)
althought, I recommend not using Today() function as it is volatile. I would use a helper cell to input it and reference that in the formulas.
Volatile functions calculate every time a calculation takes place, and if you have lots of volatile functions in the workbook you will slow it down substantially.
If you don't have many, then it isn't an issue.
 
Upvote 0

Forum statistics

Threads
1,223,270
Messages
6,171,102
Members
452,379
Latest member
IainTru

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