Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default need a function (UDF) return X if 2 dates fall between 2 other dates

what I need is to resolve the following:

Start Date End Date 11/1/09 11/8/09 11/15/09
11/22/09 11/29/09 12/6/09
11/3/09 12/30/09 X
X X X X
11/9/09 12/07/09
X X X X X
11/10/09 12/25/09
X X X

This is kind of a poor mans gant chart

Any help would be appreciated....
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,389
Default need a function (UDF) return X if 2 dates fall between 2 other dates

Try:
=IF(AND($C1=A$2,$C1<=B$2),"X","")

Regards,
Fred

"Chris Salcedo" wrote in message
...
what I need is to resolve the following:

Start Date End Date 11/1/09 11/8/09 11/15/09
11/22/09 11/29/09 12/6/09
11/3/09 12/30/09 X
X X X X
11/9/09 12/07/09
X X X X X
11/10/09 12/25/09
X X X

This is kind of a poor mans gant chart

Any help would be appreciated....


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default need a function (UDF) return X if 2 dates fall between 2 other dat

Hi Chris,

put the following formula in cell C2:

=IF(OR(AND($A2=C$1,$A2<D$1),AND($B2=C$1,$B2<D$1) ,AND($A2<C$1,$B2C$1)),"X","")

Copy the formula for the rest of the cells.
A B C D E
1 Start Date End Date 11/1/2009 11/8/2009 11/15/2009
2 11/3/09 12/30/09 X X X
3 11/9/09 12/7/09 X X
4 11/10/09 12/25/09 X X

--
If this post helps click Yes
---------------
Peggy Shepard


"Chris Salcedo" wrote:

what I need is to resolve the following:

Start Date End Date 11/1/09 11/8/09 11/15/09
11/22/09 11/29/09 12/6/09
11/3/09 12/30/09 X
X X X X
11/9/09 12/07/09
X X X X X
11/10/09 12/25/09
X X X

This is kind of a poor mans gant chart

Any help would be appreciated....

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default need a function (UDF) return X if 2 dates fall between 2 otherdat

On Sep 1, 7:11*pm, pshepard (donotspam)
wrote:
Hi Chris,

put the following formula in cell C2:

=IF(OR(AND($A2=C$1,$A2<D$1),AND($B2=C$1,$B2<D$1) ,AND($A2<C$1,$B2C$1)),"X","")

Copy the formula for the rest of the cells.
* * * * A * * * B * * * * * * * C * * * D * * * E
1 * * * Start Date * * *End Date * * * * * * * *11/1/2009 * * * 11/8/2009 * * * 11/15/2009
2 * * * 11/3/09 12/30/09 * * * * * * * *X * * * X * * * X
3 * * * 11/9/09 12/7/09 * * * * * * * * X * * * X
4 * * * 11/10/09 * * * *12/25/09 * * * * * * * * * * * *X * * * X

--
If this post helps click Yes
---------------
Peggy Shepard

"Chris *Salcedo" wrote:
what I need is to resolve the following:


Start Date * End Date * * * * * 11/1/09 * * 11/8/09 * * *11/15/09
11/22/09 * *11/29/09 * *12/6/09
11/3/09 * * * 12/30/09 * * * * * * * * X
X * * * * * * * X * * * * * * X * * * * * * *X
11/9/09 * * * 12/07/09
X * * * * * * * X * * * * * * X * * * * * * *X * * * * * * X
11/10/09 * * 12/25/09
X * * * * * * * X * * * * * * X


This is kind of a poor mans gant chart


Any help would be appreciated....


Thanks Fred and Peggy,
Fred yours did not quite work correctly but Peggy yours worked
perfectly...

Thanks both of you for your help ......

Chris
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default need a function (UDF) return X if 2 dates fall between 2 other

Hi Chris,

You are welcome. Would you mind indicating that this was helpful by clicking
Yes?

Thanks,

Peggy Shepard


"Chris Salcedo" wrote:

On Sep 1, 7:11 pm, pshepard (donotspam)
wrote:
Hi Chris,

put the following formula in cell C2:

=IF(OR(AND($A2=C$1,$A2<D$1),AND($B2=C$1,$B2<D$1) ,AND($A2<C$1,$B2C$1)),"X","")

Copy the formula for the rest of the cells.
A B C D E
1 Start Date End Date 11/1/2009 11/8/2009 11/15/2009
2 11/3/09 12/30/09 X X X
3 11/9/09 12/7/09 X X
4 11/10/09 12/25/09 X X

--
If this post helps click Yes
---------------
Peggy Shepard

"Chris Salcedo" wrote:
what I need is to resolve the following:


Start Date End Date 11/1/09 11/8/09 11/15/09
11/22/09 11/29/09 12/6/09
11/3/09 12/30/09 X
X X X X
11/9/09 12/07/09
X X X X X
11/10/09 12/25/09
X X X


This is kind of a poor mans gant chart


Any help would be appreciated....


Thanks Fred and Peggy,
Fred yours did not quite work correctly but Peggy yours worked
perfectly...

Thanks both of you for your help ......

Chris

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
Return a Value between dates based on another Value casey Excel Worksheet Functions 3 August 25th 09 04:38 PM
return a sum between two dates The Fru Fru Excel Worksheet Functions 4 December 8th 08 01:32 PM
Return the dates something happens louiscourtney Excel Worksheet Functions 0 December 12th 06 03:00 PM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
how would I count dates (not # of days) in cells that fall betwee. sailingscotts Excel Worksheet Functions 3 August 16th 05 04:29 AM


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