Dear All,
This will gonna be a littile bit long however it will be very educational for me for future purpose
1) I created a workbook ( Version 1 Attached )version 1.xlsm , and as shown it select Who i do determine from the filter in the first coloumn the name and create a sepreat sheet of his information , I has a issue in that :If you selected in the filter any name let's assume Test 1 ,, in the new workbook the fourmals that count his attendance log are not copied corerctly , below is the code i placed in the button
Sub Button3_Click()
Application.DisplayAlerts = False
Cells.Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Application.CutCopyMode = False
Range("A1").Select
ActiveSheet.Shapes.Range(Array("Button 1")).Select
Selection.Delete
Cells.Select
Cells.EntireColumn.AutoFit
Range("A5").Select
Sheets("Sheet2").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "This is a summary Report for : "
Selection.Font.Bold = True
Range("A2").Select
ActiveCell.FormulaR1C1 = "Number Of Working Days from office :"
Range("A3").Select
ActiveCell.FormulaR1C1 = "Number of planned Vacations :"
Range("B2").Select
ActiveCell.FormulaR1C1 = _
"=COUNTA(Sheet1!C5:C34)"
Range("B3").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(Sheet1!E5:E35,""Yes"")"
Range("C1").Select
ActiveCell.FormulaR1C1 = "From: "
Selection.Font.Bold = True
Range("C2").Select
ActiveCell.FormulaR1C1 = "Number Of Working Days out of Office:"
Range("C3").Select
ActiveCell.FormulaR1C1 = "Number of non planned Vacations :"
Range("D2").Select
ActiveCell.FormulaR1C1 = _
"=COUNTA(Sheet1!D5:D34)"
Range("D3").Select
ActiveCell.FormulaR1C1 = "=COUNTIF(Sheet1!F5:F35,""Yes"")"
Range("E1").Select
ActiveCell.FormulaR1C1 = "To: "
Selection.Font.Bold = True
Range("E2").Select
ActiveCell.FormulaR1C1 = "Total Working Days : "
Selection.Font.Bold = True
Range("E3").Select
ActiveCell.FormulaR1C1 = "Total Vacation Days : "
Selection.Font.Bold = True
Range("F2").Select
ActiveCell.FormulaR1C1 = "=B2+D2"
Selection.Font.Bold = True
Range("F3").Select
ActiveCell.FormulaR1C1 = "= B3+D3"
Selection.Font.Bold = True
Cells.Select
Cells.EntireColumn.AutoFit
End Sub
2) I tried to create the workbook in a different way workbook ( Version 2 Attached ) ,, Where i do want to select the name from the combobox ( i could use a normal cell with a data validation but as i said , i want to educate my self this ) and when I do press the button , it select Coloumn A of the dates and Coloumn (Whatever corresponding to the name ) and make it as shown in sheet 3 With same Format , and in this i couldn't do anything , so culd you help in this as well ?
Version 2.xlsm
Bookmarks