Find and Replace within a formula?

olimajor123

Board Regular
Joined
Nov 13, 2013
Messages
72
Hi there

Is it possible to find and replace within a formula? IE I have a formula which is a SUMIF and is looking up on 30+ sheets, I want to copy the formula but want to change column N to column X. Is there a way to do this quickly in one go do I have to do it manually?

Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
The formula is =(SUMIF(CH!$B$5:$B$67,SUMMARY!$D5,CH!BN$5:BN$67)+SUMIF(KC!$B$5:$B$67,SUMMARY!$D5,KC!BN$5:BN$67)+SUMIF(SH!$B$5:$B$67,SUMMARY!$D5,SH!BN$5:BN$67)+SUMIF(PC!$B$5:$B$67,$D5,PC!BN$5:BN$67)+SUMIF(PC!$B$5:$B$67,$D5,PC!BN$5:BN$67)+SUMIF(DW!$B$5:$B$67,$D5,DW!BN$5:BN$67)+SUMIF(CF!$B$5:$B$67,$D5,CF!BN$5:BN$67)+SUMIF(SM!$B$5:$B$67,$D5,SM!BN$5:BN$67)+SUMIF(PS!$B$5:$B$67,$D5,PS!BN$5:BN$67)+SUMIF(MM!$B$5:$B$67,$D5,MM!BN$5:BN$67)+SUMIF(MK!$B$5:$B$67,$D5,MK!BN$5:BN$67)+SUMIF(GR!$B$5:$B$67,$D5,GR!BN$5:BN$67)+SUMIF(RP!$B$5:$B$67,$D5,RP!BN$5:BN$67)+SUMIF(PV!$B$5:$B$67,$D5,PV!BN$5:BN$67)+SUMIF(MS!$B$5:$B$67,$D5,MS!BN$5:BN$67)+SUMIF(PL!$B$5:$B$67,$D5,PL!BN$5:BN$67)+SUMIF(PG!$B$5:$B$67,$D5,PG!BN$5:BN$67)+SUMIF(CJ!$B$5:$B$67,$D5,CJ!BN$5:BN$67)+SUMIF(GW!$B$5:$B$67,$D5,GW!BN$5:BN$67)+SUMIF(JS!$B$5:$B$67,$D5,DK!BN$5:BN$67)+SUMIF(JW!$B$5:$B$67,$D5,JW!BN$5:BN$67)+SUMIF(DDV!$B$5:$B$67,$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IF(DQ!$B$5:$B$67,$D5,DQ!BN$5:BN$67)+SUMIF(LR!$B$5:$B$67,$D5,LR!BN$5:BN$67)+SUMIF(AS!$B$5:$B$67,$D5,AS!BN$5:BN$67)+SUMIF(MSt!$B$5:$B$67,$D5,MSt!BN$5:BN$67)+SUMIF(NS!$B$5:$B$67,$D5,NS!BN$5:BN$67)+SUMIF(DS!$B$5:$B$67,$D5,DS!BN$5:BN$67)+SUMIF(GWA!$B$5:$B$67,$D5,GWA!BN$5:BN$67)+SUMIF(NH!$B$5:$B$67,$D5,NH!BN$5:BN$67)+SUMIF(LP!$B$5:$B$67,$D5,LP!BN$5:BN$67)+SUMIF(GS!$B$5:$B$67,$D5,GS!BN$5:BN$67)+SUMIF(TS!$B$5:$B$67,$D5,TS!BN$5:BN$67)+SUMIF(CL!$B$5:$B$67,$D5,CL!BN$5:BN$67)+SUMIF(DL!$B$5:$B$67,$D5,DL!BN$5:BN$67)+SUMIF(JH!$B$5:$B$67,$D5,JH!BN$5:BN$67)+SUMIF(PH!$B$5:$B$67,$D5,PH!BN$5:BN$67)+SUMIF(AB!$B$5:$B$67,$D5,AB!BN$5:BN$67)+SUMIF(CA!$B$5:$B$67,$D5,CA!BN$5:BN$67)+SUMIF(AG!$B$5:$B$67,$D5,AG!BN$5:BN$67)+SUMIF(MC!$B$5:$B$67,$D5,MC!BN$5:BN$67))

The BN needs to change to BV

Everything else stay the same

I did try and just highlight the formula in the text box and do it through there but it changed all formulas on the spreadsheet
 
Upvote 0
Quite a few, but the items that need changing refer to months on the other sheets, so only really need to make the changes 12 times for different cells but obviously would rather not do it manually!
 
Upvote 0
Well you could try Highlighting the 1st cell with the formula, then Find/Replace, BUT select Replace NOT Replace all. Then Close and highlight next cell etc
 
Upvote 0
in this case and with the size of the formula think i would copy it to notepad or new temp sheet do the find and replace and copy back corrected formula
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,623
Latest member
Techenthusiast

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top