What would be the easiest, and/or best way to make exact copies of my
worksheets so the totals from the first will be forwarded onto the next, so I
can keep a running total from page to page? Right now I have used the
copygt;pastegt;link cells method, but I manually have to update each link to
refer to the last page used, and not the first.Thanks again.....Ben
Just linking to your quest in hopes of a reply...(~;
quot;ben simpsonquot; wrote:
gt; What would be the easiest, and/or best way to make exact copies of my
gt; worksheets so the totals from the first will be forwarded onto the next, so I
gt; can keep a running total from page to page? Right now I have used the
gt; copygt;pastegt;link cells method, but I manually have to update each link to
gt; refer to the last page used, and not the first.Thanks again.....Ben
Ben/Carole
Here's a User Defined Function to store in a General Module.
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)) = quot;Chartquot; Then
PrevSheet = CVErr(xlErrNA)
Else
PrevSheet = Sheets(n - 1).Range(rg.Address).Value
End If
End Function
Group sheet2 through sheetx and in A1(or your choice) enter the formula
=PrevSheet(L16) to replicate across sheets.
DO NOT FORGET to ungroup sheets when done.
If not familiar with VBA and macros, see David McRitchie's site for more on
quot;getting startedquot;.
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 Insertgt;Module. Paste the above code in there. Save the
workbook and hit ALT Q to return to your workbook.
Enter the formula as instructed above.Gord Dibben Excel MVP
On Thu, 16 Mar 2006 16:15:27 -0800, Carole Drake
gt; wrote:
gt;Just linking to your quest in hopes of a reply...(~;
gt;
gt;quot;ben simpsonquot; wrote:
gt;
gt;gt; What would be the easiest, and/or best way to make exact copies of my
gt;gt; worksheets so the totals from the first will be forwarded onto the next, so I
gt;gt; can keep a running total from page to page? Right now I have used the
gt;gt; copygt;pastegt;link cells method, but I manually have to update each link to
gt;gt; refer to the last page used, and not the first.Thanks again.....Ben
Gord Dibben MS Excel MVP
Biig Siiiigh!
OK, I think I copied it and followed the instructions, but if I enter
=PrevSheet(B2) on sheet2, what it does is give me the formula =PrevSheet(B2)
on sheet1 and what shows is each is #NAME?
What am I doing wrong? Can you tell?
quot;Gord Dibbenquot; wrote:
gt; Ben/Carole
gt;
gt; Here's a User Defined Function to store in a General Module.
gt;
gt; Function PrevSheet(rg As Range)
gt; 'Enter =PrevSheet(B2) on sheet2 and you'll get B2 from sheet1.
gt; n = Application.Caller.Parent.Index
gt; If n = 1 Then
gt; PrevSheet = CVErr(xlErrRef)
gt; ElseIf TypeName(Sheets(n - 1)) = quot;Chartquot; Then
gt; PrevSheet = CVErr(xlErrNA)
gt; Else
gt; PrevSheet = Sheets(n - 1).Range(rg.Address).Value
gt; End If
gt; End Function
gt;
gt; Group sheet2 through sheetx and in A1(or your choice) enter the formula
gt;
gt; =PrevSheet(L16) to replicate across sheets.
gt;
gt; DO NOT FORGET to ungroup sheets when done.
gt;
gt; If not familiar with VBA and macros, see David McRitchie's site for more on
gt; quot;getting startedquot;.
gt;
gt; www.mvps.org/dmcritchie/excel/getstarted.htm
gt;
gt; In the meantime..........
gt;
gt; To create a General Module, hit ALT F11 to open the Visual Basic Editor.
gt;
gt; Hit CRTL R to open Project Explorer.
gt;
gt; Find your workbook/project and select it.
gt;
gt; Right-click and Insertgt;Module. Paste the above code in there. Save the
gt; workbook and hit ALT Q to return to your workbook.
gt;
gt; Enter the formula as instructed above.
gt;
gt;
gt; Gord Dibben Excel MVP
gt;
gt;
gt;
gt;
gt; On Thu, 16 Mar 2006 16:15:27 -0800, Carole Drake
gt; gt; wrote:
gt;
gt; gt;Just linking to your quest in hopes of a reply...(~;
gt; gt;
gt; gt;quot;ben simpsonquot; wrote:
gt; gt;
gt; gt;gt; What would be the easiest, and/or best way to make exact copies of my
gt; gt;gt; worksheets so the totals from the first will be forwarded onto the next, so I
gt; gt;gt; can keep a running total from page to page? Right now I have used the
gt; gt;gt; copygt;pastegt;link cells method, but I manually have to update each link to
gt; gt;gt; refer to the last page used, and not the first.Thanks again.....Ben
gt;
gt; Gord Dibben MS Excel MVP
gt;
- Jun 04 Wed 2008 20:44
Worksheets in series
close
全站熱搜
留言列表
發表留言
留言列表

