Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Link to previous tab
I have a cell in my worksheet which links to the previous worksheet. i.e I'm
in Nov 08 and the cell looks at a cell in Oct 08 sheet. Whenever I copy this sheet to create the next month, I have to update the link to the previous month's sheet. =Oct 08!A4 must be changed to Nov 08!A4. Can I create a formula which will do =[cell one to the left]!A4? Thanks Maria :) |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Link to previous tab
Try
=INDIRECT("'"&TEXT(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,256)-31,"mmm yy")&"'!A4") This will fail in Jan '09, Jan '10 etc. as it does not take care of the year change. Though it mentions A1 it is not impacted by the value in A1... as long as the value there is not #ERROR, #N/A etc. Try to modify it to take care of Year change... "Ugnz" wrote: I have a cell in my worksheet which links to the previous worksheet. i.e I'm in Nov 08 and the cell looks at a cell in Oct 08 sheet. Whenever I copy this sheet to create the next month, I have to update the link to the previous month's sheet. =Oct 08!A4 must be changed to Nov 08!A4. Can I create a formula which will do =[cell one to the left]!A4? Thanks Maria :) |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Link to previous tab
If you're willing to use a User Defined Function which ignores sheet names.
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(A4) Gord Dibben MS Excel MVP On Thu, 30 Oct 2008 16:39:01 -0700, Ugnz wrote: I have a cell in my worksheet which links to the previous worksheet. i.e I'm in Nov 08 and the cell looks at a cell in Oct 08 sheet. Whenever I copy this sheet to create the next month, I have to update the link to the previous month's sheet. =Oct 08!A4 must be changed to Nov 08!A4. Can I create a formula which will do =[cell one to the left]!A4? Thanks Maria :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy two linked sheets, and update the link isn't to the previous | Excel Discussion (Misc queries) | |||
VBA Link - Previous post unclear | Excel Discussion (Misc queries) | |||
Previous Documents | Excel Discussion (Misc queries) | |||
if i sort cell that has link to another page how to keep link | Excel Discussion (Misc queries) | |||
if i sort cell that has link to another page how to keep link | Excel Discussion (Misc queries) |