Replace command in formula

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
755
Office Version
  1. 365
Good morning all

I would like to create a replace all command where it replaces the first section of the formula which is quoted
with whatever is in Cell G1

so for example if the formula is

=VLOOKUP("CP6 Opportunities & CP7 Development",'Head Count - Out Turn'!$E$7:$K$1710,2,0)

and i then select "Remitted Schemes" in the drop down in cell G1 it then changes the formula to

=VLOOKUP("Remitted Schemes",'Head Count - Out Turn'!$E$7:$K$1710,2,0)

Thanks in advance
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
39,082
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
Why can't you just use:

=VLOOKUP($G$1,'Head Count - Out Turn'!$E$7:$K$1710,2,0)

instead of changing a literal value in a formula string?
 

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
755
Office Version
  1. 365
Why can't you just use:

=VLOOKUP($G$1,'Head Count - Out Turn'!$E$7:$K$1710,2,0)

instead of changing a literal value in a formula string?

I think i was have whats known technically as a "Brain Fart" - you are quite correct - many thanks for your help
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
39,082
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
:biggrin: (been there!)

Glad to help.
 

Forum statistics

Threads
1,172,023
Messages
5,878,780
Members
433,370
Latest member
mcleven

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
Top