SOLVED

How can I get a formula to NOT update when I move some of the target data?

%3CLINGO-SUB%20id%3D%22lingo-sub-1378334%22%20slang%3D%22en-US%22%3EHow%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1378334%22%20slang%3D%22en-US%22%3E%3CP%3EI%20built%20a%20simple%20budget%20spreadsheet%20that%20keeps%20track%20of%20my%20account%20balance.%20Currently%2C%20if%20I%20move%20the%20target%20data%2C%20the%20formula%20next%20to%20it%20wants%20to%20follow%20that%20data.%20How%20can%20I%20prevent%20that%20from%20happening%20so%20the%20formula%20in%20D8%20always%20refers%20to%20C8%2C%20even%20if%20I%20move%20the%20data%20in%20C8%20to%20a%20different%20location%20and%20replace%20it%20with%20something%20new%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1378334%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1378438%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1378438%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F662599%22%20target%3D%22_blank%22%3E%40RC_in_MN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20use%20Cut%20and%20Paste%20to%20move%20a%20value%20the%20formula%20in%20another%20cell%20will%20follow%20the%20target%20cell%20to%20its%20new%20location.%20If%20you%20use%20Copy%20and%20Paste%2C%20it%20won't.%20But%20you'll%20have%20to%20go%20back%20and%20delete%20the%20value%20in%20the%20original%20cell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhy%20does%20this%20happen%3F%20With%20Cut%20and%20Paste%2C%20the%20assumption%20is%20that%20you're%20reorganizaing%20the%20layout%20of%20the%20sheet.%20(I%20say%20as%20a%20layman%20in%20the%20field%3B%20I%20don't%20actually%20know%20the%20%22deep%20state%22%20reason)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20I%20have%20a%20question%20for%20you%3A%20WHY%20would%20you%20need%20to%20move%20a%20value%20from%20Column%20C%20to%20some%20other%20spot%2C%20even%20another%20row%20in%20Column%20C%3F%20If%20you're%20just%20wanting%20things%20always%20to%20be%20in%20date%20sequence--which%20I%20suspect%20might%20be%20the%20reason%2C%20you%20could%20do%20a%20Data....Sort%20of%20the%20entire%20range%20of%20cells%20from%20row%207%20on%20down%2C%20and%20the%20series%20of%20formulas%20remains%20functional%20as%20you%20want%20it%2C%26nbsp%3B%20connecting%20to%20the%20adjacent%20cell%20and%20the%20one%20above.%20To%20do%20that%20Sort%20routine%20neatly%20would%20mean%20you%20should%20be%20entering%20actual%20dates%20in%20one%20of%20the%20columns.%20I%20did%20a%20sort%20on%20random%20numbers%20in%20Col%20A%20in%20the%20attached%2C%20to%20show%20you.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBut%20you%20really%20don't%20need%20to%20do%20that%20Sort%20routine%20either.%26nbsp%3B%20If%20you're%20really%20developing%20a%20budget%20spreadsheet%20here%2C%20not%20merely%20a%20checkbook%20balancer%2C%20you're%20going%20to%20want%20to%20avail%20yourself%20of%20something%20like%20the%20Pivot%20Table%20function%20to%20create%20a%20summary%20report%20of%20expenses%20by%20category%20by%20month.....and%20then%20you%20won't%20need%20individual%20entries%20in%20date%20order%20anyway.%20If%20that's%20something%20of%20interest%2C%20write%20back%20and%20we%20can%20refer%20you%20to%20some%20templates%20or%20samples...%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1378519%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1378519%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F662599%22%20target%3D%22_blank%22%3E%40RC_in_MN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHere's%20an%20example%20of%20a%20Pivot%20Table%20summary%20report%20drawn%20from%20a%20list%20of%20expenses%20and%20categories.%20Solely%20shared%20for%20the%20purpose%20of%20showing%20how%20that%20method%20works%20to%20summarize%20data.%20Your%20input%20sheet%20could%20be%20enhanced%20just%20slightly--we%20can%20exchange%20messages%20about%20that%20if%20you're%20interested--to%20collect%20your%20category%20for%20each%20expense%2C%20doing%20so%20based%20on%20a%20drop%20down%20list%20you%20specify.%20I've%20created%20my%20own%20expense%20tracking%20spreadsheet%20recently%2C%20incorporating%20multiple%20bank%20and%20credit%20card%20accounts.....%20The%20Pivot%20Table%20is%20a%20very%20popular%2C%20and%20easy%20to%20use%2C%20built-in%20way%20Excel%20can%20produce%20very%20helpful%20cross-tabulated%20reports%20like%20this.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1378688%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1378688%22%20slang%3D%22en-US%22%3EHi%2C%3CBR%20%2F%3ECare%20to%20learn%20about%20a%20very%20useful%20formula%20for%20such%20cases%2C%20the%20formula%20name%20is%20INDIRECT.%3CBR%20%2F%3EIf%20for%20example%20instead%20of%20%3DC6%20%2C%20you%20use%20%3DINDIRECT(%22C6%22)%20%2C%20then%20always%20excel%20will%20pick%20value%20from%20C6%20even%20if%20C6%20cell%20is%20moved%2Fcut%20pasted%20somewhere%20else.%3CBR%20%2F%3ESimilarly%2C%20formula%20%3DINDIRECT(%22C8%22)%2BD7%20means%20that%20always%20C8%20will%20be%20fixed%20but%20if%20you%20move%20D7%20cell%2C%20then%20your%20entered%20formula%20would%20change%20to%20follow%20it's%20new%20position.%20If%20you%20want%20D7%20also%20to%20be%20fixed%2C%20then%20enter%3CBR%20%2F%3E%3DINDIRECT%20(%22C8%22)%2BINDIRECT(%22D7%22)%3CBR%20%2F%3E%3CBR%20%2F%3EThis%20would%20solve%20your%20problem.%3CBR%20%2F%3E%3CBR%20%2F%3EHowever%20take%20care%3A-%3CBR%20%2F%3E1)%20put%20the%20address%20in%20INDIRECT%20function%20in%20quotes%20%22%20%22%3CBR%20%2F%3E2)%20since%20people%20are%20habitual%20of%20the%20behaviour%20that%20when%20a%20cell%20is%20moved%20then%20formulas%20follow%20that%20cell%2C%20so%20using%20INDIRECT%20formula%20can%20surprise%20users%20as%20excel%20would%20behave%20differently%20by%20not%20following%20the%20moved%20cell.%20If%20only%20you%20would%20use%20your%20excel%20file%2C%20then%20it%20doesn't%20matter.%20This%20alert%20is%20only%20if%20you%20give%20your%20file%20to%20someone%20else%20to%20use.%3CBR%20%2F%3E3)%20Note%20that%20tomorrow%20if%20you%20insert%20some%20new%20rows%20at%20top%20to%20say%20write%20more%20headings%20etc.%2C%20then%20your%20formulas%20would%20still%20continue%20to%20refer%20to%20%22C8%22%20%2C%20this%20can%20ruin%20your%20calculations.%3CBR%20%2F%3E%3CBR%20%2F%3ESo%20in%20the%20end%20excel%20is%20designed%20to%20adjust%20formulas%20if%20cells%20move%20for%20better%20behaviour.%20Although%20it%20gives%20you%20an%20option%20to%20use%20INDIRECT%20formula%20if%20you%20want%20to%20change%20that%20behaviour%2C%20but%20if%20users%20are%20new%20or%20you%20yourself%20forget%20that%20you%20used%20INDIRECT%2C%20then%20this%20changed%20behaviour%20can%20also%20backfire!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1380176%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380176%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E!%3C%2FP%3E%3CP%3E%F0%9F%A4%A6%F0%9F%8F%BC%E2%80%8D%3Amale_sign%3A%20Copy%2Bpaste%20instead%20of%20cut%2Bpaste%20was%20a%20revelation.%20Thank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20putting%20the%20dates%20in%20column%20A%20and%20sorting%20that%20way%20will%20work%20fine.%20In%20this%20case%2C%20all%20I%20want%20to%20do%20is%20project%20account%20balances%2C%20so%20that%20will%20solve%20my%20problem%20beautifully.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1380188%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380188%22%20slang%3D%22en-US%22%3E%3CP%3EThanks%20again%20for%20the%20input.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20the%20purpose%20of%20this%20spreadsheet%2C%20I%20think%20you%20solved%20it%20for%20me%E2%80%94thanks!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20*may*%20be%20able%20to%20use%20the%20Pivot%20Table%20function%20to%20help%20me%20replace%20a%20project%20estimating%20form%20I%20currently%20have%20in%20FileMaker%20Pro.%20It%20works%20great%20there%2C%20but%E2%80%94since%20it's%20the%20only%20thing%20I%20do%20in%20FMP%E2%80%94I%20may%20recreate%20it%20in%20Excel%2C%20simply%20to%20save%20the%20cost%20of%20updating%20FileMaker%20when%20I%20hardly%20use%20it.%20That%20will%20come%20later.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1380194%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380194%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F636579%22%20target%3D%22_blank%22%3E%40amit_bhola%3C%2FA%3E%26nbsp%3BThanks%20for%20the%20suggestion.%20I%20will%20give%20INDIRECT%20a%20try.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EKind%20regards....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1380195%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380195%22%20slang%3D%22en-US%22%3EThis%3A%3CBR%20%2F%3EB5%3A%20%3DINDEX(%241%3A%241048576%2C5%2C1)%3CBR%20%2F%3E%3CBR%20%2F%3ECan%20be%20copy%2Fpasted%20anywhere%20without%20throwing%20the%20%23REF!%20error.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1380206%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380206%22%20slang%3D%22en-US%22%3EThank%20you!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1380239%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380239%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F662599%22%20target%3D%22_blank%22%3E%40RC_in_MN%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhere%20in%20MN%2C%20just%20out%20of%20curiosity%3F%20I%20went%20to%20college%20in%20MN%20(Northfield)...haven't%20lived%20there%2C%20however%2C%20for%20well%20over%20half%20a%20century%20now.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBack%20to%20the%20subject%20at%20hand%3A%20the%20Pivot%20Table%20is%20an%20incredibly%20useful%20tool%20that%20Excel%20has%20had%20for%20decades%20now.%20Easily%20summarizes%20a%20data%20table%20across%20rows%20and%20columns.%20Often%20used%20for%20the%20kind%20of%20budget%20category%20expenses%20by%20month%2C%20it%20can%20also%20do%20any%20other%20cross-tabulated%20report.%20For%20example%2C%20if%20your%20project%20estimating%20has%20to%20do%20not%20with%20costs%20by%20calendar%20entry%20(month%2Fweek%2Fyear)%20but%20rather%2C%20sub-project%20by%20contractor.....%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1380278%22%20slang%3D%22en-US%22%3ERe%3A%20How%20can%20I%20get%20a%20formula%20to%20NOT%20update%20when%20I%20move%20some%20of%20the%20target%20data%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1380278%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F425987%22%20target%3D%22_blank%22%3E%40mathetes%3C%2FA%3E%26nbsp%3B.....%3C%2FP%3E%3CP%3ENorthfield%20is%20a%20great%20town.%20I'm%20300mi.%20north%20of%20there%2C%20outside%20of%20Ely.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20for%20your%20kind%20and%20expert%20advice.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I built a simple budget spreadsheet that keeps track of my account balance. Currently, if I move the target data, the formula next to it wants to follow that data. How can I prevent that from happening so the formula in D8 always refers to C8, even if I move the data in C8 to a different location and replace it with something new?

9 Replies
Highlighted
Best Response confirmed by RC_in_MN (Occasional Contributor)
Solution

@RC_in_MN 

 

If you use Cut and Paste to move a value the formula in another cell will follow the target cell to its new location. If you use Copy and Paste, it won't. But you'll have to go back and delete the value in the original cell.

 

Why does this happen? With Cut and Paste, the assumption is that you're reorganizaing the layout of the sheet. (I say as a layman in the field; I don't actually know the "deep state" reason)

 

But I have a question for you: WHY would you need to move a value from Column C to some other spot, even another row in Column C? If you're just wanting things always to be in date sequence--which I suspect might be the reason, you could do a Data....Sort of the entire range of cells from row 7 on down, and the series of formulas remains functional as you want it,  connecting to the adjacent cell and the one above. To do that Sort routine neatly would mean you should be entering actual dates in one of the columns. I did a sort on random numbers in Col A in the attached, to show you.

 

But you really don't need to do that Sort routine either.  If you're really developing a budget spreadsheet here, not merely a checkbook balancer, you're going to want to avail yourself of something like the Pivot Table function to create a summary report of expenses by category by month.....and then you won't need individual entries in date order anyway. If that's something of interest, write back and we can refer you to some templates or samples...

Highlighted

@RC_in_MN 

 

Here's an example of a Pivot Table summary report drawn from a list of expenses and categories. Solely shared for the purpose of showing how that method works to summarize data. Your input sheet could be enhanced just slightly--we can exchange messages about that if you're interested--to collect your category for each expense, doing so based on a drop down list you specify. I've created my own expense tracking spreadsheet recently, incorporating multiple bank and credit card accounts..... The Pivot Table is a very popular, and easy to use, built-in way Excel can produce very helpful cross-tabulated reports like this.

Highlighted
Hi,
Care to learn about a very useful formula for such cases, the formula name is INDIRECT.
If for example instead of =C6 , you use =INDIRECT("C6") , then always excel will pick value from C6 even if C6 cell is moved/cut pasted somewhere else.
Similarly, formula =INDIRECT("C8")+D7 means that always C8 will be fixed but if you move D7 cell, then your entered formula would change to follow it's new position. If you want D7 also to be fixed, then enter
=INDIRECT ("C8")+INDIRECT("D7")

This would solve your problem.

However take care:-
1) put the address in INDIRECT function in quotes " "
2) since people are habitual of the behaviour that when a cell is moved then formulas follow that cell, so using INDIRECT formula can surprise users as excel would behave differently by not following the moved cell. If only you would use your excel file, then it doesn't matter. This alert is only if you give your file to someone else to use.
3) Note that tomorrow if you insert some new rows at top to say write more headings etc., then your formulas would still continue to refer to "C8" , this can ruin your calculations.

So in the end excel is designed to adjust formulas if cells move for better behaviour. Although it gives you an option to use INDIRECT formula if you want to change that behaviour, but if users are new or you yourself forget that you used INDIRECT, then this changed behaviour can also backfire!
Highlighted

Thanks, @mathetes!

🤦🏼‍ Copy+paste instead of cut+paste was a revelation. Thank you!

 

Also putting the dates in column A and sorting that way will work fine. In this case, all I want to do is project account balances, so that will solve my problem beautifully.

 

Thank you!

Highlighted

Thanks again for the input. 

 

For the purpose of this spreadsheet, I think you solved it for me—thanks!

 

I *may* be able to use the Pivot Table function to help me replace a project estimating form I currently have in FileMaker Pro. It works great there, but—since it's the only thing I do in FMP—I may recreate it in Excel, simply to save the cost of updating FileMaker when I hardly use it. That will come later.

 

Thanks again. 

Highlighted

@amit_bhola Thanks for the suggestion. I will give INDIRECT a try. 

 

Kind regards....

Highlighted
This:
B5: =INDEX($1:$1048576,5,1)

Can be copy/pasted anywhere without throwing the #REF! error.
Highlighted
Highlighted

@RC_in_MN 

 

Where in MN, just out of curiosity? I went to college in MN (Northfield)...haven't lived there, however, for well over half a century now.

 

Back to the subject at hand: the Pivot Table is an incredibly useful tool that Excel has had for decades now. Easily summarizes a data table across rows and columns. Often used for the kind of budget category expenses by month, it can also do any other cross-tabulated report. For example, if your project estimating has to do not with costs by calendar entry (month/week/year) but rather, sub-project by contractor.....