Thread
:
Transfering data
View Single Post
#
5
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Transfering data
Should do it. Even adjusts for the fact that you did not delete row 4 as
instructed before. Do NOT delete now as it will ruin the macro. Send me your
email and I'll send the file as we don't attach files where I answered in
the ms news group.
Sub filterbymonthandcopytosheets()
Application.ScreenUpdating = False
Range("b4") = 0
lr = Cells(Rows.Count, "b").End(xlUp).Row
For i = 5 To lr
Cells(i, 1).Value = Month(Cells(i, 2))
Next i
With Range("a2:i" & lr)
For i = 1 To Cells(lr, 1)
.AutoFilter Field:=1, Criteria1:=i
.Offset(2, 1).Copy
With Sheets(CStr(i)).Range("b5")
.PasteSpecial Paste:=xlPasteFormats
.PasteSpecial Paste:=xlPasteValues
End With
Next i
.AutoFilter
End With
Columns(1).ClearContents
Application.ScreenUpdating = True
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"tofimoon4" wrote in message
...
Dear sir,with my regards,like to thank you for your help and wonderful
solution which encouraged me to send another file asking for another
help to transfer datas from main sheet to (12) sheets being the twelve
months (without duplicates the transferred data).
Many thanks in advance.
+-------------------------------------------------------------------+
|Filename: Transferring.zip |
|Download:
http://www.thecodecage.com/forumz/attachment.php?attachmentid=145|
+-------------------------------------------------------------------+
--
tofimoon4
------------------------------------------------------------------------
tofimoon4's Profile:
http://www.thecodecage.com/forumz/member.php?userid=138
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=100128
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett