VBA Copy and Paste using dates

5 pts.
Tags:
Excel VBA
Microsoft Excel 2003
Microsoft Office
I have a spreadsheet that I am compiling for completed work orders. The sheet I want to copy the information from is called "Completed". In column H, I have the date each work order was completed and the dates are formated mm/dd/yyyy. I would like to have a code that will copy the work orders that are completed in January to the sheet named "January" but I need to make sure the original row stays on the Completed tab. And the same for each month after that. So in the end I will have a sheet for each months completed workorders. Is this possible and if so is it possible to do this with one code or will I have to have a code for each month?

Software/Hardware used:
Microsoft Excel 2003

Answer Wiki

Thanks. We'll let you know when a new response is added.

I would suggest starting with writing some pseudocode that lists what you want to do. Something like:

For each row in column H:
Find the date
Work out the month from that date
Retrieve the target sheet name (based on month)
Fnd last row on target sheet
Copy current row
Paste into target sheet last row
Next row

From there you can develop the syntax and run some tests to ensure it works!

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following