Replace Part of formula with values from another cell

murexcel

New Member
Joined
Jan 4, 2020
Messages
19
Office Version
  1. 2010
Platform
  1. Windows
Hi,

I'm trying to replace ABCDEFGHIJ with value in another cell.

Eg the below data is in A2, so I want to replace ACBDEFGHIJ with value in B2.

("1guQU2iTix2Ond4cU7akcXm5_vc9HvxbDPZxUQZ7PPQg","ABCDEFGHIJ!I2")

Thank you.

 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
I tried, but the formula does not allow to pickup cell value. I have to enter the text in the formula. So I cannot reference another cell.
 
Upvote 0
This looks like a partial formula. and it looks like you want to replace the sheet name in the formula with a sheet name in B2.

Indirect would be required but you need to supply the entire column
 
Upvote 0
Left has the formula, right has the sheet name to be replaced.

IMPORTRANGE("1guQU2iTix2Ond4cU7akcXm5_vc9HvxbDPZxUQZ7PPQg","ABCD123456!I2")ABCD78910

The number of characters will keep on changing to formula based on characters would not work.
 
Upvote 0
I think your formula should look something like this:
Excel Formula:
=SUBSTITUTE(A2,"ABCDEFGHIJ",B2)
 
Upvote 0
Solution
You are welcome.
Glad we were able to help!

The key to remember with all Excel formulas is that you can put cell references wherever it is expecting a value (you don't need to hard-code the values in to formulas).
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,955
Members
449,199
Latest member
Riley Johnson

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