Prompt box to copy and paste data

hgufrin

Board Regular
Joined
Apr 19, 2004
Messages
177
Office Version
  1. 365
Platform
  1. Windows
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
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
sorry,

let me try to use Colo's HTML.

I hope you understand what im asking without it...
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top