• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 176
  • Last Modified:

Copy & Paste Macro

Hi Experts;

I want to create a macro can work with any sheet or excel work sheet.
The macro is working like :
1- after I select a specifc cells.
2- I run the macro; a pop up window asks me clomn and row number where to paste the value only.
3- end of macro.

pls make your example in a work sheet.

thank you.
0
obad62
Asked:
obad62
1 Solution
 
pritamduttCommented:
Please find attached sample Excel File and given below is the Macro Code

Sub CopyPasteValues()
'
' CopyPasteValues Macro
' Use this Macro to Copy Values from Selected Cells to a specified Cell
'

'
    Dim DestCell
    DestCell = InputBox("Specify Destination Cell")
    Selection.Copy
    If DestCell <> "" Then
        Range(DestCell).Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
        
    End If
End Sub

Open in new window

CopyPasteValues.xls
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now