Change Formula to Text for Manipulation

Cachilupi

New Member
Joined
Oct 13, 2006
Messages
24
Using Excel 2010

I have a formula that references another file. I need to make a change to all the formulas, but just the cell reference. For example, if the current formula refers to cell D158 I now want it to be D101, D159 to D102, D160 to D103, etc. The problem comes that after 52 rows it starts over, but refers to a different column (G158 to G101, G159 to G102, G160 to G103, etc). This repeats several time, but the only thing that changes is the row letter.

Is there a way to turn the formula into a text string and then use the "Right" function to extract the row number and then concatenate the string back to make a formula? Right now if use the "Right" function it just returns the value of the formula, I want to be able to manipulate the formula, not the returned value.

Thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Sure, just highlight all your formula cells, do a find and replace, find "=", replace with "#". Now all your formulas are strings. Edit them, then reverse the find and replace.
 
Upvote 0
Alternatly,
you could use a named function

Name: myFunction
RefersTo: =SUM(Sheet1!D10:D100)

and put =myFunction in various cells.
That way any change to the definition of myFunction will be replicated throughout the worksheet
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,254
Members
452,900
Latest member
LisaGo

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