Spotycus
New Member
- Joined
- Dec 8, 2015
- Messages
- 25
Hello,
I hope people find this idea an interesting idea and easy to solve. Recently I came across the following code which has been very useful as a find and replace tool.
It seems like I always need to copy different ranges of information from one place to another, and quite often I will need to do that multiple times.
Could someone suggest a better method that would allow me to setup a table of values such as column A would have my selected range to copy and column B would have my selected range to paste to. It would 10x better if column C would be for the paste method (PasteValues, PasteFormulas, etc.)
Thank you for the knowledge and the help!
I hope people find this idea an interesting idea and easy to solve. Recently I came across the following code which has been very useful as a find and replace tool.
Code:
Dim Rng1 As Range
Dim InputRng1 As Range, ReplaceRng1 As Range
xTitleId = "Parkway Data Cleanser"
'(I changed these lines to text to disable the inputbox but still keep the option for later)
'Set InputRng1 = Application.Selection
'Set InputRng1 = Application.InputBox("Original Range ", xTitleId, InputRng.Address, Type:=8)
'Set ReplaceRng1 = Application.InputBox("Replace Range :", xTitleId, Type:=8)
Set InputRng1 = Range("OldData")
Set ReplaceRng1 = Range("NewData")
For Each Rng1 In ReplaceRng1.Columns(1).Cells
InputRng1.Replace What:=Rng1.Value, Replacement:=Rng1.Offset(0, 1).Value
Next Rng1
Application.ScreenUpdating = False
It seems like I always need to copy different ranges of information from one place to another, and quite often I will need to do that multiple times.
Code:
Application.Goto Reference:="ACCNT"
Application.CutCopyMode = False
Selection.Copy
Application.Goto Reference:="Line_Account"
ActiveSheet.Paste
Range("iifcreditformula").Select
Selection.Copy
Application.Goto Reference:="Credit"
ActiveSheet.Paste
Application.Goto Reference:="IIFdebitformula"
Application.CutCopyMode = False
Selection.Copy
Application.Goto Reference:="Debit"
ActiveSheet.Paste
Application.Goto Reference:="IIFcreditformula"
Application.CutCopyMode = False
Selection.Copy
Application.Goto Reference:="credit"
ActiveSheet.Paste
Could someone suggest a better method that would allow me to setup a table of values such as column A would have my selected range to copy and column B would have my selected range to paste to. It would 10x better if column C would be for the paste method (PasteValues, PasteFormulas, etc.)
Thank you for the knowledge and the help!