Tom M
asked on
Drop down data?
Payroll question.xlsxAs a user enters time starting at M7 is it possible to get the N7 to start at the next time stamp. So for example if 7:00 is entered in M7 the first time in the drop down for N7 would be 7:30. if 7:30 was then entered in N7 M7's first drop down would be 8:00 and so as time is being entered?
VBA is not required for this request.
The trick is to create two named ranges StartTimes and FinishTimes on each of the worksheets.
To create Tuesday!StartTimes, select Tuesday cell M7 and use the Formulas...Name Manager ribbon item to create the named range with the formula:
To create Tuesday!FinishTimes, select cell N7 and create the named range with the formula:
Because the named ranges have worksheet scope, you'll need to create them for each worksheet Sunday through Saturday. The easy way to do that is to copy Tuesday six times, then rename those worksheets as desired.
Payroll-questionQ29198670.xlsx
The trick is to create two named ranges StartTimes and FinishTimes on each of the worksheets.
To create Tuesday!StartTimes, select Tuesday cell M7 and use the Formulas...Name Manager ribbon item to create the named range with the formula:
=INDEX(Driver!$L$3:$L$50,MATCH(Tuesday!$N6,Driver!$L$3:$L$50,0)):Driver!$L$50
You may then use that in cell M7 data validation with the source formula =StartTimesTo create Tuesday!FinishTimes, select cell N7 and create the named range with the formula:
=INDEX(Driver!$L$3:$L$50,MATCH(Tuesday!$M7,Driver!$L$3:$L$50,0)+1):Driver!$L$50
You may then use that named range in cell N7 data validation with the source formula =FinishTimesBecause the named ranges have worksheet scope, you'll need to create them for each worksheet Sunday through Saturday. The easy way to do that is to copy Tuesday six times, then rename those worksheets as desired.
Payroll-questionQ29198670.xlsx
ASKER
What have I done wrong? Payroll question.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Can you think of a reason why the drop down box might disappear when I share this file in sharepoint. What is happening is say i enter 1:00 as start time in k7 the l7 has the drop down and things work fine, but if say I enter 7:00 as the startime in k7 the i7 drop down disappears
Could you please post a file that reproduces this problem? The file I posted has Start time in column M and Finish time in column N, so I know you made some changes.
ASKER
Here is the file, it seems to work just fine until I place the file in Sharepoint that is when the drop down times mysteriouslyPayroll Question.xlsx disappear
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Paul