Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / May 2008

Tip: Looking for answers? Try searching our database.

copy and autoadjust formula

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dimitry - 26 May 2008 22:13 GMT
I have a workbook with many consecutive sheets (one for each day)In 3
different cells (on the same location in every sheet) there is a
formula, which comes from the previous sheet. Eg: C3Tuesday='Monday!F3.
How can I copy these formulas so that they autoadjust from sheet to
sheet, and I dont have to do it manually. Thanks beforehand
Gord Dibben - 26 May 2008 22:58 GMT
If you're willing to use a User Defined Function.......

Function PrevSheet(rg As Range)
   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

=PrevSheet(F3)

Note:  you can group the worksheets from 2 onwards and enter the formula on the
activesheet.

Will be entered in all sheets except first sheet.

Gord Dibben  MS Excel MVP

>I have a workbook with many consecutive sheets (one for each day)In 3
>different cells (on the same location in every sheet) there is a
>formula, which comes from the previous sheet. Eg: C3Tuesday='Monday!F3.
>How can I copy these formulas so that they autoadjust from sheet to
>sheet, and I dont have to do it manually. Thanks beforehand
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.