Multiple Date Formulas

Tank2001

New Member
Joined
Feb 15, 2018
Messages
4
Hello!

I'm trying to determine a working formula that will do the following

CellA4 will display total days from CellA1 to CellA3

If CellA3 is 0 then display total days from CellA1 to CellA2

Any help is help is appreciated!!!
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Are A1, A2, and A3 dates or a number of days or.....what?

If they're dates, then maybe this:

=IF(A3=0,A2-A1,A3-A1)

If they're numbers of days this:

=SUM(A1:A3) (it won't matter if A3 is empty or not)
 
Upvote 0
Are A1, A2, and A3 dates or a number of days or.....what?

If they're dates, then maybe this:

=IF(A3=0,A2-A1,A3-A1)

If they're numbers of days this:

=SUM(A1:A3) (it won't matter if A3 is empty or not)

A1=Start Date
A2=Resolve Date
A3=Credit Passed Date
A4=Rolling total of days

When I attempted to use the formula provided it generated a fairly large negative number.
 
Upvote 0
When I put:
"2/10/18" in A1 formatted as a date
"2/15/18" in A2 formatted as a date
"2/25/18" in A3 formatted as a date

and:

"=IF(A3=0,A2-A1,A3-A1)" in A4 formatted as General.

It gives me a result of 15. If I clear A3, it changes to 5.


Not sure what's different in your workbook. It's hard for me to test it without being able to replicate the problem you're having.
 
Upvote 0
When I put:
"2/10/18" in A1 formatted as a date
"2/15/18" in A2 formatted as a date
"2/25/18" in A3 formatted as a date

and:

"=IF(A3=0,A2-A1,A3-A1)" in A4 formatted as General.

It gives me a result of 15. If I clear A3, it changes to 5.


Not sure what's different in your workbook. It's hard for me to test it without being able to replicate the problem you're having.

Your formula worked actually. I was referencing to over a year's time so it came back with that larger final number. Thanks!!!!
 
Upvote 0
Is there any way to alternatively have A4 show the total number of days to date if all of the other cells are blank?
 
Upvote 0
Assuming you mean all cells other than A1, then yessir :) .

=IF(AND(A3="",A2=""),ROUND(NOW()-A1,0),IF(A3="",A2-A1,A3-A1))

If you leave the Round out of it, like:

=IF(AND(A3="",A2=""),NOW()-A1,IF(A3="",A2-A1,A3-A1))

It will return the number of days, hours, minutes, seconds as a decimal. I.E. - 36.14278 days, so whichever you prefer.
 
Last edited:
Upvote 0
Hi!

Maybe the formula below can help you:

=IF(LOOKUP(7^6,A$1:A$3)=A$1,TODAY(),LOOKUP(7^6,A$1:A$3))-A$1

Markmzz
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,329
Members
452,635
Latest member
laura12345

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