Hello! I'm looking for a macro that can look in a formula for a specific text and change it.
Example:
I have a formula "=DATE(2013,2,1)" which is part of a complex formula
I need to change it to "=DATE(YEAR(A$1);MONTH(A$1);1)"
When I record the macros I receive:
But when i run the code it doesn't work.
Example:
I have a formula "=DATE(2013,2,1)" which is part of a complex formula
I need to change it to "=DATE(YEAR(A$1);MONTH(A$1);1)"
When I record the macros I receive:
Code:
Cells.Replace What:="2013,2", Replacement:="year(a$1);month(a$1)", LookAt _
:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
But when i run the code it doesn't work.