I have the following macro that goes to the bottom of a range of data, copies the last line of formula's, pastes them into the line below. (this then updates charts using dynamic ranges)
The macro also finds all references to "feb" and replaces with "mar" to update the formulas to read the next months data.
However, I want the Macro to use the value in a certain cell (the last populated cell in column A) as the "find" variable, and then ask the user for the "replace" value.
Anyone know how to do this?
Macro as is:
Range("a1").Select
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Range("a1").Select
Selection.End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _
, Transpose:=False
Application.CutCopyMode = False
Selection.replace What:="feb", Replacement:="mar", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
The macro also finds all references to "feb" and replaces with "mar" to update the formulas to read the next months data.
However, I want the Macro to use the value in a certain cell (the last populated cell in column A) as the "find" variable, and then ask the user for the "replace" value.
Anyone know how to do this?
Macro as is:
Range("a1").Select
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Range("a1").Select
Selection.End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlNone, SkipBlanks:=False _
, Transpose:=False
Application.CutCopyMode = False
Selection.replace What:="feb", Replacement:="mar", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False