Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Yes, that is what I'm trying to do. Where do I type the cell references to
allow the function to know where my dates are located? Do I need to type something in the ROW()? My dates are located in X29:IV29, and the students' names start in row 33. Thank you for your help. "Toppers" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy of excel file not showing formulal/function in the function b | Excel Discussion (Misc queries) | |||
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) | Excel Worksheet Functions | |||
Offset function with nested match function not finding host ss. | Excel Worksheet Functions | |||
Emulate Index/Match combo function w/ VBA custom function | Excel Worksheet Functions | |||
Adding a custom function to the default excel function list | Excel Programming |