Prevent Formula From Updating When Deleting Cells / Sheets
Nov 5, 2008
I've got a workbook that I'm currently designing and I've just realised that I need to delete a few sheets, paste in some new template sheets and rename them. The problem is, I've already completed my summary sheets and I don't want to have to redo the values. Essentially, I just want to (temporarily) turn off auto-updating of formulas when cells / sheets are changed/moved/deleted.
For practical purposes: I need to delete the sheet named "Jan", paste in a new sheet "MonthTemp", rename "MonthTemp" to "Jan" and have all my formulas not updated (e.g. still referencing "Jan" instead of "#REF!")
View 13 Replies
ADVERTISEMENT
Jun 9, 2008
I have a series of worksheets, named, 'sheet1' 'sheet2' etc. through to 'sheet10'. A final worksheet, 'sheet11' has been produced that uses the formula: address=Sheet1!A1, address=Sheet2!A1, address =Sheet3!A1 etc. The same goes for other identical cells on each of the sheets. I am at the moment entering each cell on 'sheet 11' separately because if I copy the formula down it progressively changes the cell value and not the sheet number. How can I produce a formula whereby the cells remain identical but the sheets change progressively?
View 4 Replies
View Related
Oct 27, 2007
Deleting rows that have dependent cells.
I have one sheet that uses a very simple formula for copying certain values from one cell to another sheet “=VALUE(Sheet1!B5)”.
My problem is that rows have to be deleted in sheet1 as the information eventually becomes expired and the following is displayed in my cell in
sheet 2 “=VALUE (Sheet1!#REF!)” Is there a work round this, to prevent the formula showing a #REF! Value.
Row 5 is replaced and the same formula has to be re-entered. Excel 97 used in our office unfortunately.
View 10 Replies
View Related
Apr 21, 2008
What I have is basically a form on the main sheet. Here other users can add and/or delete information in a form. I refer to the information in another sheet with formulas.
Now everything was great when using protections/ validations, to the where they fill in the information, but the problem occur when they are allowed to delete and remove rows.
This is something that I want to allow them, even though I do realise that this is something that many advice against it.
To begin with I found the post about changing relative references to absolute references (ConvertFormula). Still the formulas changes when rows are added or deleted and I would have to redo all formulas and run the macro again. I then found posts advicing on the use of the INDIRECT forumla. This formula was exactly what I needed as the formulas would not alter when rows were added/deleted. Now the problem is a combination of the use of INDIRECT and the the ConvertFormula. Now if I write a formula, for example:
=INDIRECT("'Sheet1'A1")
Then when I try to expand the formula over to the rest of the cells, then the references stay pointing at A1, when I want them to continue pointing at A2, A3, etc...
Now what I am looking for is some way to tell all my formulas, after expanding the original formula, that they should all have the INDIRECT function. If it was possible it would be great if you could implement it in the same way as with the absolute reference, for example:
For i = 1 To MyRange.Areas.Count
MyRange.Areas(i) = Application.ConvertFormula(MyRange.Areas(i).Formula, xlA1, xlA1, xlIndirect)
Next i
Now the above code sample does not work of course, as there should be xlAbsolute instead of xlIndirect, but I hope you understand my intention. Do anyone have the answer to my problem? Is there an easy way to implement the INDIRECT function into a big amount of formulas?
View 4 Replies
View Related
Oct 31, 2011
I have macro that brings information from outlook to excel. In the beginning of macro, it deletes range of cells. That destroys the functions that target those cells. Is there a way avoid that? Using some different method or ?
Code:
Dim olApp As Outlook.Application
Dim olNS As Outlook.Namespace
Dim myCalItems As Outlook.Items
Dim ItemstoCheck As Outlook.Items
[Code] ........
Running the macro messes up all funtions that targets those cells.
Like:
Code:
=DATEVALUE(MID(data!#REF!;4;2)&"."&LEFT(data!#REF!;2)&"."&RIGHT(data!#REF!;2))
This really great code to get data from outlook is originally: [URL] ........
View 2 Replies
View Related
Feb 14, 2013
I want to establish a link from my worksheets. Using the conventional link method I was able to link the values from my first worksheet to the second worksheet. My problem is when I delete a particular row. The reference of the second worksheet will have an error #REF! since I deleted those cells. Is there any way that I can link my two worksheets without any error that even if I deleted a particular cell/row the reference is still intact?
View 2 Replies
View Related
Oct 8, 2007
I have a large workbook 45MB with 40 sheets each containing a section that links to the server to update itself when the workbook calculates. With that being said it's impossible to have the workbook on Automatic calculate because the update process can take about 7-10 minutes so its set to manual. However, I would like to prevent the links from updating (its one link that is used to update the file) by possibly a macro that runs when the workbook opens and prevent the update link from running when I press F9 to manually calculate.
View 2 Replies
View Related
May 3, 2008
I am dealing with plotting large amounts of data (millions of cells) across multiple series. Everytime you click, add a new series or do anything it redraws the graph taking a while. This Is there are way to prevent Excel 2003 from plotting a graph until you are done setting it up?
View 3 Replies
View Related
Jun 6, 2006
I'm on a system using Windows XP with several user accounts. It's possible to share a document by putting it in a directory called, unsurprisingly, "Shared files' or somesuch. Anyway, I wish to put one of my Excel spreadsheets into this directory so that other users can see it. The workbook itself has about 10 worksheets and I want other people to be able to edit only one of them. So I used the "Protect Worksheet" option within Excel to protect those worksheets I don't want edited. However, I notice that it's still possible to delete a worksheet even though its protected. Is there a way to prevent from deleting worksheets?
View 2 Replies
View Related
Sep 12, 2007
i have made a document for other users to use. how can i limit the paste function to ONLY ALLOW PASTE SPECIAL-- i wish to aviod damage to formatting and formula etc
View 3 Replies
View Related
Mar 18, 2008
I have a form on a SheetA wherein all cells are referencing the data in cells on SheetB. When I delete or add a row on SheetB, the cells in that row on SheetA read REF#. I need the row in SheetA to be added when I add it in SheetB and vice versa for when I delete a row.
View 5 Replies
View Related
Sep 12, 2006
I'm protecting a spreadsheet with Excel 2000. For that i used the Excel functionality : Data -> " Validation"
Unfortunately, I can not protect the all sheet or workbook (Requirement). So even if the cells are protected by "Validation", any user can delete the cells using the key DELETE or BACKSPACE on the keyboard !
VBA Macro (which could be activate at each change on the sheet for example...) ? or if it's possible to avoid cells deleting with the "Validation" in the Excel Data menu ?
If it's a macro, it would do :
1 ) see if a user is pushing DELETE or BACKSPACE on the keyboard
2 ) see if the cell contains formulas
3 ) if yes, make a box appears to say that is not possible to delete this cell
4 ) return on the Excel sheet without changes
View 9 Replies
View Related
Jul 1, 2013
I have three sheets of data which require different values. What I'm looking for is for the other two sheets to be updated when I change the values in the field 'Option_Group_IDs' in the productdata-army-to-merge.csv file.
The two fields in the other two sheets to update are the optGrpID filed in the optiongroup-data-army.csv and the optGroup field in the optiondata-army.csv
productdata-army-to-merge
*
A
B
C
1
Remove_Product
Additional_Section_IDs
Option_Group_IDs
[Code] ..........
View 1 Replies
View Related
Feb 10, 2012
I have 2 sheets, List 1 and List 2 Both lists contain generic part numbers in column A, so because there could be 2 manfacturers of the same part there will be duplication of the generic part number.
What I want is to prevent someone entering a generic part number in list 1, which already exists on list 2.
I there any cde which can be put in the sheet which will show an error message for this?
View 9 Replies
View Related
Nov 21, 2007
As many are aware, there is an option to make a sheet very hidden. However, a "very hidden" sheet remains visible in the VBE project window. A user with basic VBA knowledge can easily selected the hidden sheet & go in the property window and change its visibility setting to "-1 Sheetvisible". Is there any way to make hidden sheet invisible in VBE as well?
View 3 Replies
View Related
Dec 3, 2011
I have these following codes. when i click button then it updates the records, like pulling data from sheets and putting it into one. thats working fine. only things is, when it update the records, then it shows whats going on behind, all updating sheets get visiable. is it possible can i just hide whats going on in the back? when i click the button msg box comes up that please wait its updating the record.
Dim Response As Integer
MsgStr = "ARE YOU SURE YOU WANT TO UPLOAD NOW?, PLEASE CONSIDER RE-CHECKING YOU INPUT!!"
TitleStr = "USER MESSAGE"
If MsgBox(MsgStr, vbYesNo, TitleStr) = vbYes Then
Sheets("Employee Data Input").Select
[Code] ...........
View 4 Replies
View Related
Jun 22, 2007
I would like to make my stock sheet able to copy entres to another sheet within the same work book. (avoiding using VB as I can't do that)
If data is entered in sheet2, it is automatically copied onto sheet1.
The reason is that each storage device will have its own sheet and all entries will automatically be copied to the master sheet. This will make things easy for the people who need to use this system for updating and seaching it.
I have seen a similare problem that seems much more complex here @ Copy Data From Multiple Closed Spreadsheets
View 6 Replies
View Related
Mar 4, 2014
I'm trying to get a macro to work that will delete a number of worksheets that are located in between a sheet called 'start' and one called 'end'
I have got this code - which deletes both 'start' & 'end' too, i've been struggling to get it to work so it doesn't
Code:
Sub Macro_delete_worksheets()
Dim i As Long
Application.DisplayAlerts = False
[Code]...
View 7 Replies
View Related
Jul 20, 2009
Regarding the age old problem of trying to ensure macros are enabled in a workbook, using the process of hiding all sheets bar one:
Automatically Close Workbook If Macros Are Disabled
Reafid inserts some excellent code so that worksheets are hidden BOTH before closing AND on a normal Save event (I have also attached Reafid's zip file with the workbook that includes his/her code).
Having done much searching it seems to be the best solution out there, however I can still break it fairly easily and I'm worndering if anybody can stop me doing the following to break it:
Open the file in its restricted state (i.e. only Warning tab shown, all other sheets very hidden) and NOT enabling macros on opening. I'm therefore at the position Reafid intended; macros are disabled so all sheets are very hidden. Then to break it, in my personal macro workbook I have a simple macro that unhides all worksheets in ThisWorkbook, I run that personal macro and everything in Reafid's file is unhidden.
Reafid's file therefore has been opened with macros DISABLED and now all worksheets are visible.
View 9 Replies
View Related
Oct 8, 2012
I've got Excel 2002. I am devising a sheet for checking work (sheet A) which feeds onto a separate sheet (sheet B). If I wanted to delete info from sheet A can I retain the info on sheet B? I want sheet A to be used repeatedly for each case but the info for every case to be recorded row by row on sheet B.
View 4 Replies
View Related
Oct 10, 2013
I have multiple data sheets with tables and I want to create a master sheet table that automaticly will update when now rows/data is added in to the sheets in any of the data sheets.
Master sheet will look like this (the first 3 letters is the data sheet name), this is just the first column there a a lot more columns to be added
AAB08
AAB09
AAB10
AAB11
AAB12
[Code] .......
So when let's say in sheet AAB I add another row AAD13 I want the master sheet to update automaticly so it looks like this
AAB08
AAB09
AAB10
AAB11
AAB12
[Code] ......
Is this possible?
View 1 Replies
View Related
Jul 13, 2006
I have a raw_data sheet with a list that is linked through
Insert> Name>Define. This list is used for Validation Data List drop
down menus in other sheets. I would like to update a
list element in my raw_data sheet and have the corresponding element in
other sheets also update. Is this possible or is there another way to
do this?
View 9 Replies
View Related
Jul 9, 2008
Checks if there is a sheet name and if there is a sheet of that name then it is deleted.
the sheet name is a number entered through an inputbox and "Average"
View 10 Replies
View Related
Dec 8, 2009
In writing Macros with Excel 2003, is there a way to have all other worksheets deleted except the present one, other than listing every other sheet?
View 9 Replies
View Related
Jan 19, 2007
i have a procedure that imports data & splits it by staff name, creating a separate sheet for each person
i wanted to ensure if the code was run twice it wouldn't throw up errors trying to name sheets with names already used, so used the following code to delete all sheets apart from the 2 sheets containing my base data (sheet names for these are IDs and base data)
Sub ClearUpSheets()
Dim ws As Worksheet
Application.DisplayAlerts = False
For Each ws In Worksheets
If ws.Name <> "control sheet" Or ws.Name <> "IDs" Then ws.Delete
Next ws
Application.DisplayAlerts = True
End Sub
unfortunately, apart from a chart sheet (which i actually want deleted) this code deletes all sheets including the 2 i don't want deleted
View 3 Replies
View Related
May 8, 2012
I need a simple macro to delete all sheets in a workbook except one that is called "START"
View 9 Replies
View Related
Aug 22, 2007
I have a File with many sheets (40 - 60) and I'm trying to eliminate the sheets I don't want. The names of the sheets are all random, but in common they have a three letter code for a country.
The following is the code that I have -
Sub Deletesheets()
Dim x As Integer
Application.ScreenUpdating = 0
On Error Resume Next
For x = 1 To Sheets.Count
Sheets(x).Select
I'm hoping to save any sheet that has either CAN or USA the name and delete the rest.
Besides being inefficient, my code errors out because I've got my IF's and ELSE in the wrong place, but I can finagle it to work.
View 9 Replies
View Related
Jun 30, 2006
I’m would like to delete some sheets in my workbook using a macro. The problem is that
I won’t know in advance the name of these sheets.
I was thinking using a code like the following one to delete the sheets but the problem is that Excel expect a sheet name at this part of the code since it is expecting the sheet name.
Sub Delete_Active_Diagram()
Application.DisplayAlerts = False
Dim i As Integer
Dim strSheetName As String
Dim blnFound As Boolean
strSheetName = "Average Sales Per Week" & "" & Sheets(i + 1).Range("C3")
i = Sheets.Count
For j = 1 To i
If Sheets(j).Name = strSheetName Then
blnFound = True
Exit For
End If
Next
If blnFound = False Then Exit Sub
If blnFound = True Then strSheetName.Delete
End Sub
Is there a way to cope this problem, or should i think about another way to do it. Like selecting each sheet I would like to delete and then delete the selected sheets.
By the way. All the sheets I try to delete a Charts Sheets. Maybe there is a way to delete all the charts in my workbook.
View 5 Replies
View Related
Jul 24, 2013
I have two sheets. One of them has a long list of numbers and the other one has a shorter list, all of which are also on the first sheet. How can I automatically delete the second sheets numbers from the first sheet?
View 7 Replies
View Related
Nov 13, 2013
I'm pretty new to coding from scratch in VB, and I've got some code that should loop, but it doesn't. The idea eventually will be to download a spreadsheet, make a new sheet for every item in a range, and then filter for each of those items and put it in the right sheet. I have to code to create the sheets (lightly modified from something I got here)
Sub CreateSheets()
'Written by Barrie Davidson
For Each c In Sheets("FilterList").Range("b2:b74")
Sheets.Add
ActiveSheet.Name = Right(c.Value, 30)
Next c
End Sub
That's working well, so I've tried to modify it so that it will also delete sheets based on the same range. I've gotten it to delete the first item in the range, but then it stops.
For Each c In Sheets("FilterList").Range("b2:b74")
Application.DisplayAlerts = False
Worksheets(c.Value).Delete
ActiveSheet.Name = Right(c.Value, 30)
Next c
End Sub
By the way, I don't know what the ActiveSheet.Name = Right(c.Value, 30) line does, but I put it in since it was in the code I was modifying.
View 9 Replies
View Related