Formula not updating on new sheet

%3CLINGO-SUB%20id%3D%22lingo-sub-1567196%22%20slang%3D%22en-US%22%3EFormula%20not%20updating%20on%20new%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1567196%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3EI%20have%20formula%26nbsp%3B%3DJ4-'22.07.2020'!J4%20on%20sheet%2030.07.2020%20but%20when%20i%20COPY%2030.07.2020%20and%20rename%20to%2006.08.2020%20then%20the%20formula%20remains%26nbsp%3B%3DJ4-'22.07.2020'!J4.%3C%2FP%3E%3CP%3EInstead%20it%20should%20be%20changing%20to%26nbsp%3B%3DJ4-'30.07.2020'!J4%20to%20continue%20the%20formula%20into%20the%20new%20week%20and%20ignoring%2022.07.2020.%3C%2FP%3E%3CP%3EHow%20to%20enable%20this%20feature%20because%20my%20other%20openoffice%20spreadsheet%20does%20this%20on%20its%20own%20but%20i'd%20like%20to%20continue%20working%20solely%20on%20excel%20%3F%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1567196%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1567265%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20not%20updating%20on%20new%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1567265%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F750139%22%20target%3D%22_blank%22%3E%40Ralphwork%3C%2FA%3E%26nbsp%3B%20As%20you%20noted%2C%20excel%20doesn't%20do%20that.%26nbsp%3B%20But%20from%20you%20say%20it%20sounds%20like%20you%20basically%20want%20to%20add%20the%20amount%20from%20the%20previous%20sheet.%26nbsp%3B%20The%20following%20Name%20Definition%20that%20should%20help%20you%20with%20that.%26nbsp%3B%20So%20under%20Formulas%20go%20to%20Define%20Name%20and%20give%20a%20name%20you%20want%20like%20prevJ4%2C%20keep%20the%20scope%20as%20Workbook%20(which%20is%20default)%20and%20for%20%22Refers%20to%3A%22%20paste%20this%3A%3C%2FP%3E%3CP%3E%3DINDIRECT(%22'%22%26amp%3BINDEX(GET.WORKBOOK(1)%2CSHEET()-1)%26amp%3B%22'!J4%22)%3C%2FP%3E%3CP%3EThen%20in%20your%20cell%20use%20%3D%20J4%20-%20prevJ4%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1567298%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20not%20updating%20on%20new%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1567298%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F570951%22%20target%3D%22_blank%22%3E%40mtarler%3C%2FA%3E%26nbsp%3B%20Thanks%20for%20reply.Followed%20your%20steps%20but%20got%20%23SPILL!%20error%20and%20dont%20have%20solution%20to%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1567635%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20not%20updating%20on%20new%20sheet%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1567635%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F750139%22%20target%3D%22_blank%22%3E%40Ralphwork%3C%2FA%3E%26nbsp%3B%20I%20am%20only%20seeing%20a%20%22spill%22%20happen%20on%20the%201st%20sheet%20because%20there%20is%20no%20previous%20sheet%20and%20therefore%20you%20can't%20use%20it%20on%20the%201st%20sheet.%26nbsp%3B%20If%20you%20want%20you%20could%20change%20the%20Named%20Function%20to%3A%3C%2FP%3E%3CP%3E%3DIF(SHEET()%3D1%2C0%2CINDIRECT(%22'%22%26amp%3BINDEX(GET.WORKBOOK(1)%2CSHEET()-1)%26amp%3B%22'!J4%22))%3C%2FP%3E%3CP%3Ewhich%20will%20force%20a%200%20if%20you%20try%20to%20use%20it%20on%20the%201st%20sheet%20in%20the%20workbook.%3C%2FP%3E%3CP%3EREMEMBER%3A%20this%20is%20not%20getting%20some%20arbitrary%20sheet%2C%20it%20is%20specifically%20getting%20the%20value%20of%20J4%20from%20the%20PREVIOUS%20sheet%20in%20the%20workbook.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi

I have formula =J4-'22.07.2020'!J4 on sheet 30.07.2020 but when i COPY 30.07.2020 and rename to 06.08.2020 then the formula remains =J4-'22.07.2020'!J4.

Instead it should be changing to =J4-'30.07.2020'!J4 to continue the formula into the new week and ignoring 22.07.2020.

How to enable this feature because my other openoffice spreadsheet does this on its own but i'd like to continue working solely on excel ?

Regards

3 Replies

@Ralphwork  As you noted, excel doesn't do that.  But from you say it sounds like you basically want to add the amount from the previous sheet.  The following Name Definition that should help you with that.  So under Formulas go to Define Name and give a name you want like prevJ4, keep the scope as Workbook (which is default) and for "Refers to:" paste this:

=INDIRECT("'"&INDEX(GET.WORKBOOK(1),SHEET()-1)&"'!J4")

Then in your cell use = J4 - prevJ4 

@mtarler  Thanks for reply.Followed your steps but got #SPILL! error and dont have solution to it.

 

@Ralphwork  I am only seeing a "spill" happen on the 1st sheet because there is no previous sheet and therefore you can't use it on the 1st sheet.  If you want you could change the Named Function to:

=IF(SHEET()=1,0,INDIRECT("'"&INDEX(GET.WORKBOOK(1),SHEET()-1)&"'!J4"))

which will force a 0 if you try to use it on the 1st sheet in the workbook.

REMEMBER: this is not getting some arbitrary sheet, it is specifically getting the value of J4 from the PREVIOUS sheet in the workbook.