Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet set up to allow a user to enter daily class attendance
for a group of 100 students. User makes selections from Data Validation in AE3, AF3, and AG3 for student name, class name, and class duration, then clicks a button to enter time spent in that class by that student on that day. Routine designed to eliminate all the scrolling and locating that would otherwise be necessary. ColA made up of 100 blocks (1 per student) starting with student name followed by a class list Dates are in Row2 Current way of doing it all that works fine: Sub FindClass() 'called from button click Dim ThisClass As String, Rng As Range Application.ScreenUpdating = False '---Locate chosen Student name Columns("A:A").Find(Range("AE3")).Activate '---Locate chosen Class name below chosen Student name ThisClass = Range("AF3").Value Set Rng = Range(ActiveCell.Address, Range(ActiveCell.Address).End (xlDown)) Rng.Find(ThisClass).Select '---Enter chosen Class duration '---under chosen date for chosen Student and Class '---Allow toggle if mistake is made '---Apprise user of Class duration entry status Set Rng = Selection.Offset(0, Rows(2).Find(Date).Column - 1) If Rng.Value 0 Then Rng = "" Range("AE4") = "Time Deleted" Range("AE4").Font.ColorIndex = 3 Else Rng.Value = Range("AG3").Value Range("AE4") = "Time Added" Range("AE4").Font.ColorIndex = 10 End If '---Go back to choose next Student Range("AE3").Select '---Turn off Class duration entry status display Application.OnTime Now + TimeValue("0:00:02"), "BlankIt" End Sub Sub BlankIt() Range("AE4") = "" End Sub What I'm thinking is that instead of this 'linear' way, a shorter routine could find the intersection of the 3 variables. I want to impress my friends <g -- David |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Intersection | Charts and Charting in Excel | |||
Intersection | Excel Discussion (Misc queries) | |||
Intersection help | Excel Discussion (Misc queries) | |||
Intersection | Excel Discussion (Misc queries) | |||
Intersection? | Excel Programming |