R
raichu.526
Hi all -
I would like to write a macro that essentially does a Find and
Replace, but instead of replacing with a string, it replaces with a
reference to a cell that contains that string.
As an example, the meat of the macro currently looks something like
this:
Selection.Replace What:="DATE", Replacement:="1234567", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False
So instead of replacing with "1234567", I want the Replacement to
point to the cell that has "1234567". The purpose is to update a
workbook that draws data from other workbooks that are differentiated
by date. The template has cell references to a file that contains the
word "DATE" (no such file actually exists). Running the macro would
replace "DATE" with the date that's been keyed in elsewhere on the
same sheet, and would turn the cell references into valid ones.
Thanks for any help that comes along.
I would like to write a macro that essentially does a Find and
Replace, but instead of replacing with a string, it replaces with a
reference to a cell that contains that string.
As an example, the meat of the macro currently looks something like
this:
Selection.Replace What:="DATE", Replacement:="1234567", LookAt:= _
xlPart, SearchOrder:=xlByRows, MatchCase:=False,
SearchFormat:=False, _
ReplaceFormat:=False
So instead of replacing with "1234567", I want the Replacement to
point to the cell that has "1234567". The purpose is to update a
workbook that draws data from other workbooks that are differentiated
by date. The template has cell references to a file that contains the
word "DATE" (no such file actually exists). Running the macro would
replace "DATE" with the date that's been keyed in elsewhere on the
same sheet, and would turn the cell references into valid ones.
Thanks for any help that comes along.