Another date question? Thanks smozgur and Dave. Problem So

L

Legacy 98055

Guest
Hi all!

Column E = Date Opened
Column F = Date Closed
Column O = Difference in days

The above is fine...

Here's my problem...

Ex.
Cell E5 = 04/02/2002
Cell F5 = EMPTY or ""

I would like to display the days opened in
Cell O5

Meaning Today() - F5

The formula I am trying to use is giving me the #NAME?

=IF(AND(val(E5)<>0,val(F5)=0),NOW()-E5,F5-E5)

If E5 contains a date and F5 does not contain a date then formula needs to return the difference in days between Now - E5

Thanks for the help!

Tom
This message was edited by TsTom on 2002-04-06 11:07
This message was edited by TsTom on 2002-04-06 11:23
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
val is not Excel function (if you didnot do it in a module), just remove them, also you dont need a function like val there. Try using this:

=IF(AND(E5<>0,F5=0),TODAY()-E5,F5-E5)

regards
 
Upvote 0
You may need something like

=IF(AND(E5>0,F5=0),E5-TODAY(),F5-E5)
 
Upvote 0

Forum statistics

Threads
1,213,553
Messages
6,114,279
Members
448,562
Latest member
Flashbond

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