• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy and paste via offset based on the month

GCR

New Member
I am trying to create a macro that allows the user to select the values in column C for rows that have a value greater than 0 and then copy and paste these value to a column to the right. The specific column where the values will be pasted needs to be ascertained from the user based on the month of the data they have entered (e.g. January = 1). I know how to use the offset as a formula but not a macro.

So, if there are positive values in column C, starting in row 2 and down to row 15, I want to copy and paste this as a value over in column M (representing October) and the same row values. I know this shouldn't be hard but I haven't had to create a macro in almost 10 years.

Any help would be appreciated - I am not sure where to start even.
 
Hi:

If the months are contiguous you can use the last column method to paste. If the months are non-contiguous you will have to use find method to determine the column to paste.If you can upload a sample file I can code it for you.

Thanks
 
Hi Nebu, thanks - I have uploaded the file. On the "Monthly Mkt Expense" worksheet, you will see column D which contains the data for each respective month. What I want to accomplish is assign a macro to a button whereby when the button is hit, the input box pops up, asks for the month number, and then copies the data (where the range includes all rows that have data) from D to the appropriate monthly column. Any help you can provide is greater appreciated.
 

Attachments

Back
Top