Calculate Non Active WorkSheets

Feb 7, 2010

I have about 5 worksheets, and 2 of the work sheets have about 20k rows by 10 columns... everytime i change one of the other 3 worksheets a calculation takes places.. is there a way to stop these 2 worksheets from being calculated if they havent been touched?

it is taking about 30 seconds to do the calculation even though i have only changed 1 row on another worksheet.

View 3 Replies


ADVERTISEMENT

VBA : How To Calculate Only The Active Workbook

Apr 3, 2004

How do i calculate only the active workbook in VBA?

simple question, but i'm really slow today.

View 5 Replies View Related

Copy Active Worksheets Into One New Workbook

Jul 3, 2007

I have 16 proposals that are either hidden or visible in a proposal generator. I need to be able to copy only the visible worksheets over to a new workbook that uses a name from a cell inside the proposal generator. Then a save as prompt to force the user to save the file wherever they choose.

View 14 Replies View Related

Set Macro For All Worksheets (active Workbook)

Nov 14, 2006

Sub display_all_false()
With Application
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
.ShowWindowsInTaskbar = False
.CommandBars("Standard").Visible = False
.CommandBars("Formatting").Visible = False
.CommandBars("Control Toolbox").Visible = False
.CommandBars("Drawing").Visible = False
End With
End Sub

But, when I run the code, seems there're run-time errors detected at these codes:
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayOutline = False
.DisplayZeros = False
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False

1. Is there any way to correct these codes?
2. Does the bolded codes applied to ActiveWindow (Worksheet) only (eg. With ActiveWindow ...)? Can I change it to ActiveWorkbook (perhaps)?
3. Can the command menus (File Edit View Insert Format ...) be hidden also?
4. Does looping method for each worksheet

View 9 Replies View Related

Sort Data On All Worksheets Active And Other

Aug 21, 2008

It sorts the ActiveSheet, but none of the other sheets and there's no runtime error. I am using this on a test workbook with the same data in 5 worksheets.

What's wrong with this code?

Sub SortSheets()

Dim ws As Worksheet

For Each ws In Worksheets

Cells.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Next ws

End Sub

This looping structure works for PageSetUp, but not this Sort.

View 5 Replies View Related

Nested If Statement - Calculate Value Based On All Of Active Cells In Column

Sep 11, 2013

I am putting together a procedure to calculate a value based on all of the active cells in column "A" and a couple other conditions. "k" is my variable to put a value into (k,8) until all the active cells in column A have a corresponding value in (k,8)

I have my scenarios all built out into If statements and the code runs....but no value is being added to cell (k,8) for any of the rows with entries in column "A" when the procedure is finished running. Depending on the values in (k,2) and (k,3) there are four different ways the value in (k,8) needs to calculate as I have built out below. Why my values aren't being added to (k,8)?

Code:
Sub CalcSpecialFee()
Dim k As Integer
Dim cell As Range
k = 4
Application.ScreenUpdating = False
Sheets("Summary").Select

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

View 1 Replies View Related

Deleting Multiple Worksheets And Saving Active Worksheet

Aug 3, 2007

I am trying to find a easy way to delete multiple worksheets in a workbook and then saving the workbook based on the tab name of the worksheet.

View 9 Replies View Related

Stop Timer Macro From Overwriting Data In All Active Worksheets

Feb 17, 2014

I have a worksheet that has macro events attached to command buttons. When a ‘Start’ command button is clicked, a timer begins counting in seconds and displays the value in cell B3 until a ‘Stop’ command button is clicked. The event works flawlessly as long as I don’t open up another workbook (to continue working in Excel).

When the second workbook is open…then time stops working in the workbook where the macro was created…and starts displaying the ‘timer count in seconds’ in the new active workbook--which overwrites/destroys the data in the newly opened workbook. When I go back to the original book that called the macro…it continues counting again.

I need this timer to continue running in the workbook with the command buttons (in the background) while I work on other worksheets in other books. Is there a way to keep the timer running no matter how many other workbooks are opened and prevent it from overwriting whatever sheet is active? This code in the Increment Sub below ‘overwrites’ the contents of cell B3 on whatever sheet is active---and stops the timer in the on the sheet with the ‘Start’ command button.

View 1 Replies View Related

Calculate Average Across Different Worksheets

Sep 27, 2012

I want to calculate the average for 6 cells across 6 different worksheets.

For instance in sheet 7 i want to calculate what the average of sheet 1 A1, Sheet 2 A1, Sheet 3 A1, Sheet 4 A1, Sheet 5 A1 and Sheet 6 A1 is. However some the cells contain blanks/zeros which are resulting in an error message. The overall figure still needs to be divided by 6 to get the average.

View 4 Replies View Related

Formulas To Calculate Between Two Worksheets

Feb 15, 2007

To start, have 1 sheet with approx 25 columns of data and i need one column to check 3 others + another sheet to complete its fields.

In column M i need to enter some prices from another worksheet (tag name 'prices') but these prices depend on whats completed in the fields in columns L, T & V.

Column L has fields completed with eg. Houses, Offices, Warehouses
Column T has some fields completed with eg. B1, D, E (these are just zonal refs)
Column V has some fields completed with numbers 1,2,3

Prices worksheet has 4 columns
A = Property (same heading and fields completed as Column L on first worksheet)
B = Standard Price (this has prices in fields that correspond to the properties in A above)
C = Cresta Price (same description as above)
D = Wind Price (same description as above)

I need column M (blank fields) to look at L (heading 'property') then add in Standard Price from B (worksheet prices) then check to see if any fields are completed in Columns T & V and if they are then it needs to addon the prices from either columns C or D from Prices worksheet.

View 7 Replies View Related

Calculate Certain Cells On Two Different Worksheets Using VB Macro?

Sep 8, 2009

I have question on how to calculate the certain cells between 2 different worksheets based on the certain calculation parameters and the comparison result (the report) is put into the new worksheet on the same workbooks.

1) Worksheet1 contains: DEPTH, G1, C1, N1, D1, S1, SR1, MR1, DR1
2) Worksheet2 contains: DEPTH, G2, C2, N2, D2, S2, SR2, MR2, DR2

Expected result should be put in Worksheet3: DEPTH, G1, G2, calculation(G1 and G2), CI1, C2, calculation(C1 and C2), so on until the last columns. (find example on attached file "Test_Data.xls)

What I have done is to create a template to be filled in by copy and paste DEPTH, G1, G2 on worksheet1, DEPTH, C1, C2 on worksheet2, so on (attached file "Template_QC.xls"). Then I create a calculation macro for each of those worksheets separately to calculate the difference and color them . The calculation macro that I used is as follows:

View 5 Replies View Related

Calculate Average Based On Matching Values From Two Worksheets

Jan 22, 2010

Worksheet 1

I am calculating group averages for the following performers - very good, good, average, low, very low - for a series of factors.

Worksheet 2

Contains the same factors with the values for which Im trying to work out the average. Each factor has a performance rating above it, either very good, good, average, low, very low.

I need a formula which will match the performance rating from worksheet 1 (I3, J3, K3, L3, M3) to worksheet 2 and then calculate the averages of each factors based on those matches.

View 10 Replies View Related

Copy Worksheets From Active Workbook To A New Workbook

Apr 22, 2009

I am trying to code a Macro so that i can take all the worsheets and save them as individual Workbooks. I wrote a macro that appeared to work, but, after it saves the first sheet as a workbook, i get a debug error.

MS VB Script error:
Runtime error '9':
Subscript out of range

Any advise would be greatly appreciated.

Thank you

Code is below..

Sub saveall()
'
'
For Each ws In ActiveWorkbook.Worksheets

ThisFN = "C:Documents and SettingsUserDesktop" & ws.Name & ".xls"
I = I + 1
Sheets(I).Select
Sheets(I).Move
ActiveWorkbook.SaveAs Filename:= _
ThisFN, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False

Next ws

End Sub

View 9 Replies View Related

Find Method To Search For The Active And Non Active Values

Jul 14, 2009

I have a range of amounts in Sheet 1 from F7:Q13 and im using the find method to search for the active and non active values in the cell. Which means that if there's a value in the cell it will transfer the value in Sheet 2, if nothing is found in the cell the cells in Sheet 2 will return as nothing or null.

I think the problem lies on the FindWhat variable. Im getting a compiled error which im not sure what is it.

I've attached the spreadsheet so you get a better idea of the problem that i encountered.

View 13 Replies View Related

Macro With Reference To Active Chart On Active Sheet

May 14, 2014

I currently have the following macro running to set a chart's data values:

Sub C3Quarter12013()
'
' C3Quarter32013 Macro
'
'
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.PlotArea.Select
ActiveChart.SeriesCollection(1).Values = _

[Code] ......

When I copy the tab and change some of the data within the cells, I want the macro refer to the chart on the current tab and the values in the current tab - as currently it refers to only "Chart 2" and the values in the tab 'Figure 2 - WE OPH'.

I've tried changing the sheet name to ActiveSheet.name but that doesn't seem to work.

View 4 Replies View Related

Selecting Range From Active Cell To Last Entry In Same Row As Active Cell

Jun 8, 2014

I have got stuck on one piece of my code and having trouble fixing... Overall I am trying to find variable station name in cell L2 of Sheet 2 in Sheet 1 and then select and copy the data from the data in "cell L2 of Sheet 2" to the last entry of that row. I have attached an example test spreadsheet of the data and a macro is within Sheet 1 called test1. Please note that cell L2 in Sheet 2 will always be different station name and the station list in Sheet 1 will change with differing station name.

The code I am using is:

[Code] .....

The code that is not working and bringing up an error is:

[Code] .....

Attached File : Copy of Testexample.xlsm‎

View 2 Replies View Related

Excel 2003 :: Highlight Cell On Same Row As Active.cell Whenever Active.cell Changes

Dec 10, 2012

whenever the active cell is within a given range, highlight the cell on the same row in column S (by changing its interior colour). This should occur each time the active cell is changed, whether by cursor keys or mouse. The effect would be similar to the row and column highlights at left and top of the worksheet.

This action should be restricted to one sheet in the workbook.

It's for Excel 2003.

View 3 Replies View Related

Excel 2010 :: Sort Worksheets Alphabetically And Keep The Data In Worksheets

May 15, 2013

I have read that there is a VBA macro in F11, but I also read that it would only sort the workshhet names, but not the data. I have Excel 2010.

View 2 Replies View Related

Loop Through Worksheets Not Working (delete Some Hyperlinks In Column A On 50+ Worksheets)

Jan 16, 2009

Just need to delete some hyperlinks in column A on 50+ worksheets. Thought a loop through all the worksheets would do it. Only works on active sheet. Forgive my ignorance, don't really even know where it goes, once it works - module or workbook?

View 2 Replies View Related

Copy Cells / Range From Worksheets Positioned Between Two Worksheets

Jul 7, 2014

Let's say I have a workbook with 7 worksheets named, for example, "Instruction", "Begin", "Worksheet 1", "Worksheet 2", "Worksheet 3", "End", and "Data". (in that order)

What I want to do is run a macro to go to whatever worksheet that is in between "Begin" and "End" and copy, for example, cells $C$1:$D$10; then paste as formula into worksheet "Data" starting from cell C1 and then down a list (i.e., copied cells from "Worksheet 1" get pasted as formula into "Data" cells C1:D10; then copied cells from "Worksheet 2" get pasted as formula into "Data" cells C11:D20, and so on and so forth).

But if I were to add more worksheets (e.g., "Recipe" and "ToDo") positioned in between "Begin" and "End" and run the macro again, it'll either 1) re-copy all the formulas from the included worksheets back into "Data" including the formulas from the newly added/placed worksheets or 2) it'll add the formulas from the newly added/placed worksheets and paste into "Data" at the end of the list.

Can create the macro to run based on the position of worksheet, and not based on the name of worksheet, since ultimately there will probably be over 10 worksheets between "Begin" and "End".

View 4 Replies View Related

Loop Across Worksheets: Perform The Same Process To All The Worksheets In My Workbook

Aug 10, 2009

I'm trying to perform the same process to all the worksheets in my workbook. This is the code I have now, but it will only apply to the single active worksheet:

View 2 Replies View Related

Selecting Worksheets Array When #of Worksheets Will Vary

Apr 26, 2006

How do I modify this macro so that the worksheet array will select all the worksheets except sheet 1?? My workbooks will have varying numbers of worksheets ...

View 3 Replies View Related

VBA To Count Number Of Worksheets Between 2 Worksheets?

Jul 21, 2014

Instead of just counting all worksheets I want to count the number of worksheets between 2 control worksheets (Start and End). Reason for this is that I have a Workbook that grows weekly and each new worksheet is inserted after "Start". I have a macro that lists the Worksheet names but it grabs all and I only want those between Start and End.

View 9 Replies View Related

Clearing Data In All Worksheets Except Last 2 Worksheets

Nov 10, 2006

I need to write VBA code to clear all Values, all values beginning with an = sign for eg = 9725, except formulas and text on all my worksheets, except the last 2 worksheets.

View 9 Replies View Related

Copying Data From Multiple Worksheets To Multiple Worksheets In Another Workbook VBA

May 14, 2012

I have 2 nearly identical workbooks and I need to update historical data from the old workbook into the newer one.

My current Coding Snippets that I want to use look like the following:

Code:
Sub UpdateWorkbook()
Dim ws As Worksheet
Dim r1 As String
Dim r2 As String
Dim r3 As String
Dim r4 As String
Dim r5 As String
Dim r6 As String

[code]....

Now, this code isn't working I suspect because the Copy and PasteSpecial Functions don't work the way I wish to.

View 4 Replies View Related

Run Another Sub From Within Active Sub

Jun 5, 2007

Secondary Sub is located in the same project named, ClearItemtotals

I tried placing it as the last line prior to End Sub both as Call ClearItemTotals() and/or ClearItemTotals.

Neither work.

View 9 Replies View Related

Active X Combobox

Apr 1, 2008

I have an activex combobox in my worksheet. I want the selected text in the combobox to be written to a defined cell when a button is clicked.

View 13 Replies View Related

Reference To Active Row

Dec 18, 2008

I want to arrange a dataset in blocks of 8 lines and for this I need to refer to the actual row of the active cell. Below code does not work - the "Row" does not change as the active cell moves down through the rows

View 5 Replies View Related

Specifying Active Worksheet In VBA

Feb 16, 2009

I used the "record macro" and went through my data manipulation steps. But its not transferable to other worksheets because it imbedding the name of the worksheet in the some functions (sort, pivottable,...). How can I change the name of the worksheet to "activeworksheet"?

View 2 Replies View Related

Highlight The Active Row

Dec 21, 2006

if you click on a row, it highlights every cell in it, I want to do the exact same thing but then also when you click on a cell only.

Preferable (probably impossible though) without the use of VBA, because in my company
I think some are "carefull" with enabling macro

View 9 Replies View Related







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