Force users to Input hours on timecard

Jerk24

Board Regular
Joined
Oct 10, 2012
Messages
190
Good Morning.


I have a master workbook that is feed from employee time cards. what is to make sure that there are certain cells filled out when a code is entered into the following merged cells

If Range "Type" is not blank, corrisponding Range "Hours" the same row needs to have a number. i would like a message box to appear before this is saved to read (Please input the number of hours you did not work) ...

Also

to include the above rule I need to see if Range "Type" has the code "LM" my range "To" needs to have the word drill or a 6 digit number.

if not before it is saved i need a message to read ("Please input or order number for the day you used LM")

I will take the code and apply it to each time card.

I hope this is clear enough to get started.
 
Before using this code, save the file and give it a name, dont' forget to save it as a .xlxm file, then enter on the VBA window, on the VBA project window select double click on "Thisworkbook", and then paste the code...
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
OK that works better. Thank you

A few things after a quick trial...

I only need it to enforce the rules to row 20.

When the code picks up "LM" it does not make me input the job number in each row with LM, only a few.

Also another thing i need, If in Merged Cell M10:R10 (down to M19:R19) is less than 8 I need a start time in S10:X10 (down to S19:X19) and a end time in Y10:AE10 (down to Y19:AE19) thanks
 
Upvote 0
I only need it to enforce the rules to row 20.
As far as i understood, you don't have any data in this row... Or do you? What data?

When the code picks up "LM" it does not make me input the job number in each row with LM, only a few.

When so?
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top