Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 110
Default The closest "specific day" to a specific date.

In this case (of course the day will change in some cases) I want to know
what is the the closest "thursday" from a specific date.

In A1 i have 10/14/08.... in B1 i have "thursday"..... In C1 i want to know
which is the closest Thursday from A1..


The answer to this should be 10/16/08..

Is there a formula for this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default The closest "specific day" to a specific date.

A couple of questions:

What if the date in A1 *is* Thursday?

What if the date in A1 was for a Friday, would you want the Thursday date
that has just passed or do you want the *next* Thursday date?

--
Biff
Microsoft Excel MVP


"Jman" wrote in message
...
In this case (of course the day will change in some cases) I want to know
what is the the closest "thursday" from a specific date.

In A1 i have 10/14/08.... in B1 i have "thursday"..... In C1 i want to
know
which is the closest Thursday from A1..


The answer to this should be 10/16/08..

Is there a formula for this?



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 110
Default The closest "specific day" to a specific date.

1st question... If A1 is "Thursday". It shoud stay the same.
2nd question... If it is "Friday" it should be the Thursday that has
passed. The next one is too far away.

"T. Valko" wrote:

A couple of questions:

What if the date in A1 *is* Thursday?

What if the date in A1 was for a Friday, would you want the Thursday date
that has just passed or do you want the *next* Thursday date?

--
Biff
Microsoft Excel MVP


"Jman" wrote in message
...
In this case (of course the day will change in some cases) I want to know
what is the the closest "thursday" from a specific date.

In A1 i have 10/14/08.... in B1 i have "thursday"..... In C1 i want to
know
which is the closest Thursday from A1..


The answer to this should be 10/16/08..

Is there a formula for this?




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default The closest "specific day" to a specific date.

Ok, I'm not certain I understand what you want.

Maybe this:

A1 = some date
B1 = some weekday like Thursday

=MATCH(LEFT(B1,2),{"Mo","Tu","We","Th","Fr","Sa"," Su"},0)-WEEKDAY(A1,2)+A1

That will return the date of the weekday in cell B1 based on the week date
in cell A1.

--
Biff
Microsoft Excel MVP


"Jman" wrote in message
...
1st question... If A1 is "Thursday". It shoud stay the same.
2nd question... If it is "Friday" it should be the Thursday that has
passed. The next one is too far away.

"T. Valko" wrote:

A couple of questions:

What if the date in A1 *is* Thursday?

What if the date in A1 was for a Friday, would you want the Thursday date
that has just passed or do you want the *next* Thursday date?

--
Biff
Microsoft Excel MVP


"Jman" wrote in message
...
In this case (of course the day will change in some cases) I want to
know
what is the the closest "thursday" from a specific date.

In A1 i have 10/14/08.... in B1 i have "thursday"..... In C1 i want to
know
which is the closest Thursday from A1..


The answer to this should be 10/16/08..

Is there a formula for this?






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 110
Default The closest "specific day" to a specific date.

You got it as always!!!
Thanx again. :)
Jman




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default The closest "specific day" to a specific date.

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Jman" wrote in message
...
You got it as always!!!
Thanx again. :)
Jman




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
Change a specific figure i.e 0:00 and 24:00 to display as "MIDT" Jason M[_2_] Excel Discussion (Misc queries) 9 July 17th 08 02:35 PM
Validation ?:Accepting both Numbers AND specific letters("N","n"," Antonio Excel Discussion (Misc queries) 2 April 22nd 08 05:07 PM
copy specific rows using "IF" to another sheet Henry Excel Worksheet Functions 3 December 24th 07 03:41 AM
Find specific number and replace with "Yes" DW Excel Discussion (Misc queries) 1 April 26th 06 09:19 PM
"Extract" specific values from cells Portuga Excel Discussion (Misc queries) 3 March 21st 06 08:18 PM


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