Days from date and stopping counting issue

- - Latest reply: TrowaD
Posts
2436
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 11, 2018
- Aug 2, 2018 at 11:33 AM
Hello,

I am trying to create a new tracking sheet, and it focuses around this forumula I can't seem to find out how to fix. The formula I'm working with is below:

=IF(C3="",TODAY()-A3,C3-A3)

My objective was to create a tracking formula so I could put a date into a cell when notification was received/sent (A3), then have the cell next to it start counting(B3, also where the formula is located). Once that issue was resolved, I would input a date in the other cell (C3), which would them override the “today()” function, and do the subtraction portion (Also stopping an endless number count). This would show how long it takes for responses to have quick overview of how many days it took to respond to each issue.

My current dilemma is that when cell A3 is blank, the formula cell displays a sample number 43313. I'm not sure why it wont just show a blank cell when there is no data to grab from. Is there a way to fix it so it wont show this? I have tried everything I can think of, but nothing works.
See more 

Your reply

2 replies

Posts
10933
Registration date
Monday June 3, 2013
Status
Moderator
Last seen
December 11, 2018
0
Thank you
YOu if statement says if C3 is blank, to take todays date and and subtract A3 from it.

The syntax for IF is:

-IF(LOGIC_TEST,TRUE,FALSE)

If we apply your formula to this syntax we get:
=IF(
{logic_test}C3="",
{TRUE}TODAY()-A3,
{FALSE}C3-A3
)

So, I hope this answers your question of why!
Respond to ac3mark
Posts
2436
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
December 11, 2018
0
Thank you
Hi Gorillawar,

That sample number you mention is actually an Excel code for date (select that cell, hit Ctrl+1 and change the format to date). That date is either today's date or the value in C3.

When you want the result to be blank when A3 is blank, you will need to nest another IF function:
=IF(A3="","",IF(C3="",TODAY()-A3,C3-A3))

Best regards,
Trowa
Respond to TrowaD