Auto Protecting cells & auto filling date

I wonder if anyone can tell me if it is possible to auto proect cells
after data has been entered?

Basically I have a spreadsheet that has two levels of protection - some
cells are password protected and others available for all to enter data
into.

What I would like to achieve is once data has been entered into a row
in the editable area that row becomes part of the password protected
area automatically.

Also is it possible to use the NOW (or similar) function to populate
one cell with a date when another is filled?

Ie a log entry is made in column B.  When some data is entered into
column B cthe corresponding entry in column A gets filled with todays
date.

Any help much appreciated.

Regards
Clive


-- 
ccarmock
------------------------------------------------------------------------
ccarmock's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27670
View this thread: http://www.excelforum.com/showthread.php?threadid=471820

0
9/29/2005 5:03:28 PM
excel.misc 78881 articles. 5 followers. Follow

7 Replies
744 Views

Similar Articles

[PageSpeed] 57

I can't answer the first part, but the second part is easy
just enter into a1     =IF(b1=0,0,NOW())
format a1 as a date 
in tools/options    uncheck show zeros

"ccarmock" wrote:

> 
> I wonder if anyone can tell me if it is possible to auto proect cells
> after data has been entered?
> 
> Basically I have a spreadsheet that has two levels of protection - some
> cells are password protected and others available for all to enter data
> into.
> 
> What I would like to achieve is once data has been entered into a row
> in the editable area that row becomes part of the password protected
> area automatically.
> 
> Also is it possible to use the NOW (or similar) function to populate
> one cell with a date when another is filled?
> 
> Ie a log entry is made in column B.  When some data is entered into
> column B cthe corresponding entry in column A gets filled with todays
> date.
> 
> Any help much appreciated.
> 
> Regards
> Clive
> 
> 
> -- 
> ccarmock
> ------------------------------------------------------------------------
> ccarmock's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27670
> View this thread: http://www.excelforum.com/showthread.php?threadid=471820
> 
> 
0
widman (34)
9/29/2005 6:07:04 PM
The only problem with NOW is that it always will reset to the day it is 
opened or printed

"widman" wrote:

> I can't answer the first part, but the second part is easy
> just enter into a1     =IF(b1=0,0,NOW())
> format a1 as a date 
> in tools/options    uncheck show zeros
> 
> "ccarmock" wrote:
> 
> > 
> > I wonder if anyone can tell me if it is possible to auto proect cells
> > after data has been entered?
> > 
> > Basically I have a spreadsheet that has two levels of protection - some
> > cells are password protected and others available for all to enter data
> > into.
> > 
> > What I would like to achieve is once data has been entered into a row
> > in the editable area that row becomes part of the password protected
> > area automatically.
> > 
> > Also is it possible to use the NOW (or similar) function to populate
> > one cell with a date when another is filled?
> > 
> > Ie a log entry is made in column B.  When some data is entered into
> > column B cthe corresponding entry in column A gets filled with todays
> > date.
> > 
> > Any help much appreciated.
> > 
> > Regards
> > Clive
> > 
> > 
> > -- 
> > ccarmock
> > ------------------------------------------------------------------------
> > ccarmock's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27670
> > View this thread: http://www.excelforum.com/showthread.php?threadid=471820
> > 
> > 
0
widman (34)
9/29/2005 6:39:05 PM
Yes I see what you mean - so every time I open the sheet the dates ar
updated.....

If the first time it triggers it coudl replace the formula with th
actual value that woudl achieve what I need...

--
ccarmoc
-----------------------------------------------------------------------
ccarmock's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2767
View this thread: http://www.excelforum.com/showthread.php?threadid=47182

0
9/29/2005 7:38:30 PM
ccarmock

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col B
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 2 Then
        n = Target.Row
        If Excel.Range("B" & n).Value <> "" Then
            Excel.Range("A" & n).Value = Now
        End If
    End If
enditall:
Application.EnableEvents = True
End Sub

This is sheet event code.

Right-click on the sheet tab and "View Code".

Copy/paste the code into that module.  As you enter data in column B, the date
will be placed in A on same row.


Gord Dibben Excel MVP

On Thu, 29 Sep 2005 14:38:30 -0500, ccarmock
<ccarmock.1w4zie_1128024309.0695@excelforum-nospam.com> wrote:

>
>Yes I see what you mean - so every time I open the sheet the dates are
>updated.....
>
>If the first time it triggers it coudl replace the formula with the
>actual value that woudl achieve what I need....

0
Gord
9/29/2005 9:06:06 PM
Hi - Many thanks that works perfectly!

I wonder if something similar could be used to modify the ranges used
to protect data in the worksheet?

Ie once data is entered into a cell in column B I woudl then like to
change that cell from being in a range that allows anyone to edit into
a range that is password protected.

Regards
Clive


-- 
ccarmock
------------------------------------------------------------------------
ccarmock's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27670
View this thread: http://www.excelforum.com/showthread.php?threadid=471820

0
9/30/2005 4:54:23 PM
One further question on this - when I lock the spreadsheet (as I don
want the date to be modified by the user, the system can no longe
update column A with the date of the change.

To achieve this I have column B set to allow Everyone to make change
while the rest of the sheet requires a password to edit ranges.

I guess I can get the Macro to turn off protection and turn it o
again?   However would this mean storing the password in the Macro? 
Again not an issue, but I would then need to be able to prevent th
user from looking at the Macro code to discover the password - is tha
possible? 

Or alternatively is there the concept of allowing the 'SYSTEM
permission to update a range of cells, this might be a cleane
approach

--
ccarmoc
-----------------------------------------------------------------------
ccarmock's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2767
View this thread: http://www.excelforum.com/showthread.php?threadid=47182

0
9/30/2005 5:30:06 PM
ccarmock

Depending upon how sophisticated your users are and whether or not they enable
macros upon opening the workbook you can achieve most of what you want.

First, unlock columns A and B then protect the sheet with a password("justme")
is example only.

The Sub following will enter a date in column A and lock that cell in Column A
but leaving rest of column A unlocked.

B must remain unprotected in order for users to enter data.

Add the code below to the sheet module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col B
'if a date is in A, it won't change when B is updated
On Error GoTo enditall
Application.EnableEvents = False
If Target.Cells.Column = 2 Then
SHEETUNPROTECT
        N = Target.Row
             If Excel.Range("B" & N).Value <> "" _
             And Excel.Range("A" & N).Value = "" Then
             Excel.Range("A" & N).Value = Now
             Excel.Range("A" & N).Locked = True
        End If
    End If
enditall:
Application.EnableEvents = True
SHEETPROTECT
End Sub

Now copy the following macros to a new general module in the workbook.

Sub SHEETPROTECT()
    ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
            Contents:=True, Scenarios:=True
End Sub

Sub SHEETUNPROTECT()
    ActiveSheet.Unprotect Password:="justme"
End Sub

Right-click on the workbook/project and select VBAProject Properties then
"Lock project for viewing"

You can password protect this module so prying eyes can't see it and obtain
the password("justme").

You now save the workbook and close Excel....the VBAProject locking won't come
into effect until Excel is closed out fully.

If the users enable macros and if no one of them knows how to crack a
VBAProject password, you should be good to go.


Gord


On Fri, 30 Sep 2005 12:30:06 -0500, ccarmock
<ccarmock.1w6omi_1128103506.7565@excelforum-nospam.com> wrote:

>
>One further question on this - when I lock the spreadsheet (as I dont
>want the date to be modified by the user, the system can no longer
>update column A with the date of the change.
>
>To achieve this I have column B set to allow Everyone to make changes
>while the rest of the sheet requires a password to edit ranges.
>
>I guess I can get the Macro to turn off protection and turn it on
>again?   However would this mean storing the password in the Macro?  
>Again not an issue, but I would then need to be able to prevent the
>user from looking at the Macro code to discover the password - is that
>possible? 
>
>Or alternatively is there the concept of allowing the 'SYSTEM'
>permission to update a range of cells, this might be a cleaner
>approach.

0
Gord
9/30/2005 8:21:50 PM
Reply:

Similar Artilces:

Difference between two date/time values
Hi, Cell A1 has 21-04-10 07:00 PM Cell A2 has 06-06-10 07:52 AM (the dates are in the dd-mm-yy format) Cell A3 has the formula =A2-A1 for showing the differences in days and time and is formatted with the custom format: dd h:mm:ss The display in cell A3 is 14 12:52:00. While the difference in hours is okay, the difference in days should be more than 14 as there is are 31 days of May between the two dates. Is there another format to show the correct difference in days or should be done some other way? Please help. Thanks in advance. Regards, Raj Do you really need ...

Populate a cell if values in cell 1 and cell 2 match cell 3 and 4
I need help with a formula please. I need to search through a column of data and populate a cell if it meets a condition. For example: IF FirstWorksheet!A2 = SecondWorksheet!ColumnAx and FirstWorksheet!B2 = SecondWorksheet!ColumnBx Then populate SecondWorksheet!Cx with value from FirstWorksheet!C2 I have to match up a column of data in one worksheet with data in 2 columns in another worksheet. Help plz. Thanks T- A multi-criteria index n match (array-entered) should work here In Sheet2, Copy n paste this into C2's formula bar, then array-enter the formula by pressing CTRL+...

Auto Filter problem
I am using the auto filter for a particular column to sort out differen medical programs. When I click the drop down and click a program, i doesnt show me ALL the lines that say this particular program. Why is this? -- Message posted from http://www.ExcelForum.com Hi maybe some hidden characters in these lines 8e.g. additional space characters, etc.) -- Regards Frank Kabel Frankfurt, Germany "jkb724 >" <<jkb724.19rasx@excelforum-nospam.com> schrieb im Newsbeitrag news:jkb724.19rasx@excelforum-nospam.com... > I am using the auto filter for a particular column to so...

Split a cell
Am I able to split a cell, making it 2 as in Microsoft Word? Select a cell or entire column you want to split, then select Data - Text to Columns. Make sure you have an empty column on the right of the column you're spliting or there won't be any room for the data you're spliting off. >-----Original Message----- >Am I able to split a cell, making it 2 as in Microsoft >Word? >. > Priscilla, No. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Priscilla" <anonymous@discussions.microsoft.c...

todays date
Hi I have a cell that I want to know when something will be finished i.e. today()+30.which gives 02/07/04. This is ok until I open the spreadsheet tomorrow when I will get 03/07/04. How can I get the date 02/07/04 to remain every day or do I just enter the date manually? Thanks tricia Hi Tricia! You've noted that TODAY() is volatile and will change on recalculation if the date has changed. You might prefer entry using: Ctrl + ; -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Hi Tricia, You would need a macro. If you say you have a cell, you ar...

Auto-Editing
Word 2003 has a very annoying default. It assumes too much! If I reformat a few words in a document, it changes the entire document to that formatting. Grr-rrr-r! I have to constantly press undo to get what I want. I know there's a feature that's causing this annoyance but I can't find it to turn it off! Can anyone help, please? See http://word.mvps.org/faqs/formatting/wholedocumentreformatted.htm. -- Stefan Blom Microsoft Word MVP "Connie Martin" <ConnieMartin@discussions.microsoft.com> wrote in message news:CD959D82-F81B-4A9D-993E-73...

Date/Time criteria problem
I am trying to create a query that allows a user to select a specific date for which to show results. Following is sample SQL with a fixed criteria: SELECT qryShopJobsIO1.JOB_NO, qryShopJobsIO1.[TOTAL QUANTITY ORDERED], qryShopJobsIO1.[ENTRY DATE], qryShopJobsIO1.SumOfTotalHours FROM qryShopJobsIO1 WHERE (((qryShopJobsIO1.[ENTRY DATE])=#4/27/2010#)); This particular example returns no records. I know that I have records for which the ENTRY DATE field is 4/27/2010. I believe that the problem is that the default value of that field (in the table definition) is set to =Now() ...

Auto-Calculate
I have a spreadsheet that utilize the stock quote add-in from MSN. On a daily basis I refresh the add-in functions for the Highs, Lows, Last, Volume, etc. On occasion the spreadsheet reverts to manual caculation settings, and I have to press the F9 even after I updated the quotes. I've always preferred the any spreadsheets I open, blank or otherwise, the automatic setting selected for calculations. I consider this an annoyance. Has anyone experienced this glitch? Is there a fix for it? Ron_D Ron Excel takes the calculation mode from the first workbook that opens in a session. Sub...

Placing a mask within a cell
Howdy All, Here is what I am trying to do. I have a column with numbers in it. 1,2,3,etc. I want to prefix these numbers with Page.. and have the results look this this: "Page..1" "Page..2" With the quotation marks included. Can anyone help me out? Thanks, Brian One way: Format/Cell/Number/Custom \""Page..."0\" In article <uEaiQGMeFHA.1448@TK2MSFTNGP09.phx.gbl>, "Brian" <treddderx@yahoo.com> wrote: > Howdy All, > > Here is what I am trying to do. > > I have a column with numbers in it. 1,2,3,e...

Subtracting Dates in Smartlist Builder
I am trying to substract the Requested Ship date from the Invoice Date in SOP thru a calculated field in Smartlist Builder. I have tried all field types available for the result and it does not work. This is GP 9.0. Any suggestions? If you just want the number of days between the two dates, define a calculated field using the following: datediff(day,InvoiceDate,RequestedDate). Note that the formula will subtract the first parameter date from the second one, so in the above example if the InvoiceDate is less than the RequestedDate you'll get a positive number; otherwise, you'll ...

auto copy self
How do I arrange for Outlook to automatically copy myself on every new, reply or forward email? If you mean keep a copy of all sent, see settings under Tools/Options/Email Options and Advanced Options David "rich" <steamuk@aol.com> wrote in message news:055c01c3664f$dadecd30$a001280a@phx.gbl... > How do I arrange for Outlook to automatically copy myself > on every new, reply or forward email? ...

Auto correct or Auto complete
We are all familiar witht he auto correct or auto complete functions found in MS applications. Of course that means it is available in Access also. My question is this ... can this function be replicated within the DB, so that the set of auto correct items are part of the package rather than something that would have to be set up on each individual desktop system? It's use, for me, would primarily be within a memo field where medical abreviations, used as a shortcut, would convert to the true meaning as the user types them in. Ex: "prn" without quotes would change to. &qu...

Auto Scale Chart Macro -- Any improvements please?
This is the best way I've found to correctly scale a chart -- the only way I found to exclude a chart interpolating with #NA cells was to delete those cells containing #NA, and run the chart. This takes a long time on my computer. Wondering if there is a better way. This macro is directly taken from 2 excel mvps and modified; i believe a mehta and ron bovarty, but could be wrong. Thanks for taking a look. Sub AutoScaleYAxes() Dim ValuesArray(), SeriesValues As Variant Dim Ctr As Integer, TotCtr As Integer Application.Run "Extend_Stock_Data" Applic...

Counting colored cells
I need to count the number of rows (or cells) that are are a particular color. ex: How many cells in column A are red? Daniel, You need a VBA function to do this. See the CountByColor function at http://www.cpearson.com/excel/colors.htm . -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com chip@cpearson.com "Daniel" <dcarlileaz@hotmail.com> wrote in message news:0c9901c3886b$a55b7b20$a401280a@phx.gbl... > I need to count the number of rows (or cells) that are are > a particular color. ex: How many cells in column A are > red? ...

money with firewall and virus protection
ON TRYING TO INSTAL MONEY 2004 I FIND ERROR MESSAGE SAYING IT CANNOT INSTALL IT WITH FIREWALL AND VIRUS PROTECTION, AS IT CAN HAVE TROUBLE WITH OPERATION. WILL IT WORK IF I DISABLE THE FIREWALL? For starters please learn to turn off the CAPS LOCK, it is hard to read and irritating! Now lecture over. Some AV's and Firewalls don't like Money so a) disconnect from Internet, b) Uninstall AV etc, c) install Money, d) reinstall AV, e) reconnect. Once the AV/Firewall finds Money already installed it will be happy. -- Regards Bob Peel, Microsoft MVP - Money Hints/Tips http:/...

how do format using bullets in a cell in excel?
I am trying to format a list using bullets in one cell in an excel spreadsheet. Can somone please provide some suggestions on how to do this? I have tried copying and pasting from Word, and that doesn't work either. I just had to do this today. Here is what I did and it looked pretty good Format the first character of your text as Wingdings, and type the CAP L, that is a round bullet charater, then reformat to the font you wish to use and type away. "olliesf" wrote: > I am trying to format a list using bullets in one cell in an excel > spreadsheet. Can somone pleas...

OWA auto login
I am trying to use the credentials from the forms authentication login to automaticaly log in to Outlook Web. I redirect to a URL with this format: http://UserName:Password@mailserver/exchange I have seen this example in other posts but this does not work for me. I still get the Outlook Windows Login prompt. Perry Perecli Manole wrote: > I am trying to use the credentials from the forms authentication > login to automaticaly log in to Outlook Web. I redirect to a URL with > this format: http://UserName:Password@mailserver/exchange > I have seen this example in other posts but t...

SAVE FILE
I have developed a file with a macro which is protected by a password. A "Save" button with the assigned macro calls the procedure in the macro and when I am trying to save a file the following message appears "You cannot save this file format when the VBA Project is protected You may unprotect the VBA Project by......" What do you suggest I do to save a file with a protected macro? The macro must be protected, it is very important for me not to allow access to the macro in totallity. I am using certain cells' information to name the file My code lo...

Any way to get rid of an auto-suggestion in the login dialog box, for Exchange/OL using RPC over HTTP?
A client was using RPC over HTTP to two different Exchange servers (OL prompting for profile on startup). Both profiles were set up to prompt for credentials upon connection to Exchange. There's now only one Outlook profile needed; the other is gone and OL isn't prompting for the profile selection any longer, which is fine. However, Outlook is remembering domain1\user and domain2\user in the login dialog box, and I'd love to be able to get rid of the no-longer-valid credential dropdown suggestion. (The computer is not a member of a domain and hence always needs to be prom...

How to save contents of cell range in an array?
In a VBA subroutine, how can one, for example, save the contents (numbers) of the range A1:L12 in the array x(12,12)? And how does one declare x()? Thanks in advance. John Uebersax dim x as variant x = Activesheet.Range("A1:L12").value Tim "John Uebersax" <jsuebersax@gmail.com> wrote in message news:8ef21027-a145-4022-8940-843b4cf2c943@j9g2000prh.googlegroups.com... > In a VBA subroutine, how can one, for example, save the contents > (numbers) of the range A1:L12 in the array x(12,12)? > > And how does one declare x()? > > ...

Auto look through subfolders
Please help. I can write a macro that will extract data from all excel files in a specific folder. What I need to be able to do is write a macro that will automatically extract data from excel files within folders and sub folders and sub sub folders etc For example the data is all held on the following directory: H:\development forms\2006 cost sheets\ And within that directory by customer - for example Tesco, Boots, Asda etc. These customers are then subdivided into product ranges - eg 1,2,3,4 etc and some futher subdivided by national or exclusive. All the excel files are in exactly th...

Data validation with a cell value linked to the same cell.
I Think that my post name is very confusing but I'll explain. I�m doing a data validation in cell f1 usig the data validation option the value entered in cell f1 need to be equal or greatter than th value in cell b2 and cell b2 is calculated with the formula =a2+c4-f1. What I'm trying to do is to prevent to enter a value in cell f1 tha I'll make cell b2 negative. But its not working, any suggetsions??? Thanks. Rodolf -- Message posted from http://www.ExcelForum.com Change your CF criterion to Formula is = F1 <= (A2+C4) In article <rodolform.161w07@excelforum-n...

An auto reply to an auto reply!
Had the funniest situation yesterday. Somebody emailed a public folder we have set up. On there we have a rule to send a reply saying thanks for your email -someone will be with you shortly (we have to have this message on - it is for some website that recently went live). Now that auto reply went back to the guy who emailed - who must have sent it from a public folder himself (as he forwarded the original email from a public folder). The guy received our auto reply - and promptly his email system sent an auto reply to us. As is the way it is set up - our email system sent him an auto ...

qry for dates in 1st 2nd 3rd and forth quarters of current year!
Hello i am looking to write a query which returns values for the current year only! DatePart("q",[Start Date],Year([start date])=Year(Date())) is what i have written but this includes enteries for next year which i dont need! any ideas please!!! thanks in advance hi, smason wrote: > DatePart("q",[Start Date],Year([start date])=Year(Date())) > is what i have written but this includes enteries for next year which i > dont need! any ideas please!!! You need to filter for the current year, e.g. SELECT DatePart("q",[Start Date]) FROM [yourT...

On POS (not RMS) Adjusting Time Clock Entry Defaults to Todays Date
When an employee negelects to time out and we make adjustments on a subsequent day, the Time Clock display will default to today's date even though the correct date is selected in the Employee's Time Clock window. You have to select Save and Close, then reopen the Time Clock event, then adjust the time out time to the correct date. Anybody else notice this bug? M Kalmus Dogtooth Coffee Company ...