View Single Post
 
Old 11-23-2020, 07:59 PM
Logit Logit is offline Windows 10 Office 2007
Expert
 
Join Date: Jan 2017
Posts: 533
Logit is a jewel in the roughLogit is a jewel in the roughLogit is a jewel in the rough
Default

Code:
Sub cpypste()
Dim InputCells As Excel.Range
Dim OutputCells As Excel.Range

    'Show input box to get range of cells that want to copy
    Set InputCells = _
    Application.InputBox(Prompt:="Select Cell / Cells To Copy", _
    Title:="Copy Paste", Type:=8)
    
    'Show input box to get where they want it paste
    Set OutputCells = _
    Application.InputBox(Prompt:="Select cell where you want paste", _
    Title:="Copy Paste", Type:=8)
    
    'Copy range of input cells
    InputCells.Copy
    
    'Paste it into output cells reference
    OutputCells.PasteSpecial (xlPasteAll)

End Sub
Reply With Quote