Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default reference to previous worksheet

Hi,

how do I reference a cell (say f39) in the previous worksheet? I want to
accumulate values from each worksheet to the next one. Something like
=$previous_sheet$f39+sum(f1:f38)
Thanks!
--

Daniel


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default reference to previous worksheet

Assuming you don't want to specify the name explicitly, but use a formula to
derive it:
There is no specific support for this. If you sheets have some type of
sequence inherent in the name, you could parse out the sequence of the
current sheet using Cells("filename",A1) as a start, then subtract 1 from
that and build the previous sheet name.

--
Regards,
Tom Ogilvy

"Daniel Lidström" wrote in message
...
Hi,

how do I reference a cell (say f39) in the previous worksheet? I want to
accumulate values from each worksheet to the next one. Something like
=$previous_sheet$f39+sum(f1:f38)
Thanks!
--

Daniel




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default reference to previous worksheet

Daniel

User Defined Function.......

'in sheet2, enter =Prev("C3")+C3
'which would add C3 from sheet1 to C3 of sheet2. If you
'filled this thru all 30 tabs, each would refer to the previous sheet.

Function Prev(rg As String)
Application.Volatile True
If Application.Caller.Parent.Index = 1 Then
Prev = 0
Else
Prev = Sheets(Application.Caller.Parent.Index - 1).Range(rg).Value
End If
End Function

In your specific case.......

=Prev("F9")+SUM(F1:F38)

Gord Dibben Excel MVP

On Tue, 16 Dec 2003 14:22:49 +0100, "Daniel Lidström"
wrote:

Hi,

how do I reference a cell (say f39) in the previous worksheet? I want to
accumulate values from each worksheet to the next one. Something like
=$previous_sheet$f39+sum(f1:f38)
Thanks!


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
Reference previous worksheet within VLOOKUP Alex Mackenzie Excel Worksheet Functions 2 April 17th 09 07:20 PM
How can I reference a cell on a previous worksheet Kim Excel Discussion (Misc queries) 3 August 18th 08 12:10 PM
formula to reference cell on previous worksheet endless_thoughts17 Excel Worksheet Functions 2 January 25th 08 07:37 PM
Reference Previous Worksheet Built-in Function [email protected] Excel Worksheet Functions 1 July 6th 07 04:03 PM
How to reference to the previous worksheet regardless of title? SeabeePlumber Excel Worksheet Functions 0 July 15th 05 11:05 AM


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