A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Copying and adjusting formulas



 
 
Thread Tools Display Modes
  #1  
Old August 2nd, 2008, 07:26 PM posted to microsoft.public.excel.worksheet.functions
dimitry
external usenet poster
 
Posts: 7
Default Copying and adjusting formulas

I have a workbook made of a lot of consecutive sheets( each one a date).
I use a formula [f4 of the present sheet= h4 of the previous sheet]
meaning my actual stock is the remaining o the previous. I am looking
for a way to copy the formula [and update] to consecutive sheets. At
presen I have to go one by one. Any hints? Thanks beforehand.

Dimitry
  #2  
Old August 3rd, 2008, 12:27 AM posted to microsoft.public.excel.worksheet.functions
Gord Dibben
external usenet poster
 
Posts: 20,252
Default Copying and adjusting formulas

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

=PrevSheet(H4) entered in F4

Note: you can group the worksheets from 2 onwards and enter the formula on
the activesheet.

Will be entered in all sheets except first sheet.


Gord Dibben MS Excel MVP

On Sat, 02 Aug 2008 15:26:14 -0300, dimitry wrote:

I have a workbook made of a lot of consecutive sheets( each one a date).
I use a formula [f4 of the present sheet= h4 of the previous sheet]
meaning my actual stock is the remaining o the previous. I am looking
for a way to copy the formula [and update] to consecutive sheets. At
presen I have to go one by one. Any hints? Thanks beforehand.

Dimitry


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.