Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default The Monday of the previous week with VBA

Hello,

I have a date from Monday to Friday in the current week. I need to calculate
the date of the Monday of the previous week in VBA.
How can I do that ?
Thanks a lot

Gérard


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default The Monday of the previous week with VBA

=A1-WEEKDAY(A1,2)+1

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Gérard Ducouret" wrote in message
...
Hello,

I have a date from Monday to Friday in the current week. I need to

calculate
the date of the Monday of the previous week in VBA.
How can I do that ?
Thanks a lot

Gérard




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default The Monday of the previous week with VBA

Date-(weekday(date,2)+6)

--
Regards,
Tom Ogilvy


"Gérard Ducouret" wrote in message
...
Hello,

I have a date from Monday to Friday in the current week. I need to

calculate
the date of the Monday of the previous week in VBA.
How can I do that ?
Thanks a lot

Gérard




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default The Monday of the previous week with VBA

Thanks a lot Tom!
That works !

Gérard

"Tom Ogilvy" a écrit dans le message de
...
Date-(weekday(date,2)+6)

--
Regards,
Tom Ogilvy


"Gérard Ducouret" wrote in message
...
Hello,

I have a date from Monday to Friday in the current week. I need to

calculate
the date of the Monday of the previous week in VBA.
How can I do that ?
Thanks a lot

Gérard






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
WEEKNUM change start of week to a monday The Rook[_2_] Excel Discussion (Misc queries) 1 September 3rd 08 09:15 PM
Display Monday of each week Eileen[_2_] Excel Discussion (Misc queries) 2 June 26th 08 02:23 PM
Changing First day of week to Monday (Excel 2007) ttt980 Excel Discussion (Misc queries) 4 March 30th 08 09:53 PM
date of monday of each week automatically mturner Excel Discussion (Misc queries) 0 January 5th 06 04:23 PM
How can I get the monday of a given week number? Gino Excel Discussion (Misc queries) 2 December 30th 05 06:45 AM


All times are GMT +1. The time now is 04:17 AM.

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"