LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 621
Default Carry over YTD balance to next worksheet

Just something to think about.

Here is a UDF that returns values from the previous sheet.

Function PrevSheet(rg As Range)
'accounts for more than one workbook open
'and has hidden sheets
'Bob Phillips October 4, 2009
Dim n As Variant
With Application.Caller.Parent
n = .Index
Do
If n = 1 Then
PrevSheet = CVErr(xlErrRef)
Exit Do
ElseIf TypeName(.Parent.Sheets(n - 1)) < "Chart" And _
.Parent.Sheets(n - 1).Visible = xlSheetVisible Then
PrevSheet = .Parent.Sheets(n - 1).Range(rg.Address).Value
Exit Do
End If
n = n - 1
Loop
End With
End Function

usage is: =prevsheet(cellref)


Gord



On Wed, 8 Jan 2014 12:40:03 +0000, jackreacher
wrote:


'joeu2004[_2_ Wrote:
;1615617']"jackreacher" wrote:-
I am using Excel 2003. I have a workbook to keep track
of daily expense/revenue figures. I have a different
worksheet for each month. At the end of each month I
total each revenue and expense item. I want to have a
year to date figure for each column that carries over
to the next worksheet. How do I do this?-


If you are willing to put the subtotals for each month into the same
fixed
cell on all worksheets, the solution can be simple. The easiest place
is
row 1 (subtotals on top, not on the bottom). That's also most
convenient
for the human "computer". For example:

=SUM(Sheet1:Sheet12!B1)-SUM(Sheet1:Sheet12!C1)

where B1 is the subtotal of revenues and C1 is the subtotal of
expenses.

Note: Very few functions allow "3D references" like Sheet1:Sheet12!B1.
SUM
is one of them.

If you insist on putting the subtotals into difference cells on each
worksheet, there are more robust ways to deal with it. But why bother?

"Everything should be as simple as possible, but not simpler"
(Einstein).


Let me clarify. All the monthly worksheets are formatted the same. C39
is the monthly total of revenue. There are three monthly expense totals,
E39, F39, I39. Net revenue is K39. I want to keep these monthly totals
and have another row that keeps a YTD total for each category that
carries over into the other worksheets.



 
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
How to carry Excel balance on 1 w/s to another? SamZ Excel Worksheet Functions 1 March 26th 10 03:34 PM
how do i carry a balance to next row without it continuing down? Modine Charts and Charting in Excel 0 June 19th 08 11:53 PM
Add additional lines in worksheet & carry over to adjoining worksh roxiemayfield Excel Discussion (Misc queries) 0 December 4th 07 10:18 PM
how to carry balances from one worksheet to another silverdw Excel Discussion (Misc queries) 2 July 3rd 06 03:55 PM
How can I format a worksheet to carry out all calculations to 2 d. Phill Barrett Excel Discussion (Misc queries) 2 January 5th 05 01:05 PM


All times are GMT +1. The time now is 10:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"