Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default equivalent nīth day in a month

Hi ,

Appreciate if somebody can help with a formula to retrieve, given a
date, the equivalent one last year. An example:

today is Dec 19 th, 2005 which is the third monday of this month, then
my formula should give me: Dec 20 th, 2004 (the third monday of Dec.
last year)

I will use later this value in a vlookup construction to retrieve other
info. In this case I donīt want to use vba.

Rgds
Mika

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default equivalent nīth day in a month

Try a formula like the following:

=DATE(Yr,mon,1+((Nth-(dow=WEEKDAY(DATE(Yr,mon,1))))*7)+(dow-WEEKDAY(DATE(Yr,mon,1))))

Where Yr is the year, Mon is the month number, Nth is which day
you want (3 in your example, 3rd Monday), and Dow is the day of
week number (1 = Sunday, 7 = Saturday).


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Mika" wrote in message
oups.com...
Hi ,

Appreciate if somebody can help with a formula to retrieve, given
a
date, the equivalent one last year. An example:

today is Dec 19 th, 2005 which is the third monday of this month,
then
my formula should give me: Dec 20 th, 2004 (the third monday of
Dec.
last year)

I will use later this value in a vlookup construction to retrieve
other
info. In this case I donīt want to use vba.

Rgds
Mika


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 48
Default equivalent nīth day in a month

Thanks a lot, that was quick Chip, and actually I read it from your
site but I can not figure out yet how to use for my case, as your
formula requires that you imput if what day of the week is (moday,
friday.etc). I am going to use it in a range with different dates...


Mika

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default equivalent nÂīth day in a month

Something like this?

=A1-52*7

Where the date is in cell A1. This number is 52 weeks back from the target
date.
--
HTH...

Jim Thomlinson


"Mika" wrote:

Hi ,

Appreciate if somebody can help with a formula to retrieve, given a
date, the equivalent one last year. An example:

today is Dec 19 th, 2005 which is the third monday of this month, then
my formula should give me: Dec 20 th, 2004 (the third monday of Dec.
last year)

I will use later this value in a vlookup construction to retrieve other
info. In this case I donÂīt want to use vba.

Rgds
Mika


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default equivalent nīth day in a month

On Mon, 19 Dec 2005 14:56:02 -0800, "Jim Thomlinson"
wrote:

Something like this?

=A1-52*7

Where the date is in cell A1. This number is 52 weeks back from the target
date.


Won't work. Try for example 01/01/2004.


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default equivalent nīth day in a month

On 19 Dec 2005 14:42:38 -0800, "Mika" wrote:

Hi ,

Appreciate if somebody can help with a formula to retrieve, given a
date, the equivalent one last year. An example:

today is Dec 19 th, 2005 which is the third monday of this month, then
my formula should give me: Dec 20 th, 2004 (the third monday of Dec.
last year)

I will use later this value in a vlookup construction to retrieve other
info. In this case I donīt want to use vba.

Rgds
Mika


What do you expect to retrieve, when your start day is for eample the
fifth Saturday in a month (e.g., Jan 29 2005) but Jan 2006 has only 4
saturdays?

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default equivalent nīth day in a month

See response in public.excel

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Mika" wrote in message
oups.com...
Hi ,

Appreciate if somebody can help with a formula to retrieve, given a
date, the equivalent one last year. An example:

today is Dec 19 th, 2005 which is the third monday of this month, then
my formula should give me: Dec 20 th, 2004 (the third monday of Dec.
last year)

I will use later this value in a vlookup construction to retrieve other
info. In this case I donīt want to use vba.

Rgds
Mika


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
=month() function equivalent for fiscal calendar Jon Ratzel[_2_] Excel Worksheet Functions 1 March 11th 08 08:45 PM
Excel 2003 month to month data change grid Chad[_2_] Excel Discussion (Misc queries) 2 February 15th 08 01:36 AM
copy worksheet from previous month and rename to current month Dan E. Excel Programming 4 December 8th 05 09:40 PM
transfer cell $ amount to other sheet month-to-month without overc Colin2u Excel Discussion (Misc queries) 1 July 28th 05 02:36 AM
Equivalent Of VAL davidm Excel Programming 4 July 27th 05 06:22 PM


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