Function Help
Another solution to allow for dates outside range A1 to Z1:
=INDIRECT(LastDateColumn(ROW())) in LastDateAttended column
Function LastDateColumn(r)
Dim i as integer
i = Cells(r, Columns.Count).End(xlToLeft).Column
LastDateColumn = Cells(1, i).Address
End Function
HTH
"Toppers" wrote:
Sorry ... typo LastData should be LastDate
Function LastDate(r)
LastDate = Cells(r, Columns.Count).End(xlToLeft).Column
End Function
"Toppers" wrote:
Put this in each cell in the LastDateAttended column and add the user-defined
function below:_
=INDIRECT(CHAR(LastDate(ROW())+64) & "1")
I am assuming you find the LastDateAttended by looking for the last entry in
each student's row i.e the 1.5. 2.0 etc data, and taking the corresponding
date from row 1.
Function LastDate(r)
LastData = Cells(r, Columns.Count).End(xlToLeft).Column
End Function
HTH
"stacyjhaskins" wrote:
I would like to create a function that would return the last date a student
attended class. The spreadsheet is setup like below:
Dates *LastDateAttended 7/1 7/2 7/3
-----------------------------------------------------------------------
Student1 No Show
Student2 7/3 1.5 2.5 2
Student3 7/2 2.5
Any suggestions?
|