Workbook Calculating On Any Change
Nov 23, 2006
I'm having a problem with calculating my formulas. I have it set to auto. I've always had it there. And it used to work fine. But now when I calculate, anything I do to another cell not associated with the ones I'm calculating it makes it recalculate. How do I keep it on auto without making it recalc everytime I do something? Mainly I have an override command on another sheet that enables you to replace the info in a cell (on a diff sheet) if you dont like the product of the calculation. When I make the override for that one cell it recalcs all the info. I just want it to recieve the override for the one cell with recalcing my others.
View 3 Replies
ADVERTISEMENT
Jul 2, 2012
I was quite a few problems using worksheetfunction.ln() to calculate % change. I decided to write more basic code to try to accomplish this but I'm getting an overflow error.
Code:
DRows = WorksheetFunction.CountA(Sheets("INFO").Range("A:A"))
For r = 1 To (DRows - 1) '***** -1 is bc of ln property
percentchange = 0
newval1 = Worksheets("INFO").Cells(1 + r, 2).Value
old1 = Worksheets("INFO").Cells(1 + r, 2).Value
percentchange = (newval1 - old1) / old1
Worksheets("info").Cells(2 + r, 3).Value = percentchange
Next r
View 6 Replies
View Related
Oct 2, 2007
Currently I am using a vlookup for 19,000 columns or so. Basically what I am doing is calculating the change in the P&L values from when I ran the file currently to when I ran it previously. I have a macro that pastes the old data to sheet "PL Changes" and then the new data on "PL Detail" All the Vlookup is doing is taking 2 criteria(from A and E and comparing them to a concatenated formula in column A on "PL Changes" then returning the old value in column 5. Is Vlookup the most efficient or is Match() any quicker. Right now it takes almost a minute for it to calculate cells and I was hoping to reduce that time as this data may get longer: ...
View 9 Replies
View Related
Apr 24, 2009
I have been building a spread sheet data base which I think is pretty simple.
It now has quite a few formula's and is taking time to calculate when I add data.
I have tried to simplify some formula's and get rid of complex one's that can be replaced with simple ones... Is there any advice or suggestions for reducing the calculating time..?
View 12 Replies
View Related
Jul 17, 2014
I am working with multiple workbooks with several tabs in each one. I need the forumula to update the "sheet name" from the source workbook even if the destination workbook is closed.
this is a portion of the forumula I am working with:
=SUM(IF(AND([L2_EI_Phase_II_monitoring_workbook.xlsx]Sheet25!$I$4>=182,[L2_EI_Phase_II_monitoring_workbook.xlsx]Sheet25!$I$4=182,
[L2_EI_Phase_II_monitoring_workbook.xlsx]Sheet26!$I$4=182,
[L2_EI_Phase_II_monitoring_workbook.xlsx]Sheet27!$I$4
View 9 Replies
View Related
Jun 13, 2014
I've got my macro working on a workbook called 05-14 Clearing TB-orig. From there, it saves as 2 new workbooks called 05-14 Clearing TB-aging and 05-14 Clearing TB-rec. But the new worksheets all keep the name 05-14 Clearing TB-orig. Can I have the macro change the name of each of sheet in the newly created workbooks so that they are the same as the new workbook names? [URL] .....
View 6 Replies
View Related
Jul 29, 2008
I have a shared Excel Workbook, and I am trying to prevent a non-permitted user from making any changes to it. I have managed to hide all of the worksheets bar one - The Warning Page - if the user is not one of my chosen users, but I am having a little trouble setting the worksheet to open as "read-only" if the user is not one that I have listed.
My macro code looks a bit like this:
If Application.UserName = "Vikki" Then
Sheets("Warning!").Visible = False
Sheets("Total").Visible = True
Else
Sheets("Warning!").Visible = True
Sheets("Total").Visible = False
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End If
But when I am using this, a non-user will get a msg box asking if they want to save the workbook before changing to read only. Can I prevent this msg box from appearing?
View 9 Replies
View Related
Jun 9, 2009
how to do this massively, without going into each cell? Maybe some VBA code. I just need to change the beginning of the path to point to another directory.
View 9 Replies
View Related
Jun 2, 2007
i have as many as 100 workbooks in the same folder(such as "e:/data"),i should change the same address value in each workbook. first i write the code use "application.filesearch",but it can't run because it has removed FileSearch in excel 2007. i get the code below from Ron de Bruin
Sub test()
Dim wbOpen As Workbook
Dim ws As Worksheet
Dim I As Long
Dim myfiles() As String
MyPath = "e:data"
If Right(MyPath, 1) <> "" Then
MyPath = MyPath & ""
End If
'If there are no Excel files in the folder exit the sub
FilesInPath = Dir(MyPath & "*.xl*")
If FilesInPath = "" Then
MsgBox "No files found"
Exit Sub
End If...................
View 2 Replies
View Related
Jan 21, 2011
I'm looking to enable changing row height in a protected workbook and am scratching my head as to if there is a combination of checkboxes I need to 'allow', or if there is some other approach.
I'm using a vba macro to change the height of merged cells:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
[Code].....
View 2 Replies
View Related
Oct 11, 2013
I want this private sub macro to change work in all workbook. How it possible?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Cells.Interior.ColorIndex = xlNone
With Target.EntireRow.Interior
.ColorIndex = 37
.Pattern = xlGray25
.PatternColorIndex = 24
End With
End Sub
View 4 Replies
View Related
Jun 2, 2014
My issue is we have a remote office, using an access DB which links to an Excel file. We sometimes send the files to other people to make changes, but the link is then broken (it was a network location).
You can just change it manually, or accept the many prompts that come up, but it needs doing at each end, each time.
I thought I'd do a routine to change the connection paths, this is what I have...
Code:
Sub alan()
Dim i As Long
Dim cnt As Long
Dim modtext As String, modfile As String
Dim modrange As String, OldPath As String, NewPath As String
OldPath = "\192.168.1.100MultimediaCommissioning Folder"
NewPath = "C:matts"
[Code] ...
I added the sourcedatafile part to the routine afterwards, because the connection string part worked fine. But I now get Run-time error '1004' Application-defined or object-defined error...
View 3 Replies
View Related
Jan 8, 2009
I have many files that has a filepath references in the cell values, for example:
='\serverfolder1subfolder2[Filename.xls]Sheet'!$B$82
Is there a way to change all the references to direct to another place?
Filenames don't change, only the '\serverfolder1subfolder2 path
View 9 Replies
View Related
Apr 21, 2009
I am using Excel 2003.
I tried to change the number of new sheets in a new workbook, e.g. from 3 to 1.
But the option has no effect on new workbooks. They still show 3 sheets.
View 9 Replies
View Related
Jul 23, 2006
I need to know weather it is possible to change the "Password protected workbook" box upon file open with a custom user form. I know you can because you can change and disable the "Save As" box etc. I dont mind using the code with a certificate to open the workbook but id prefer not to...
View 9 Replies
View Related
Jun 27, 2009
I have a workbook, 'MyWb.xls' and a sheet with buttons to which I attach some sheet macros. When I assign a macro to a button I pick the appropriate reference, e.g. Sheet2.MyMacro, and this gets recorded by default as MyWb.xls!Sheet2.MyMacro
When I create a new single sheet workbook with the instruction ActiveSheet.Copy, I end up with a new workbook, say 'Book2' along with the buttons as expected. However the macros attached to the buttons still refer to the MyWB.xls file and not the new 'Book2.xls'. As part of the process of creating the new book I've tried redefining the macro with the instruction
View 4 Replies
View Related
Oct 12, 2010
I have an existing macro that takes my sheet and puts it in body of email.
how do i add to it to change the entire worksheet's font?
Code:
Function RangetoHTML(rng As Range)
Dim fso As Object
Dim ts As Object
Dim sTempFile As String
Dim objWB As Workbook
Dim i As Long
Dim iLastRow As Long
sTempFile = Environ$("temp") & "/" & Format(Now, "dd-mm-yy h-mm-ss") & ".htm"
[code]....
View 4 Replies
View Related
Feb 20, 2012
How can I make excel go to full screen (Alt-W-E) as soon as a workbook is opened and then revert back to normal view when it is closed? I already have this code in my workbook_open event just in case that will affect the answer:
HTML Code:
Private Sub Workbook_Open()
If Not LockSheet(ThisWorkbook.ActiveSheet) Then Exit Sub
[Code].....
View 7 Replies
View Related
Apr 27, 2006
I have a formula that uses the OFFSET function so that subsequent row adds will automatically adjust the formulas. For example, cell A1 contains the value 1 and cell A2 contains the formula:
=offset(A2,-1,0) + 1
When I insert a row above row 2, the formula above adjusts to reference cell A3, which is what I want.
What I am running into is that when the workbook is opened, something in the workbook changes, causing the "Do you want to save the changes..." popup to appear even though all I do is immediately close the workbook.
I have traced the problem to my use of the OFFSET function, as when I change the formula to
=A2-1
and repeat the scenario, the workbook closes without the "save" popup.
Does the OFFSET function cause something to change (no cell values appear to have changed) and is there a way to get around this?
View 7 Replies
View Related
May 25, 2006
I have build an add-in To Calculate Specific Sheet when something change in the workbook. For this I am unselecting the "automatic calculation" option and check "Manual". Now with every change in a cell i would to call AUTO_CALCULATION_PI that is calculating only the sheet that the user have been selected.
The problem when i change a cell Workbook_SheetChange is not stiggered and nothign happen. I dont understand why? The add-in is doing the following. Create a Menu "PI Options", this open a user form where you can select the worksheet to calculate, the choices is store in hidden worksheet called "AUTO-CALCULATION-PI". When a cell is change the Macro AUTO_CALCULATION is called, and calculated the sheets that the user have selected.
View 2 Replies
View Related
Jun 27, 2008
I am trying to achieve the following and am not certain how to achieve this in Excel 2003.
1. make the Criteria Range Dynamic in Advance Excel, so that the Filter automatically updates on every Criteria change.
2. Raw Data range is kept in Closed workbook
3. Filtered Result displayed in another Workbook.
View 2 Replies
View Related
Jan 17, 2013
Can you change the height of a TextBox in a workbook when not in Design Mode? Like just grab the bottom and resize.
View 2 Replies
View Related
Dec 3, 2008
I know of
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
but I would like to expand this idea to detect any change in cell selection across all open workbooks.
View 6 Replies
View Related
Oct 28, 2009
I have many worksheets in a workbook that need to be saved if a user changesanything on them.
These sheet names all end in "....SD" and the code needs to only run on those sheets. I have learned alot from the forum but not enough, just yet . . This is what I have so far:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim sht As Object
For Each sht In ThisWorkbook.Sheets
If LCase(Right(ws.Name, 2)) = "sd" Then
MsgBox(Prompt:="You must save changes. Save now?", Buttons:=vbYesNo) = vbYes Then ThisWorkbook.Save
End Sub
It doesn't like the 2 "Then's". (Don't laugh - I'm trying.)
View 8 Replies
View Related
Sep 29, 2011
I have a range of cells ( C2, C5, C8:N1007, P8:P1007 ....) on a worksheet that I want to be able to clear the contents of through a macro - worksheet is entitled Database
I have 3 additional worksheets all of which have summary information on and some of the formulas are huge.
I've inserted a module and produced this code;
Sub ClearContents()
Application.Calculation = xlCalculationManual
Range("C2, C5, C8:N1007, P8:P1007, ....").ClearContents
Application.Calculation = xlCalculationAutomatic
End Sub
Because of all the 3 summary page formulas the code is taking a few seconds to run.
I'm new to VBA and just wondered whether I could switch the calculation setting for the entire workbook onto manual at the beginning of the code and then switch it back to automatic at the end of the code? Think this might speed things up.
View 5 Replies
View Related
Feb 12, 2008
I'm experimenting a bit with this code. The idea is the following:
I've got one spreadsheet (ThisWorkbook) were I define 5 names for 5 worksheets in all files of a specific folder (c: emp). I get stuck at this line: "wb.Sheet2.Name = myval2", since I'm for some reason not able to activate the newly opened workbook and change it's name....
Sub wd_testing()
Dim I As Long
Dim wb As Workbook
Dim firstrow As Long
Dim sht As Worksheet
Dim cell As Object
Dim count As Integer
Dim myval2 As Variant
Dim myval3 As Variant
Dim myval4 As Variant
Dim myval5 As Variant
Dim myval6 As Variant
Application.ScreenUpdating = False
It's important to mention that there is no name conflict and the names work when entered manually.
View 9 Replies
View Related
Mar 20, 2007
I've created a custom toolbar and populated it with a custom button. I have created a macro and it resides in ThisWorkbook. The macro is assigned to the custom button and the toolbar attached to the workbook. So far, so good. If I copy the workbook and rename it, when I click the button to run the macro it launches the original workbook and runs the macro. The macro effects changes on the renamed workbook copy. The macro name found in the assign macro dialogue starts with the original workbook name. The same effect if the macro resides in a module or sheet. Any known way to have the macro name change along with the renaming of the workbook such taht it refers to the currently opened workbook macros? Regards.
View 5 Replies
View Related
Jan 28, 2014
I have 6 Slicers in called "Quantrix" The slicers are called REG, DIRECTOR, AREA MANAGER, AOI, DMA, AG and CLOCK. I have 15 pivots (6 in Quantrix tab and 9 in a tab called "Pivots").
I have vba code to update all pivot cache (showing 1 pivot update below) ...
PHP Code:
Max = Sheets("eLink_Raw").Cells(Rows.Count, "A").End(xlUp).Row
Sheets("Quantrix").PivotTables("Quantrix 1").ChangePivotCache ActiveWorkbook. _
PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
Sheets("eLink_Raw").Range("A1:AW" & Max).CurrentRegion _
, Version:=xlPivotTableVersion14)
Here is the code to disconnect SLICER, update source data for ALL pivots then reconnects slicer... This works great but its ONLY 1 SLICER
PHP Code:
Dim vPivots As Variant
Dim i As Long
Max = Sheets("eLink_Raw").Cells(Rows.Count, "A").End(xlUp).Row
With ActiveWorkbook.SlicerCaches("Slicer_REG").PivotTables
[Code] .....
How can i disconnects ALL Slicers, change source data for ALL Pivots then reconnect ALL slicers?
View 14 Replies
View Related
Mar 7, 2014
I am looking for a vba where by the default colour of the font for new text typed in any cell of a workbook change to green or red and the default black automatic becomes secondary. The existing text in the workbook in its existing font colour must not change i.e stays in black or red.
View 1 Replies
View Related
Nov 20, 2013
I have a multi-worksheet workbook that has many forms control checkboxes throughout it. I'm looking for some VBA that will change the background (fill) color of ALL the checkbox when it is checked (True). I've seen code for a single checkbox, but not multiple/all boxes. I know just enough VBA to be dangerous, but I'm up to learning anything new.
View 3 Replies
View Related