jimfernish
New Member
- Joined
- May 29, 2018
- Messages
- 1
Overview:
Create a worksheet that allows employees to track their hours worked each day. Before allowing time entries, verify the user has entered their Name, Number and a Pay period date. After verifying the (3) fields have been filled, validate the time entry and round to the nearest 15 minute interval. Allow the user to enter;
Goal:
After the user enters data into a cell, use Data Validation to call a Visual Basic subroutine. My thoughts are to use the ActiveCell.Value;
Questions:
Create a worksheet that allows employees to track their hours worked each day. Before allowing time entries, verify the user has entered their Name, Number and a Pay period date. After verifying the (3) fields have been filled, validate the time entry and round to the nearest 15 minute interval. Allow the user to enter;
- 8a convert this cell value to 0800, display the entry as 8:00am
- 812a convert this cell value to 0815, display the entry as 8:15am
- 12p convert this cell value to 1200, display the entry as 12:00pm
- 105p convert this cell value to 1300, display the entry as 1:00pm
- 455p convert this cell value to 1700, display the entry as 5:00pm
- 1700 complete the other validations, display the entry as 5:00pm
Goal:
After the user enters data into a cell, use Data Validation to call a Visual Basic subroutine. My thoughts are to use the ActiveCell.Value;
- Verify Name, Number & Date cells are filled
- Use ActiveCell.Value and verify time entry is a true time entry and manipulate the cell value as needed.
- If any of the (3) cells are not filled, return an error box with the missing item message.
- If the time entry is not valid, return an error box with “invalid time entry” message
- Return the updated ActiveCell.Value with the manipulated value to the active cell in the worksheet, if time is valid.
Questions:
- Is it possible to create a function that call the subroutine, validates and returns the manipulated cell contents?
- Are there any examples of the Functions & Subroutines?