Last week's Thursday in formula

waldymar

Board Regular
Joined
Feb 19, 2009
Messages
238
Dear All,

can anyone suggest a dynamic formula which will show a date of last week's Thursday?
Thanks in advance!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Try formula below

=NOW()-WEEKDAY(NOW()-5)

Use cell formatting as ddd dd/mm/yy

Biz
 
Upvote 0
Try Formatting cells as
Custom
dd/mm/yy

As I am not in USA.

Biz
 
Upvote 0
That's right, thank you, guys! Can you quickly explain me the formula?
Code:
=now()-weekday(now()-5)
Appreciate!
 
Upvote 0
Biz's looks better. I wasn't sure what you meant by last week, but here's what I came up with...
Excel Workbook
G
13Thu 08/18/2011
Sheet1
 
Upvote 0
Biz's looks better. I wasn't sure what you meant by last week, but here's what I came up with...
Sheet1


<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 101px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD></TD><TD>G</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">13</TD><TD style="TEXT-ALIGN: right">Thu 08/18/2011</TD></TR></TBODY></TABLE>


<TABLE style="BORDER-BOTTOM-STYLE: groove; BORDER-BOTTOM-COLOR: #00ff00; BORDER-RIGHT-STYLE: groove; BACKGROUND-COLOR: #fffcf9; BORDER-TOP-COLOR: #00ff00; FONT-FAMILY: Arial; BORDER-TOP-STYLE: groove; COLOR: #000000; BORDER-RIGHT-COLOR: #00ff00; FONT-SIZE: 10pt; BORDER-LEFT-STYLE: groove; BORDER-LEFT-COLOR: #00ff00"><TBODY><TR><TD>Spreadsheet Formulas</TD></TR><TR><TD><TABLE style="FONT-FAMILY: Arial; FONT-SIZE: 9pt" border=1 cellSpacing=0 cellPadding=2><TBODY><TR style="BACKGROUND-COLOR: #cacaca; FONT-SIZE: 10pt"><TD>Cell</TD><TD>Formula</TD></TR><TR><TD>G13</TD><TD>=IF(WEEKDAY(TODAY(),2)>=4,TODAY()-(7+(WEEKDAY(TODAY(),2)-4)),B7-(7-(4-WEEKDAY(TODAY(),2))))</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>


Hi GTO

What's cell B7? Today's date or any date.

Biz
 
Last edited:
Upvote 0
ACK! and Double ACK!

Sorry, substitute TODAY() for B7. I was using cell values/dates rather than TODAY() and changing the calendar when checking.
 
Upvote 0
That's right, thank you, guys! Can you quickly explain me the formula?
Code:
=now()-weekday(now()-5)
Appreciate!

Now() gives todays date.

Weekday( serial_number, return_value )

serial_number is a date expressed as a serial number or a date in quotation marks.
return_value is optional. It is the option used to display the result. It can be any of the following values:
<TABLE class=parm_values border=1 cellSpacing=0 cellPadding=4 width=348><TBODY><TR class=th_left_top><TH>Value</TH><TH>Explanation</B></TH></TR><TR class=tr_left_top><TD>1</TD><TD>Returns a number from 1 (Sunday) to 7 (Saturday). This is the default if parameter is omitted.</TD></TR><TR class=tr_left_top><TD>2</TD><TD>Returns a number from 1 (Monday) to 7 (Sunday).</TD></TR><TR class=tr_left_top><TD>3</TD><TD>Returns a number from 0 (Monday) to 6 (Sunday).</TD></TR></TBODY></TABLE>​
If this parameter is omitted, the Weekday function assumes that the return_value is set to 1.

5 return vale for Thursday. -5 means last Thursday.

Biz
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,723
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top