Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
mattylance
 
Posts: n/a
Default Linking a cell to the previous tab?


I do production planning and I want a tab to represent each week. Wk1
closing inventory feeds to wk 2 opening inventory and so on.

It is easy to set this up manually, but I would like to be able to have
a template tab with the formula always linking to the previous tab.
Therefore, when I want to setup wk 3, I want to be able to copy and
paste the default tab, and have it automatically link to the previous
tab.

This would save me a whole lot of time each week. Anybody have
suggestions?


--
mattylance
------------------------------------------------------------------------
mattylance's Profile: http://www.excelforum.com/member.php...o&userid=35070
View this thread: http://www.excelforum.com/showthread...hreadid=548109

  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben
 
Posts: n/a
Default Linking a cell to the previous tab?

You could use this User Defined Function.

Function PrevSheet(rg As Range)
'Enter =PrevSheet(B2) on sheet2 and you'll get B2 from sheet1.
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


Gord Dibben MS Excel MVP

On Sat, 3 Jun 2006 09:07:55 -0500, mattylance
wrote:


I do production planning and I want a tab to represent each week. Wk1
closing inventory feeds to wk 2 opening inventory and so on.

It is easy to set this up manually, but I would like to be able to have
a template tab with the formula always linking to the previous tab.
Therefore, when I want to setup wk 3, I want to be able to copy and
paste the default tab, and have it automatically link to the previous
tab.

This would save me a whole lot of time each week. Anybody have
suggestions?


Gord Dibben MS Excel MVP
  #3   Report Post  
Posted to microsoft.public.excel.misc
mattylance
 
Posts: n/a
Default Linking a cell to the previous tab?


I can't tell you how much time this is going to save me!

Thanks again for your help.


--
mattylance
------------------------------------------------------------------------
mattylance's Profile: http://www.excelforum.com/member.php...o&userid=35070
View this thread: http://www.excelforum.com/showthread...hreadid=548109

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
linking a cell containing text to another cell containing text / data gin2000 Excel Discussion (Misc queries) 5 May 19th 06 09:08 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 05:05 PM.

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"