Hi Experts,
I've being working out around to find a solution for my monthly task which i perform every month to retrieve the email received time based on email subject. I've almost done but, there are some issues.
1. I've 12 sheets with the month names respectively.
2. In each and every sheet the Calendar first date start @ Cell E2 i.e, E2 = 1/1/2014, F2 = 1/2/2014 so on a so forth (Excluding weekends).
3. I've a combobox in userform, based on the combobox selected value, that particular sheet gets activated.
3. I've a vlookup formula recorded only for April Sheet from 4/1/2014 through 4/30/2014. When i run the macro it is retrieve the mails of april month and getting populated in the approrpriate sheet.
My issue here is, when i choose a month in the combobox the formula is getting populated with the other month time which is incorrect. Also, i would like to populate the formula till the last column which has the data.
I am using the following code. Any help is really appreciated.
Sub Dump_Data()
Dim lastrow As Long
Dim retval As String
Application.ScreenUpdating = True
'--------------------------------------------------------------------------------------------------------------------
Worksheets("Email Details").Select
lastrow = Range("A" & Rows.Count).End(xlUp).Row
' Filter for required data
Range("A1:G1").Select
Selection.AutoFilter
Range("A1:G" & lastrow).AutoFilter field:=3, Criteria1:="=*PA GMAX*"
Call Copy_Required_Data
Windows("Release Timings - Master Template 2014.xlsx").Activate
'Sheets("Apr'14").Select
Application.ScreenUpdating = False
Sheets(ComboBox1.Value).Visible = True
Application.Goto Sheets(ComboBox1.Value).[E3], True
Application.ScreenUpdating = True
' PA GMAX Release DUMP
Cells.Find(What:="PA GMAX Release", After:=ActiveCell, LookIn:=xlFormulas, _
lookat:=xlPart, Searchorder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, searchformat:=False).Activate
Range("E3").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R2:C26,'[Release Email Tracker.xlsm]Dump Data'!C5:C7,3,0)"
Windows("Release Timings - Master Template 2014.xlsx").Activate
'Sheets("Apr'14").Select
Application.ScreenUpdating = False
Sheets(ComboBox1.Value).Visible = True
Application.Goto Sheets(ComboBox1.Value).[E3], True
Application.ScreenUpdating = True
Range("E3").Select
Selection.Copy
Range(Selection, Selection.End(xlToRight)).Select
Range("E3:Z3").Select
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.Replace What:="PM", Replacement:="AM", lookat:=xlPart, _
Searchorder:=xlByRows, MatchCase:=False, searchformat:=False, _
ReplaceFormat:=False
Application.CutCopyMode = False
Bookmarks