Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Robert
 
Posts: n/a
Default This is a date question...

Here is what I am trying to do.

I have two columns. The values in the first column, let's call them Begin
Date.
The values in the second column we will call End Date.

What I am trying to do is creat (in a third column) a Yes or No value based
on the
following criteria:

If (amount of time) between Begin Date and End Date is less than 1 week,
put a value of Yes in the third column for this record. If not, put a No.
Can this be done?
--
RSF
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

XL stores dates as long integer offsets from a base date, so you can use
regular math on them:

=IF(end_date - begin_date)<7,"Yes","No")

In article ,
Robert wrote:

Here is what I am trying to do.

I have two columns. The values in the first column, let's call them Begin
Date.
The values in the second column we will call End Date.

What I am trying to do is creat (in a third column) a Yes or No value based
on the
following criteria:

If (amount of time) between Begin Date and End Date is less than 1 week,
put a value of Yes in the third column for this record. If not, put a No.
Can this be done?

  #3   Report Post  
aristotle
 
Posts: n/a
Default

Hi,

=IF(A1-B1<7,"Yes","No")

where A1 nests begin date and B1 nests end date.

Regards,
A



"Robert" wrote:

Here is what I am trying to do.

I have two columns. The values in the first column, let's call them Begin
Date.
The values in the second column we will call End Date.

What I am trying to do is creat (in a third column) a Yes or No value based
on the
following criteria:

If (amount of time) between Begin Date and End Date is less than 1 week,
put a value of Yes in the third column for this record. If not, put a No.
Can this be done?
--
RSF

  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

JE had a typo in the formula, should be

=IF(end_date - begin_date<7,"Yes","No")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"JE McGimpsey" wrote in message
...
One way:

XL stores dates as long integer offsets from a base date, so you can use
regular math on them:

=IF(end_date - begin_date)<7,"Yes","No")

In article ,
Robert wrote:

Here is what I am trying to do.

I have two columns. The values in the first column, let's call them

Begin
Date.
The values in the second column we will call End Date.

What I am trying to do is creat (in a third column) a Yes or No value

based
on the
following criteria:

If (amount of time) between Begin Date and End Date is less than 1 week,
put a value of Yes in the third column for this record. If not, put a

No.
Can this be done?



  #5   Report Post  
JE McGimpsey
 
Posts: n/a
Default

In article ,
"Bob Phillips" wrote:

JE had a typo in the formula,


Thanks for the correction!
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
Simple Date Display Question Seth Excel Discussion (Misc queries) 6 July 15th 05 07:46 PM
Another Date Question Kdub via OfficeKB.com Excel Discussion (Misc queries) 1 June 30th 05 01:09 AM
Date function question John Day Excel Discussion (Misc queries) 3 March 9th 05 03:55 PM
Date Format Question Josh O. Excel Discussion (Misc queries) 1 February 10th 05 09:45 PM
SUMPRODUCT with date range question Rob V Excel Discussion (Misc queries) 1 January 31st 05 03:55 PM


All times are GMT +1. The time now is 12:18 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"