A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Formula for week ending



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2009, 05:40 PM posted to microsoft.public.excel.worksheet.functions
Nelix
external usenet poster
 
Posts: 1
Default Formula for week ending

Hi

I am putting together a time sheet to record working times from week to
week, I have a cell that contains the week ending date using the following
formula:

=TODAY()-WEEKDAY(TODAY(),2)+7

I need to make this cell only update if the file is saved, basically so that
if I open an old timesheet from say last week it wont change the week ending
date to this weeks.

Does that make sense?? lol

Hope someone can help
  #2  
Old April 10th, 2009, 05:52 PM posted to microsoft.public.excel.worksheet.functions
Sheeloo[_5_]
external usenet poster
 
Posts: 239
Default Formula for week ending

The only way to do that is to convert the formula to a value before saving...
i.e Copy and then Paste Special | Values

You can record a macro while doing that and then run that macro whenever you
want...
-------------------------------------
Pl. click ''''Yes'''' if this was helpful...



"Nelix" wrote:

Hi

I am putting together a time sheet to record working times from week to
week, I have a cell that contains the week ending date using the following
formula:

=TODAY()-WEEKDAY(TODAY(),2)+7

I need to make this cell only update if the file is saved, basically so that
if I open an old timesheet from say last week it wont change the week ending
date to this weeks.

Does that make sense?? lol

Hope someone can help

  #3  
Old April 10th, 2009, 06:20 PM posted to microsoft.public.excel.worksheet.functions
Bernd P
external usenet poster
 
Posts: 613
Default Formula for week ending

Hello,

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Range("A1") = Application.WorksheetFunction.Floor(CLng(Date) + 5,
7) + 1
End Sub


Regards,
Bernd
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.