Prompt box to copy and paste data

hgufrin

Board Regular
Joined
Apr 19, 2004
Messages
172
Hello,

How can i add to this code so that I am prompted via a dialog box of where the macro should paste data? In the case below, I would like to run the macro, it copies column A, asks me where to paste it (I answer/type "Mar") and then it will paste it under the month of Mar. I do this manually every month.

Thanks for any help. I appreciate it



Application.Goto Reference:="MTD_Expense"
Selection.Copy
Application.Goto Reference:="Mar"
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False


MTD Gas Expense Jan Feb Mar
10 25 13
120 25 14
30 10 10
160 60 37
 

Some videos you may like

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

hgufrin

Board Regular
Joined
Apr 19, 2004
Messages
172
sorry,

let me try to use Colo's HTML.

I hope you understand what im asking without it...
 

lenze

Legend
Joined
Feb 18, 2002
Messages
13,690
Why not arrange your data in 2 columns, One for date, One for amount. Now use a Pivot Table. Much quicker and cleaner and much more data analysis capability (Sum, Count, Average, Mean, etc). You can also group your dates by Quarters if that is useful to you

lenze
 

hgufrin

Board Regular
Joined
Apr 19, 2004
Messages
172
Hi Lenze,

Thanks for reply,

I was asked to get the information that I showed you. The spreadsheets that I am dealing with at work are too complicated.

If you can show me the code to the simplified question I gave I can manipulate to my supervisor's satisfaction...

Thanks for listening.
 

Watch MrExcel Video

Forum statistics

Threads
1,113,811
Messages
5,544,444
Members
410,610
Latest member
renatha prado
Top