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 / New Users / July 2007

Tip: Looking for answers? Try searching our database.

transfer a variable balance from one worksheet to the next

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cariad 61 - 31 Jul 2007 21:12 GMT
I have recently started using Excel to manage my monthly budget.  I have
successfully set up monthly worksheets, but would like to carry forward the
final balance from one month to the next.  This will be a variable balance.  
I know that probably the easy way out would be to simply copy and paste, but
if there is a function which would do this, I would like to know about it !!
RJ - 31 Jul 2007 21:18 GMT
I am assuming you have a new worksheet for each month. On the latest Months
worksheet on the beginning balance line you should put a formula to reference
the ending balance from the last months.

For example if the last months worksheet was Sheet1 and the ending balance
was on cell B20 then on the new months worksheet in the cell that you want
the ending balance from last month type the following formula

=Sheet1!B20

> I have recently started using Excel to manage my monthly budget.  I have
> successfully set up monthly worksheets, but would like to carry forward the
> final balance from one month to the next.  This will be a variable balance.  
> I know that probably the easy way out would be to simply copy and paste, but
> if there is a function which would do this, I would like to know about it !!
Gord Dibben - 31 Jul 2007 22:04 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

Say you have 20 sheets,  sheet1 through sheet20...........sheet names don't
matter.

Select second sheet and SHIFT + Click last sheet

In active sheet B1 enter =PrevSheet(A1)

Ungroup the sheets.

Each B1 will have the contents of the previous sheet's A1

Copy/paste the UDF above into a General Module in your workbook.

If not familiar with macros and VBA, visit David McRitchie's website on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module.  Paste the above code in there.  Save the
workbook and hit ALT + Q to return to your workbook.

Gord Dibben Excel MVP

>I have recently started using Excel to manage my monthly budget.  I have
>successfully set up monthly worksheets, but would like to carry forward the
>final balance from one month to the next.  This will be a variable balance.  
>I know that probably the easy way out would be to simply copy and paste, but
>if there is a function which would do this, I would like to know about it !!
Gordon - 31 Jul 2007 22:24 GMT
> If you're willing to use a User Defined Function.......
>
[quoted text clipped - 8 lines]
>    End If
> End Function

Eh? All the Op wants to do is to replicate the total in one cell from one
sheet into a cell on the next......
So in Sheet 2 enter the formula =Sheet1!C14 in the cell you want the b/fwd
balance to appear.... KISS!
Gord Dibben - 31 Jul 2007 23:28 GMT
Which you then have to do for 12 sheets.

If that suits you, go ahead but I don't consider that as KISS

I would rather do all sheets at once.

Gord Dibben  MS Excel MVP

>Eh? All the Op wants to do is to replicate the total in one cell from one
>sheet into a cell on the next......
>So in Sheet 2 enter the formula =Sheet1!C14 in the cell you want the b/fwd
>balance to appear.... KISS!

Rate this thread:






 
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.