Forum Discussion

ecotrad550's avatar
ecotrad550
Copper Contributor
Feb 14, 2022

time data validation

hi,

 

I want to create a hour reporting sheet.

i want that the user will in 1 cell input the starting hour and in the cell next to It the end hour.

However, I want to limit the user from entering less than 30 minutes intervals.

meaning - if he entered starting hour of 9:00, he cannot enter ending hour of 9:25, or 10:15. 

5 Replies

    • ecotrad550's avatar
      ecotrad550
      Copper Contributor

      HansVogelaar 

      because if the starting hour was 9:30, putting 10:15 as the end hour will mean 45 min. i want him to be able to input only half an hour or an hour, or an hour and a half, etc. intervals of half an hour. 

       

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        ecotrad550 Let's say the first starting time is in cell D4, use data validation with the following custom rule to accept only time on the half or whole hour.

         

        =D4=MROUND(D4,30/1440)

         

        and copy that format to all other cell where the time entry should follow this rule.

         

Resources