#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Last friday


Hi,

How can I get last friday from today() in vba?

Thx


--
gabch
------------------------------------------------------------------------
gabch's Profile: http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=547383

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Last friday

Depends when you consider your week to start, but

=TODAY()-WEEKDAY(TODAY())-1

Should probably do you. Weekday has various options for teh first day of the
week.

Jeff

"gabch" wrote in
message ...

Hi,

How can I get last friday from today() in vba?

Thx


--
gabch
------------------------------------------------------------------------
gabch's Profile:
http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=547383



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Last friday

lastFriday = date-(weekday(date,vbFriday)-1)

HTH
--
AP

"gabch" a écrit dans le
message de news: ...

Hi,

How can I get last friday from today() in vba?

Thx


--
gabch
------------------------------------------------------------------------
gabch's Profile:
http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=547383



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Last friday

=TODAY()-CHOOSE(WEEKDAY(TODAY()),2,3,4,5,6,0,1)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"gabch" wrote in
message ...

Hi,

How can I get last friday from today() in vba?

Thx


--
gabch
------------------------------------------------------------------------
gabch's Profile:

http://www.excelforum.com/member.php...o&userid=30662
View this thread: http://www.excelforum.com/showthread...hreadid=547383



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
Formula to display next Friday from B1 works except on the Friday itself. StargateFan[_2_] Excel Discussion (Misc queries) 4 August 11th 11 09:20 AM
Second Friday Deb Excel Worksheet Functions 4 January 26th 07 02:41 PM
How can I get a row to display the date of the last friday, and every friday before that? [email protected] Excel Programming 1 April 10th 06 07:42 PM
Friday Winston New Users to Excel 16 October 30th 05 12:12 PM
Finding Friday Arlen Excel Discussion (Misc queries) 1 January 23rd 05 05:08 AM


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