Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default Count between dates with some entries marked as "-"

I need to calculated number of days between two dates where some of the
entries didn't occur yet thus have a "-" sign in the cell. The cells are
formatted in date format of MM/DD/YY.

I've tried following formulas that work if both dates are populated but give
me a #VALUE! error if one of the cells has the "-" sign it.

Does anybody know of any other way to include it so if the sign is there the
formula calculates the difference all the way to today?

=IF(B1="",TODAY(),B1)-A1
=IF(B1<"",B1-A1,TODAY()-A1)
=IF(B1="-",TODAY(),B1)-A1

all of the return the same error and work only of both dates are populated.
Please help.

Thank you
Monika
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Count between dates with some entries marked as "-"

If you click on the cell that has a - in it, what does the formula bar show?
Possibly 0? If so:

=IF(B1=0,TODAY(),B1)-A1

otherwise, change 0 to the value in the formula bar.

"murkaboris" wrote:

I need to calculated number of days between two dates where some of the
entries didn't occur yet thus have a "-" sign in the cell. The cells are
formatted in date format of MM/DD/YY.

I've tried following formulas that work if both dates are populated but give
me a #VALUE! error if one of the cells has the "-" sign it.

Does anybody know of any other way to include it so if the sign is there the
formula calculates the difference all the way to today?

=IF(B1="",TODAY(),B1)-A1
=IF(B1<"",B1-A1,TODAY()-A1)
=IF(B1="-",TODAY(),B1)-A1

all of the return the same error and work only of both dates are populated.
Please help.

Thank you
Monika

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default Count between dates with some entries marked as "-"

Hi Sean:

Thanks for the response.
The formula bar shows "-" so that's what I put in my formula but it still
returns the #VALUE! error.

Monika

"Sean Timmons" wrote:

If you click on the cell that has a - in it, what does the formula bar show?
Possibly 0? If so:

=IF(B1=0,TODAY(),B1)-A1

otherwise, change 0 to the value in the formula bar.

"murkaboris" wrote:

I need to calculated number of days between two dates where some of the
entries didn't occur yet thus have a "-" sign in the cell. The cells are
formatted in date format of MM/DD/YY.

I've tried following formulas that work if both dates are populated but give
me a #VALUE! error if one of the cells has the "-" sign it.

Does anybody know of any other way to include it so if the sign is there the
formula calculates the difference all the way to today?

=IF(B1="",TODAY(),B1)-A1
=IF(B1<"",B1-A1,TODAY()-A1)
=IF(B1="-",TODAY(),B1)-A1

all of the return the same error and work only of both dates are populated.
Please help.

Thank you
Monika

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 76
Default Count between dates with some entries marked as "-"

Hi Sean:

Got it, I use IF in conjunction with ISERROR and got it working.
Thx
Monika

"Sean Timmons" wrote:

If you click on the cell that has a - in it, what does the formula bar show?
Possibly 0? If so:

=IF(B1=0,TODAY(),B1)-A1

otherwise, change 0 to the value in the formula bar.

"murkaboris" wrote:

I need to calculated number of days between two dates where some of the
entries didn't occur yet thus have a "-" sign in the cell. The cells are
formatted in date format of MM/DD/YY.

I've tried following formulas that work if both dates are populated but give
me a #VALUE! error if one of the cells has the "-" sign it.

Does anybody know of any other way to include it so if the sign is there the
formula calculates the difference all the way to today?

=IF(B1="",TODAY(),B1)-A1
=IF(B1<"",B1-A1,TODAY()-A1)
=IF(B1="-",TODAY(),B1)-A1

all of the return the same error and work only of both dates are populated.
Please help.

Thank you
Monika

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Count between dates with some entries marked as "-"

Could you ensure there are no leading or trailing spaces with that - ? can
use a find() instead..

=IF(iserror(find("-",B1)),B1,TODAY())-A1


"murkaboris" wrote:

Hi Sean:

Thanks for the response.
The formula bar shows "-" so that's what I put in my formula but it still
returns the #VALUE! error.

Monika

"Sean Timmons" wrote:

If you click on the cell that has a - in it, what does the formula bar show?
Possibly 0? If so:

=IF(B1=0,TODAY(),B1)-A1

otherwise, change 0 to the value in the formula bar.

"murkaboris" wrote:

I need to calculated number of days between two dates where some of the
entries didn't occur yet thus have a "-" sign in the cell. The cells are
formatted in date format of MM/DD/YY.

I've tried following formulas that work if both dates are populated but give
me a #VALUE! error if one of the cells has the "-" sign it.

Does anybody know of any other way to include it so if the sign is there the
formula calculates the difference all the way to today?

=IF(B1="",TODAY(),B1)-A1
=IF(B1<"",B1-A1,TODAY()-A1)
=IF(B1="-",TODAY(),B1)-A1

all of the return the same error and work only of both dates are populated.
Please help.

Thank you
Monika



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default Count between dates with some entries marked as "-"

Ahh, beat me to it! :-)

"murkaboris" wrote:

I need to calculated number of days between two dates where some of the
entries didn't occur yet thus have a "-" sign in the cell. The cells are
formatted in date format of MM/DD/YY.

I've tried following formulas that work if both dates are populated but give
me a #VALUE! error if one of the cells has the "-" sign it.

Does anybody know of any other way to include it so if the sign is there the
formula calculates the difference all the way to today?

=IF(B1="",TODAY(),B1)-A1
=IF(B1<"",B1-A1,TODAY()-A1)
=IF(B1="-",TODAY(),B1)-A1

all of the return the same error and work only of both dates are populated.
Please help.

Thank you
Monika

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
Formula to count number of time stamps within a range in a column having dates formatted as "custom" Sam Excel Discussion (Misc queries) 3 June 19th 07 12:33 AM
Provide list from all columns marked with and "x" BAW Excel Worksheet Functions 2 September 9th 06 09:28 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM
How do I count like dates in a column with format "January-05"? Kentski Excel Worksheet Functions 3 January 16th 06 01:51 AM


All times are GMT +1. The time now is 05:43 AM.

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

About Us

"It's about Microsoft Excel"