Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Count No of days past due

I need a formula to count the number of days from a date in a cell to the
current date if another cell is null.

Example:

Date Sent Date Received Days Past Due
1/29/09 Null or blank

Also I have this formula:
=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Count No of days past due

=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?


If K15 is really blank, since Excel evaluates blanks as zeros in calcs,
you'd get a number which is: =TODAY()-0, ie: =TODAY(). If you format the
formula cell as date, it'll display it clearer.

If K15 contains a formula returned blank/null string: "" (ie text), or
contains any kind of text, then Excel will be unable to compute the
expression and it'll just return an error: #VALUE!
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---
"Mrs H" wrote:
I need a formula to count the number of days from a date in a cell to the
current date if another cell is null.

Example:

Date Sent Date Received Days Past Due
1/29/09 Null or blank

Also I have this formula:
=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Count No of days past due

Excel dates are numbers. You have to format the number as a date to see a
date. A basic book on Excel will explain this.

Tyro

"Mrs H" <Mrs wrote in message
...
I need a formula to count the number of days from a date in a cell to the
current date if another cell is null.

Example:

Date Sent Date Received Days Past Due
1/29/09 Null or blank

Also I have this formula:
=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 95
Default Count No of days past due

On Feb 6, 1:12 am, Max wrote:
=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?


If K15 is really blank, since Excel evaluates blanks as zeros in calcs,
you'd get a number which is: =TODAY()-0, ie: =TODAY(). If you format the
formula cell as date, it'll display it clearer.

If K15 contains a formula returned blank/null string: "" (ie text), or
contains any kind of text, then Excel will be unable to compute the
expression and it'll just return an error: #VALUE!
--
Max
Singaporehttp://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---

"Mrs H" wrote:
I need a formula to count the number of days from a date in a cell to the
current date if another cell is null.


Example:


Date Sent Date Received Days Past Due
1/29/09 Null or blank


Also I have this formula:
=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?


Try something like

DaysPastDue =IF(DateReceived=0;TODAY()-DateSent;0)

and format the cells as dates
Cheers Michael
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 95
Default Count No of days past due

On Feb 6, 3:36 pm, "Michael.Tarnowski" wrote:
On Feb 6, 1:12 am, Max wrote:



=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?


If K15 is really blank, since Excel evaluates blanks as zeros in calcs,
you'd get a number which is: =TODAY()-0, ie: =TODAY(). If you format the
formula cell as date, it'll display it clearer.


If K15 contains a formula returned blank/null string: "" (ie text), or
contains any kind of text, then Excel will be unable to compute the
expression and it'll just return an error: #VALUE!
--
Max
Singaporehttp://savefile.com/projects/236895
Downloads:23,000 Files:370 Subscribers:66
xdemechanik
---


"Mrs H" wrote:
I need a formula to count the number of days from a date in a cell to the
current date if another cell is null.


Example:


Date Sent Date Received Days Past Due
1/29/09 Null or blank


Also I have this formula:
=TODAY()-K15 but if the cell it refers to is null, it returns a number
39849 instead of zero - why is this?


Try something like

DaysPastDue =IF(DateReceived=0;TODAY()-DateSent;0)

and format the cells as dates
Cheers Michael


you can use to format a custom format like: "DD. MMM YY ;;"
The ";;" prevents the display of zero values
Michael
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make formula to get past due 30-60-90 days ASHRAF Excel Worksheet Functions 2 February 18th 08 01:15 PM
Calculating how many days past in a month from today Arup C[_2_] Excel Discussion (Misc queries) 5 November 8th 07 06:59 PM
COUNT how many ROWS ago out of 10 days that the highest high in 10 days was made rhhince Excel Worksheet Functions 1 January 14th 07 09:56 PM
count if gone past today JonnieP Excel Discussion (Misc queries) 2 November 30th 05 10:16 PM
flag date within a cell after 15 days have past? SAUDIA Excel Worksheet Functions 2 August 19th 05 04:33 PM


All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"