Y
yshridhar
Hello all
I maintain school database in excel. I am entering the students attendance
using excel using the macro. The work book contain sheets - Data, months
(Jan, Feb,..)
Sub attendance()
Sheets("data").Select
Range("e3").Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("Jan").Select
Range("C3").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("data").Select
Range("a3").Select
End Sub
The data.sheet where i enter absenties list in A:B columns. In column D -
student ID, and E - the formula
=IF(ISNUMBER(MATCH(D3,$A$3:$A$100,0)),"a",IF(ISNUMBER(MATCH(D3,$B$3:$B$100,0)),0.5,1))
if the student is absent = "a", present half day = 0.5, else = 1
The column E is copied via macro to Jan-sheet to C3.
What I want is if i enter Date in Data.C2, the macro has to copy the Column
E to the respective month sheet and Day column.
Sheets("Jan").Select --- get the month from date - Data.c2
Range("C3").Select ---- Get the date - Data.c2
Any suggestions.
Thanks to all in advance
With warm regards
Sridhar
I maintain school database in excel. I am entering the students attendance
using excel using the macro. The work book contain sheets - Data, months
(Jan, Feb,..)
Sub attendance()
Sheets("data").Select
Range("e3").Select
Range(Selection, Selection.End(xlDown)).Copy
Sheets("Jan").Select
Range("C3").Select
Selection.PasteSpecial Paste:=xlPasteValues
Application.CutCopyMode = False
Sheets("data").Select
Range("a3").Select
End Sub
The data.sheet where i enter absenties list in A:B columns. In column D -
student ID, and E - the formula
=IF(ISNUMBER(MATCH(D3,$A$3:$A$100,0)),"a",IF(ISNUMBER(MATCH(D3,$B$3:$B$100,0)),0.5,1))
if the student is absent = "a", present half day = 0.5, else = 1
The column E is copied via macro to Jan-sheet to C3.
What I want is if i enter Date in Data.C2, the macro has to copy the Column
E to the respective month sheet and Day column.
Sheets("Jan").Select --- get the month from date - Data.c2
Range("C3").Select ---- Get the date - Data.c2
Any suggestions.
Thanks to all in advance
With warm regards
Sridhar