Lock Past Rows As I Trigger A New One To Appear

Feb 18, 2009

This (unprotects the sheet first, then) unhids rows (starting at row 1500, until it reaches row 4). Now my most current vexation- How do I lock/protect the past rows?
Say a co-worker enters information in row 1500 and walks away. The next co-worker inserts a new row (which would be row 1499) to place data in there, how can I get row 1500 to lock (or become protected) as the new row (which in this case 1499) would become unhidden?
It would be very important that the information in the previous rows remain locked so that nobody can change any client information (unless they had supervisory/administration access).

If it is not possible to protect or lock the whole row, it would also work if I could just lock one of the cells in the previous row.

I am using the following

Sub Row_Unhiding()
'
' Row_Unhiding Macro
' Macro recorded 2/12/2009 by gr8_big_geek
'
' Keyboard Shortcut: Ctrl+i
'
ActiveSheet.Unprotect Password:="secret"
R = 1500
Do Until Rows(R).Hidden = True
R = R - 1
If R < 4 Then
MsgBox "No more rows to add!", vbCritical, "Error"
Exit Sub
End If
Loop
Rows(R).Hidden = False
ActiveSheet.Protect Password:="secret"
End Sub

View 9 Replies


ADVERTISEMENT

Lock / Protect Rows Past Due Date

Mar 5, 2008

I have a workbook list of activities that I am hoping will visualise the scheduling of routine maintenance tasks in my engineering department. The date of the most recent check is entered in row 6 and the interval in row 5. Hence the number 7 denotes a weekly check. The conditional format is such that the reds indicate that a check needs to be carried out. If the check is done on the scheduled day then a "Y" is entered into the square. This will then turn the square green. If "Y" is entered on any other day then the square turns orange to indicate the check is done, if not on time. The red squares do not change colour unless a yes is entered. This is designed to show the history of checks and give us the opportunity to show compliance to routines. What I need to do is lock the rows that have passed the current date, to prevent unscupulous modification. Thus the macro would look down column A and if the date is less than today() would lock the row. I have truncated the file as much as I can. A nice to have would be the facility for an adminstrator to go in (perhaps password protected) to make changes if necessary.

View 3 Replies View Related

Adjust Code From Cell Range Trigger To Button Trigger

Jul 1, 2014

I have the code below that is two separate activities and I want to change the second activity from a cell trigger (Set KeyCells = Range("K42:AD42")) to a button trigger. I need to first to remain unchanged.

I'd be ok if this was just one macro that I could assign to a button but because its two and I need to write the second's to clicking a button I'm over my head.

Its occured to me while writing this that because it'll be a range of buttons I'll probably need to make each one an individual code? Is this the case? If so I may have to just keep this as it is.

View 2 Replies View Related

Trigger For Conditional Formatting To Hide Rows

Oct 21, 2006

I found in this forum some vba code to insert into an excel spreadsheet a routine to hide rows if a value is < 1 in a column (Column B for this example). My problem is that it executes as you go down each cell in column B. I want to press a function key at the end of working on the spreadsheet to have it go line by line to hide rows that meet the condition. The code is as follows:

Private Sub Worksheet_Change(ByVal Target As Range)
Application. ScreenUpdating = False
' Dim R As Range
' Set R = Application.Intersect (Target, Range("B7:B7"))
' If R Is Nothing Then Exit Sub
With ActiveSheet
For Each Cell In Range("B5:B6")
If Cell.Value < 1 Then
Cell.EntireRow.Hidden = True
End If
Next
End With
Application.ScreenUpdating = True
End Sub

View 2 Replies View Related

Copy/past Rows From Sheet1 To Sheet2 But Only If - Automate Process?

Jun 24, 2009

I have two sheets: Sheet1 - linked from external file, new data coming daily.
Sheet2 - I need to copy/past Rows from Sheet1 to Sheet2 but only if B-cells are not empty. How can I automate the process?

View 2 Replies View Related

Function/formula To Copy/past Multiple Data Rows In Excel Worksheet

May 19, 2009

I am trying to find a way to copy and paste multiple non concurrent rows of data from one spreadsheet to another.

Ex: I have a large worksheet with approx 20,000 rows of data. I need to copy
and paste every 100th row to a new worksheet.

I think this might be possible by setting up a formula and linking worksheets,
but I'm not exactly sure how to do it.

View 12 Replies View Related

Lock Cells Together And Rank Rows

Sep 8, 2009

Basically I have recently started my own personal music chart and I'm having problems with a Year To Date page.

Basically all I want to know how to do is how to lock some cells together and rank many rows of those cells with 1 column where the total is?

I have attached the spreadsheet as a zip files as I was having problems uploading it as a xls file.

View 13 Replies View Related

Lock Rows Unless They Are Hidden Or Unhidden By Macros?

Jul 15, 2014

The small attached "Demo2" file indicates my problem. In the "Scorecard" sheet I'm using macros driven from listbox menus to hide or unhide rows on the "Tasks" sheet. It is VITAL that the rows on the "Tasks" sheet not be deleted or have new rows inserted. But, if I Protect them then the list box macros won't function. Is there a macro that will allow these macros to hide or unhide rows without allowing a user to add or delete these rows in the "Tasks" sheet? If possible a simple "global" solution is preferred as I have 100+ If/Then entries to contend with...

Attached File : DEMO2.xlsm‎

View 1 Replies View Related

VBA Hide Rows - Can't Lock To Protect Formulas

Jun 6, 2012

I have a SS that puls data from another sheet using the following formula

=IF(OR('Site Visit ASSESSMENT'!D9={"PARTIAL COMPLIANCE","NOT COMPLIANT","NOT ASSESSED","ADDITIONAL INFO NEEDED"}),'Site Visit ASSESSMENT'!A9,"")

I also have VB Code in teh sheet as follows to hide rows. If I protect colum A and protect sheet I get an error. How can I protect the sheet and still have the following commnad work?

Private Sub CommandButton1_Click()
'Toggle rows hidden where cells in column D are blank
If ActiveSheet.AutoFilterMode Then

[Code].....

View 6 Replies View Related

Excel 2010 :: Lock Rows And Columns

Dec 8, 2012

I have dedicated rows and column units.I do not want these to be changed from there current setting.Can just rows and columns be locked and password protected? If yes,where and how do i process this feature?

Excel 2010

View 9 Replies View Related

Lock Cell From Moving When Adding/Deleting Rows Or Columns

Jun 16, 2008

Will excel allow text to be permanently be positioned in a specific cell even if rows or columns are added?

View 6 Replies View Related

Excel 2007 :: Auto Lock Rows 6 Days After Date Passed

Jul 30, 2014

I am new to Excel programming, haven't done any before and not familiar with creating/editing macros. Using Excel 2007.

I would like to automatically lock all the cells in a row if the date in column A in that row is >= 7 days old. Data is entered once a week (some time Sunday - Saturday) and I would like historical data (rows) to be locked so that they can't be edited inadvertently.

If possible could I also highlight the current working week somehow?

I have attached the worksheet : testworksheet.xlsx

View 3 Replies View Related

Lock Sheets With Formulas And Lock Sheets With Values

Jul 2, 2009

do you know if there is vba code to lock formulas so someone sees but does not touch and the same for values see but cant change??

my sheets with formulas are SUMMARY and Sheet2

sheet with value is TABLE

View 9 Replies View Related

Lock All Rows Which Have A "Yes"

Oct 28, 2008

I have the following code which runs a macro when "Yes" is placed in column K. However, i also want a macro to lock all rows which have a "Yes" in column J after the macro [ExtractToSheets] is run. How do i add that into here?? I've tried lots of possibilities but normally only the row which the macro is run from actually locks or the macro doesn't run at all.

View 9 Replies View Related

Add Formula To One Past The Last Row

May 17, 2013

I need this code to also add the formula to one past the last Row

Now it goes down column A and if its not null it puts a formula in column D. I need it to also put the formula in column D one row past the LastRow of Column A.

Dim A As Long
Dim lastrowA As Long
With Sheets("Children")

[Code].....

View 1 Replies View Related

Figure Out How To Do An If For The Over 30,60,90 Past Due

Apr 28, 2009

Here is what my table is im working with. The tite "todays date starts in Cell A1 and B1 is =Today().

I need to figure out how to do an if for the over 30,60,90 past due. Here the logic I need to figure out:

in the Over 30 column, the logic of the statement is as follows: If the difference between today's date and the date of the invoice is greater than 30 and equal to or less than 60, the amount goes into this column.(over 30 E3) To get the amount(the ammount in C3) into the Current column, the difference between the two dates must be less than 30. To get into the over 90 column, the difference between the two dates must be greater than 90. You can figure out the over sixty column. And this needs to be copied to the remaining colums

Today’s date: =TODAY() Shop Invoice Date Invoice Amount Current Over 30 Over 60 Over 90 Ludwig's Landromat =TODAY()-72 $432.78 Willie's Washing =TODAY()-107 $565.11 Wash It Here =TODAY()-80 $308.47 Spiffy Wash and Dry =TODAY()-58 $725.37 Water Soap & Hot Air =TODAY()-30 $427.95 Wash it & Dry it =TODAY()-90 $603.91 Acme Wash & Dry =TODAY()-60 $332.35 Totals

View 9 Replies View Related

How To Trigger A Message Box?

Dec 17, 2007

how to trigger a message box?

if i type TP123 in cell A1 i want it to trigger a message box with a comment

View 9 Replies View Related

If Functions And Date :: When Something Is Past Due

Sep 30, 2009

I am trying to create a function that will tell me when something is past due.

I have a excel document for my office's accounts payable, it has a master sheet where all of the companies that we pay are listed, and they are linked so that you can click on the name and it will take you right to the page to see a more detailed breakdown.

I am trying to figure out how to make something on the master page to tell me when something is due, even if it just makes an X when it is past due.

There are about 73 worksheets in this document and each worksheet contains many dates.

Is this even possible for me to do something like this? If not does anyone have any suggestions?

View 10 Replies View Related

Hide Row With Past Date?

Sep 1, 2013

My rows are sorted by date. How do I automatically hide the old ones, but view them when desired?

View 1 Replies View Related

Past Days Calculation

Feb 6, 2008

I would like to calculate how many days past since the special Cell have been filled with data.

For exampl:

If Cell A1 filled with the data in Cell B1 I need to show the day number, if I close the file and open it next day it will show number 1 as a one day past.

View 9 Replies View Related

Calcualting Past Due From Dates

Jul 29, 2008

I want to take a date (ex. May 25, 08 is in cell A2) and calculate 30 days (A2+30)June 24, 08(A6) and what i am trying to due is calculate if it is past due.

I used the if command but it does not seem to be calcualting the date plus thirty, it is only taking the date that is listed. (ex. instead of calculating =IF("A2+30"

View 9 Replies View Related

Reminder: Past Due Date

Nov 15, 2006

I want to create an Excel file, which would create alerts/reminders based on dates specified in certain cells. I want to create a database of various events (for ex. Invested in XYZ stock at $10 per share) and put a date in one of the column of each record. I want excel to remind me to take a look at that record after, say, 30 days.

View 3 Replies View Related

Flag Past Due Dates

Aug 18, 2007

to set a conditional format and include a function code in it as well?

I want a spreadsheet to change the color/font of a cell/column based on a comparison of a "start date" cell and a "due date" cell. This is to automate the process of highlighting items that have gone past the due date in the second cell. I was trying to do this by looking at the "now()" function and comparing it to the due date.

View 9 Replies View Related

Due Dates To Days Past Due

Aug 20, 2007

I am trying to create a spread sheet in excel that will show a number of days past due counting from the due dates. see the attached xls file for details.

View 5 Replies View Related

Average For The Past X Days

Feb 7, 2008

I want to keep track of housekeeping attendants' average productivity of rooms cleaned per day/shift for the last 10 days worked.

I need a formula which will give me an average of the 10 most recent cells with a value (0 should be counted).

I also want to have each month in a separate tab, and for the formula described above to average between two tabs should the 10 days cross-over.

View 4 Replies View Related

Can Excel Able To Trigger If Due Date Is Set

May 20, 2013

I am preparing a list of calibration items that require yearly calibrated, how can I set the date and prompt me example 1 month ahead when the item is going to due soon.

View 3 Replies View Related

Conditional Formatting Using A Trigger?

Sep 17, 2013

I have attached a sample work book.

What I want to achive is the colouring of the cells in columns A-L using the trigger of the "Y" character in colums J-L

So when a Y is put in column J the cells to the left and including column J change to green. Then when a Y is put into column K the cells to the left and including K turn yellow. Finally when a Y is entered in column L the cells to the left and including L turn the lovely shade of Pink. It is possible the process will go from a Y in column J to a Y in column L mising out column K but I don't suppose this will matter.

I used to have it working in office 2003 to a fashion but have not yet got my head around 2010

View 7 Replies View Related

VBA To Trigger Event Change

Feb 26, 2014

I have a chart with 2 Y axis. I am attempting to write some code that will update both axis with the same max & min value that is triggered by the combobox selection. The code will update the axis but is not triggered by the combobox selection.

[Code] ...........

View 6 Replies View Related

Trigger Macro After 15 Seconds

Feb 22, 2009

I want to trigger a macro that refreshes a pivot table but I only want to trigger the macro after 15 seconds. The reason is that I am pulling the source data from access mdb so I want only to refresh the data once the data is pulled.

View 3 Replies View Related

Sumif - Only Trigger On Certain Month

Oct 20, 2012

How do I amend this formula to have it only trigger on a certain month.

=SUMIF(C:C,1,F:F)

Date Description CatCost feesTotal Balance
20/02/12 PayPal Credit 10$0.10 $0.00$0.10 $0.10
20/02/12 PayPal Credit 10$0.01 $0.00$0.01 $0.11
26/02/12 Payment 1$174.69 $4.49$170.20 $170.31

I need it to look at what month it is and then the category.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved