Copy one excel sheet with formula to another workbook (Excel sheet)

%3CLINGO-SUB%20id%3D%22lingo-sub-2780685%22%20slang%3D%22en-US%22%3ECopy%20one%20excel%20sheet%20with%20formula%20to%20another%20workbook%20(Excel%20sheet)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2780685%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Guys%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20excel%20file%20where%203%20sheets%20have%20data%20and%204th%20sheet%20(Formula%20Functional%20sheet)%26nbsp%3B%20have%20various%20formula%2C%204th%20sheet%20take%20references%20from%20initial%203%20sheets.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20I%20have%20moved%20these%204%20sheets%20into%20another%20new%20excel%20file%20but%20in%20Formula%20Function%20sheet%20still%20formula%20reference%20are%20of%20source%20file.%20Please%20let%20me%20know%20how%20to%20change%20the%20source%20of%20formula%20and%20link%20it%20with%20new%20one.%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2780685%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-2780834%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20one%20excel%20sheet%20with%20formula%20to%20another%20workbook%20(Excel%20sheet)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2780834%22%20slang%3D%22en-US%22%3EIt%20sounds%20like%20you%20have%20references%20to%20other%20files%20and%20not%20only%20between%20sheets%20in%20the%20same%20file..%3F%20Otherwise%20the%20references%20between%20sheets%20should%20follow%20without%20issues.%3CBR%20%2F%3E%E2%80%AAHowever%2C%20you%20do%20have%20references%20to%20unwanted%20places%2C%20eg%20%3D%5BBook3%5DSheet2!%24A%241%20where%20Book3%20is%20a%20file%20you%20do%20not%20want%20referenced.%20You%20may%20press%20Ctrl%2BH%20and%20replace%20%5BBook3%5D%20with%20nothing%20or%20another%20file.%20Click%20a%20few%20Replace%20before%20using%20replace%20All%20in%20case%20the%20new%20formula%20does%20not%20work%20out%20well.%3CBR%20%2F%3EAlso%2C%20you%20may%20select%20the%20cells%20you%20want%20to%20change%20since%E2%80%AA%20the%20action%20applies%20to%20selected%20cells.%20If%20you%20only%20want%20to%20change%20one%20cell%2C%20you%20may%20select%20that%20one%20and%20another%2C%20empty..%3CBR%20%2F%3ESave%20a%20copy%20before%20trying%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3CBR%20%2F%3E%3CBR%20%2F%3EFind%20what%3A%20%5BBook3%5D%3CBR%20%2F%3EReplace%20with%3A%3CBR%20%2F%3EOptions%20%26gt%3B%26gt%3B%20to%20change%20(only%20one%20selected%20will%3CBR%20%2F%3ELook%20in%3A%20Formulas%3CBR%20%2F%3E%5B%20%5D%20Match%20entire%20cell%20contents%3CBR%20%2F%3E%3CBR%20%2F%3EDepending%20on%20your%20exact%20needs%2C%20you%20may%20just%3CBR%20%2F%3EFile%3A%20Info%3A%20Edit%20Links%20to%20Files%3CBR%20%2F%3Eand%20Change%20Source%20to%20the%20new%20file.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2780883%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20one%20excel%20sheet%20with%20formula%20to%20another%20workbook%20(Excel%20sheet)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2780883%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1165326%22%20target%3D%22_blank%22%3E%40NKSNagendra7871%3C%2FA%3E%26nbsp%3BIt%20sounds%20like%20you%20have%20references%20to%20other%20files%20and%20not%20only%20between%20sheets%20in%20the%20same%20file..%3F%20Otherwise%20the%20references%20between%20sheets%20ought%20to%20have%20followed%20without%20issues.%3CBR%20%2F%3E%E2%80%AAHowever%2C%20you%20do%20have%20references%20to%20unwanted%20places%2C%20eg%20%3D%5BBook3%5DSheet2!%24A%241%20where%20Book3%20is%20a%20file%20you%20do%20not%20want%20referenced.%3C%2FP%3E%3CP%3EYou%20may%20press%20Ctrl%2BH%20and%20replace%20%5BBook3%5D%20with%20nothing%2C%20or%20another%20file.%3C%2FP%3E%3CP%3EClick%20a%20few%20Replace%20before%20using%20Replace%20All%20in%20case%20the%20new%20formula%20does%20not%20work%20out%20well.%3CBR%20%2F%3EAlso%2C%20you%20may%20select%20only%20the%20cells%20you%20want%20to%20change%20since%E2%80%AA%20the%20replace%20action%20applies%20to%20selected%20cells.%20If%20you%20only%20want%20to%20change%20one%20cell%2C%20you%20may%20select%20that%20one%20and%20another%2C%20empty.%3CBR%20%2F%3EAnd%20save%20a%20copy%20first%20%3A)%3A)%3CBR%20%2F%3E%3CBR%20%2F%3EFind%20what%3A%20%5BBook3%5D%3CBR%20%2F%3EReplace%20with%3A%3CBR%20%2F%3EOptions%20%26gt%3B%26gt%3B%3CBR%20%2F%3ELook%20in%3A%20Formulas%3CBR%20%2F%3E%5B%26nbsp%3B%20%5D%20Match%20entire%20cell%20contents%3CBR%20%2F%3E%3CBR%20%2F%3EDepending%20on%20your%20exact%20needs%2C%20you%20may%20just%3CBR%20%2F%3E%3CSTRONG%3EFile%3A%20Info%3A%20Edit%20Links%20to%20Files%3C%2FSTRONG%3E%3CBR%20%2F%3Eand%20%3CSTRONG%3EChange%20Source%3C%2FSTRONG%3E%20to%20the%20new%20file.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2781057%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20one%20excel%20sheet%20with%20formula%20to%20another%20workbook%20(Excel%20sheet)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2781057%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1159986%22%20target%3D%22_blank%22%3E%40bosinander%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20for%20your%20solution%2C%20there%20are%20two%20problems%3B%3C%2FP%3E%3CP%3EHi%2C%20Thanks%3C%2FP%3E%3CP%3E1.%20Moved%20sheet%20have%20many%26nbsp%3B%20Index%20Match%20formulas%20(more%20then%2020)%2C%20these%20formula%20are%20taking%20reference%20from%20old%20sheet.%3C%2FP%3E%3CP%3E2.%20Do%20you%20think%20that%20Replace%20function%20will%20work%20in%20excel%20formula%20as%20well%20specially%20we%20are%20indexing%20some%20data%20from%20other%20sheet.%20Will%20this%20change%20for%20all%20the%20example%20of%20formula%20is%20like%26nbsp%3B%3C%2FP%3E%3CP%3E%3DINDEX('%3CSTRONG%3ED%3A%5CNagendra_This%20Com%5CNagendra_Main%5CAB_PREMIUM%5CMaize%5C%5BMaize_FERTILIZER%20MGMT_21Sep.xlsx%5D%3C%2FSTRONG%3EFertilizer%20Dose%20Master'!F3%3AF326%2CMATCH%3CSTRONG%3E('Fertilizer%20Management-Impro%20(2)'!%24D%241%26amp%3B'%3C%2FSTRONG%3EFertilizer%20Management-Impro%20(2)'!%24D%242%26amp%3B'%3CSTRONG%3E%2C'D%3A%5CNagendra_This%20Com%5CNagendra_Main%5CAB_PREMIUM%5CMaize%5C%5BMaize_FERTILIZER%20MGMT_21Sep.xlsx%5D%3C%2FSTRONG%3EFertilizer%20Dose%20Master'!%24A%243%3A%24A%24326%2C0))%3C%2FP%3E%3CP%3EI%20have%20above%20many%20Index%20match%20formula%2C%20highlighted%20is%20showing%20reference%20of%20old%20sheet%20from%20where%20these%20sheets%20are%20sourced.%3C%2FP%3E%3CP%3EPlease%20let%20me%20know%20if%20any%20other%20option%20is%20available.%3C%2FP%3E%3CP%3ERegards%20and%20Thanks.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2781377%22%20slang%3D%22en-US%22%3ERe%3A%20Copy%20one%20excel%20sheet%20with%20formula%20to%20another%20workbook%20(Excel%20sheet)%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2781377%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1165326%22%20target%3D%22_blank%22%3E%40NKSNagendra7871%3C%2FA%3E%26nbsp%3B%26nbsp%3BHi.%3C%2FP%3E%3CP%3E1%3CBR%20%2F%3Eto%20change%20the%20reference%20to%20the%20origin%20sheet%2C%20ie%20one%20not%20having%20suffix%20(2)%3B%3CBR%20%2F%3EFind%20what%3A%20'Fertilizer%20Management-Impro%20(2)'!%3CBR%20%2F%3EReplace%20with%3A%20'Fertilizer%20Management-Impro'!%3CBR%20%2F%3EThis%20should%20work%20just%20fine.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E2%3CBR%20%2F%3ESeems%20you%20may%20have%20new%20data%20in%20another%20file..%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFind%20what%3A%3CBR%20%2F%3ED%3A%5CNagendra_This%20Com%5CNagendra_Main%5CAB_PREMIUM%5CMaize%5C%5BMaize_FERTILIZER%20MGMT_%3CSTRONG%3E21Sep%3C%2FSTRONG%3E.xlsx%5D%3C%2FP%3E%3CP%3EReplace%20with%3A%3CBR%20%2F%3ED%3A%5CNagendra_This%20Com%5CNagendra_Main%5CAB_PREMIUM%5CMaize%5C%5BMaize_FERTILIZER%20MGMT_%3CSTRONG%3E21Oct%3C%2FSTRONG%3E.xlsx%5D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20is%20possible%20to%20minimize%20the%20strings%20and%20shortly%20replace%2021Sep.xlsx%20with%2021Oct.xlsx.%3C%2FP%3E%3CP%3EThe%20choice%20of%20longer%20or%20even%20shorter%20strings%20depends%20on%20the%20risk%20for%20changing%20wrong%20parts%20in%20(other)%20formulas.%3C%2FP%3E%3CP%3EThis%20part%20however%20should%20be%20even%20easier%20to%20apply%20by%20changing%20source%20file%2C%20using%3C%2FP%3E%3CP%3EFile%3A%20Info%3A%20Edit%20Links%20to%20Files.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20if%20you%20have%20not%20looked%20at%20the%20rather%20new%20function%20XLOOKUP%20yet%2C%20it%20may%20be%20worth%20the%20while%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi Guys,

 

I have a excel file where 3 sheets have data and 4th sheet (Formula Functional sheet)  have various formula, 4th sheet take references from initial 3 sheets.

 

Now I have moved these 4 sheets into another new excel file but in Formula Function sheet still formula reference are of source file. Please let me know how to change the source of formula and link it with new one.

Regards

6 Replies

@NKSNagendra7871 It sounds like you have references to other files and not only between sheets in the same file..? Otherwise the references between sheets ought to have followed without issues.
‪However, you do have references to unwanted places, eg =[Book3]Sheet2!$A$1 where Book3 is a file you do not want referenced.

You may press Ctrl+H and replace [Book3] with nothing, or another file.

Click a few Replace before using Replace All in case the new formula does not work out well.
Also, you may select only the cells you want to change since‪ the replace action applies to selected cells. If you only want to change one cell, you may select that one and another, empty.
And save a copy first

Find what: [Book3]
Replace with:
Options >>
Look in: Formulas
[  ] Match entire cell contents

Depending on your exact needs, you may just
File: Info: Edit Links to Files
and Change Source to the new file.

@bosinander 

 

Thanks for your solution, there are two problems;

Hi, Thanks

1. Moved sheet have many  Index Match formulas (more then 20), these formula are taking reference from old sheet.

2. Do you think that Replace function will work in excel formula as well specially we are indexing some data from other sheet. Will this change for all the example of formula is like 

=INDEX('D:\Nagendra_This Com\Nagendra_Main\AB_PREMIUM\Maize\[Maize_FERTILIZER MGMT_21Sep.xlsx]Fertilizer Dose Master'!F3:F326,MATCH('Fertilizer Management-Impro (2)'!$D$1&'Fertilizer Management-Impro (2)'!$D$2&','D:\Nagendra_This Com\Nagendra_Main\AB_PREMIUM\Maize\[Maize_FERTILIZER MGMT_21Sep.xlsx]Fertilizer Dose Master'!$A$3:$A$326,0))

I have above many Index match formula, highlighted is showing reference of old sheet from where these sheets are sourced.

Please let me know if any other option is available.

Regards and Thanks. 

@NKSNagendra7871  Hi.

1
to change the reference to the origin sheet, ie one not having suffix (2);
Find what: 'Fertilizer Management-Impro (2)'!
Replace with: 'Fertilizer Management-Impro'!
This should work just fine.


2
Seems you may have new data in another file..?

 

Find what:
D:\Nagendra_This Com\Nagendra_Main\AB_PREMIUM\Maize\[Maize_FERTILIZER MGMT_21Sep.xlsx]

Replace with:
D:\Nagendra_This Com\Nagendra_Main\AB_PREMIUM\Maize\[Maize_FERTILIZER MGMT_21Oct.xlsx]

 

It is possible to minimize the strings and shortly replace 21Sep.xlsx with 21Oct.xlsx.

The choice of longer or even shorter strings depends on the risk for changing wrong parts in (other) formulas.

This part however should be even easier to apply by changing source file, using

File: Info: Edit Links to Files.

 

Also, if you have not looked at the rather new function XLOOKUP yet, it may be worth the while

@NKSNagendra7871  as long as the tab names are the same in the new file as they are in the original file, go to the Data tab in the new file and select Edit Links in the Queries & Connections section.

When the pop-up box appears, select the option to Change Source... and then select the new file as the source file. You will need to have saved the new file to be able to do this.

JSHEP73_0-1632487674327.png

 

@JSHEP73 

 

Thanks, Its really helpful. 

Regards

Nagendra