ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Excel Cell Restrictions (https://www.excelbanter.com/excel-worksheet-functions/28102-re-excel-cell-restrictions.html)

sandy.cariappa

Excel Cell Restrictions
 

Ola: Fab formula, its working fine. Now i have restrited my users to
enter only the system time. I have now 2 more challenges which have
cropped up for which i need you advise

1. The cell accepts system time in hour and minute format only but does
not record the seconds format. It would be fantastic if I could track
time in the following format : hh/mm/ss (system time)

2. Is there an option with which i can lock a cell the moment a user
enters the current system time? Eg: Start time : 10:00:01 (The moment
the user inputs this time fomat the cell should automatically get
locked and no one should be able to amend this cell apart from myself -
Automated Password lock)

Thanks again for the fab formula as its made my life a little easier.

Awaiting your response at the earleist

Cheers Ola

SandstorM


--
sandy.cariappa
------------------------------------------------------------------------
sandy.cariappa's Profile: http://www.excelforum.com/member.php...o&userid=23603
View this thread: http://www.excelforum.com/showthread...hreadid=372824


wizard5353


Hi,

For question 1 just right click on the cell with the time and change
the cell format to to time and select the hh:mm:ss type. But the
problem you will have now is that the CONT+SHIFT+: shortcut will only
get the time to minuets and not seconds so the time will always be :00
at the end.

It sounds like you are trying to build a timestamp from what you’re
asking. There is some great examples of time stamps here. Just do a
search and see what you find. Here is one I've used in the past:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A1"), .Cells) Is Nothing Then
Application.EnableEvents = False
With .Offset(0, 1)
.NumberFormat = "hh:mm:ss"
.Value = Time
End With
Application.EnableEvents = True
End If
End With
End Sub

This will look for data entered in to cell A1 and input the time in to
cell B1.

Question 2 can be done using worksheet protection and an event macro.

Hope that helps,

- NJ


--
wizard5353
------------------------------------------------------------------------
wizard5353's Profile: http://www.excelforum.com/member.php...o&userid=23692
View this thread: http://www.excelforum.com/showthread...hreadid=372824



All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com