Replace command in formula

Corleone

Well-known Member
Joined
Feb 2, 2003
Messages
834
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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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?
 
Upvote 0
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
 
Upvote 0
:biggrin: (been there!)

Glad to help.
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,220
Members
448,554
Latest member
Gleisner2

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