Help needed with copying from one worksheet to another

L

Lord.Ricco

Hi,
I am trying to write a macro to help me sort out some data for
some reports I am running,( I have not really used macro's before and
so don't really know where to start.

Below is a small example of what I am starting with, This covers a
period from 01/04/06 - 31/03/07

I have sorted the date column in order and currently I am using a
customised date format to display just the month.

Name of the business event Event Type Start date Fee
ICT May 0.00
ICT May 55.00
Equality and Diversity May 75.00
Dealing With Customers May 75.00


I have the workbook set up to have 13 worksheets - the first on named
Full year is where the data is being pulled from, I then have each of
the others named April ...........March. And they all Have the same
headings in Row 1

What I am trying to do is to copy the data from the 1st sheet into the
correct monthly named sheet, - IE if the date says may then I want the
whole row copying into the first empty row in the worksheet"May"

If anybody can help I would appreciate it, If you need any more
information from me please let me know.

Thanks in Advance.
 
J

Joel

Sub copymonth()

Sheets("Full year").Activate
LastrowColC = Cells(Rows.Count, "C").End(xlUp).Row
Set ColCRange = Range(Cells(2, "C"), Cells(LastrowColC, "C"))

For Each cell In ColCRange

mymonth = cell
'get last row of month worksheet
Sheets(mymonth).Activate
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
cell.EntireRow.Copy Destination:=Range("A" & CStr((lastrow + 1)))

Next cell

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top