+ Reply to Thread
Results 1 to 5 of 5

Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    21

    Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)

    Hello can anyone please help?

    I would like to set up in booking in / out sheet for a youth club. The idea is that a person can be clocked in and out using 1 button and that the button will sequentially move along the columns.

    I would like this to be allocated to numerous rows where the time can be logged for each individual.

    I have attached a workbook, if anyone can help i would be really appreciative. Many thanks.

    (Is there a way to make the macro button conditional format Green for in and red for out?)

    Thank you for anyone who can help.
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)

    Not clear to me where the Button is and what it should do.
    How and why would you like the "button" to move along columns?
    What would tell the "button" which youth is coming IN or OUT?
    What do the numbers in columns titles mean?
    No problem to change the color in Green or Red?
    Would you mind to give some more explanations of the whole process?
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)

    Hello and thank you very much for your question.

    I was hoping to make the switch (with macro) in column C (egC5) register the actual time its pressed in row 5 from column F onwards.

    In column D i has used a countA function with isodd function to flag in or out with conditional format- ideally i would just like the switches in column C change colour if that is possible?

    Thank you to anyone who can help, many thanks

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)

    You did not tell me what the numbers 1 to 6 for in column's titles are. Are they for DAYS (Monday thru Saturday)?
    Anyway, here is a macro you can try. It uses the Selection_Change event of Excel. It means, every time a new cell is selected, this macro is triggered. The macro look if the selected cell is in column 3 and if so, it add the time in the proper column and write IN or OUT in column D and also color it.
    Before any changes are made to the sheet, the macro ask for a confirmation. In the message box, it states the name of the youth and ask if Yes or No it can proceed. Default answer is Y for Yes so users just have to hit the enter key to continue.
    Here is the macro:
    Please Login or Register  to view this content.
    look at attached workbook to see how it will work.
    Hope it looks close to what you were looking for.

    P.S. do not hide column E as this will create issue with the macro.
    Attached Files Attached Files
    Last edited by p24leclerc; 05-29-2013 at 02:44 PM.

  5. #5
    Registered User
    Join Date
    02-14-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2007
    Posts
    21

    Re: Clock In/Out - Macro to Log Time by a Switch on multiple columns (multiple rows)

    Thank you very much. It worked a treat. many thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1