Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,069
Default Copy date formula to multiple sheets

I am trying to setup a workbook with 52 sheets (1 per week). I put 11/18/06
in sheet1!a1, then goto sheet2!a1 and enter the formula +sheet1!a1+7. The
result is 11/25/06. But when I copy sheet2!a1 to sheet3!a1, the result is
still 11/25/06, it should be 12/02/06.
--
John
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 618
Default Copy date formula to multiple sheets

If your formula in sheet 3 is saying sheet1!a1+7, that will still be
11/25/06.
--
David Biddulph

"John" wrote in message
...
I am trying to setup a workbook with 52 sheets (1 per week). I put
11/18/06
in sheet1!a1, then goto sheet2!a1 and enter the formula +sheet1!a1+7. The
result is 11/25/06. But when I copy sheet2!a1 to sheet3!a1, the result is
still 11/25/06, it should be 12/02/06.
--
John



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Copy date formula to multiple sheets

John

You can ease your task considerably if you employ a User Defined Function.

Function PrevSheet(rg As Range)
Application.Volatile
n = Application.Caller.Parent.Index
If n = 1 Then
PrevSheet = CVErr(xlErrRef)
ElseIf TypeName(Sheets(n - 1)) = "Chart" Then
PrevSheet = CVErr(xlErrNA)
Else
PrevSheet = Sheets(n - 1).Range(rg.Address).Value
End If
End Function

Copy/paste this to a General Module in your workbook.

In sheet1 A1 enter a date.

Select sheet2 then SHIFT + Click on sheet52.

In A1 of sheet2 enter =PrevSheet(A1) + 7

Select sheet1 again to ungroup the sheets.


Gord Dibben MS Excel MVP

On Wed, 22 Nov 2006 13:29:01 -0800, John wrote:

I am trying to setup a workbook with 52 sheets (1 per week). I put 11/18/06
in sheet1!a1, then goto sheet2!a1 and enter the formula +sheet1!a1+7. The
result is 11/25/06. But when I copy sheet2!a1 to sheet3!a1, the result is
still 11/25/06, it should be 12/02/06.


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
Sum by date rage using multiple sheets Michael Excel Discussion (Misc queries) 3 March 24th 06 11:51 PM
How do I copy a reference formula onto multiple worksheets Nina@ramaz Excel Worksheet Functions 1 July 21st 05 03:39 PM
How to copy and paste same formula in multiple cells? Amanda Excel Worksheet Functions 1 June 30th 05 04:16 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
How do I protect formula cells on multiple sheets? Webdiva Excel Worksheet Functions 0 May 3rd 05 08:29 PM


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