• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • 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.
1 Solution
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")
    If DestCell <> "" Then
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False
    End If
End Sub

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

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