Reduce Number Of Active Rows In A Worksheet

May 13, 2009

i have data in 1 worksheet say sheet1 which i copy to another sheet say sheet2. i do some processing like using some formulas on the data from columns A to D and getting an output in column E in the same sheet. Now the problem is, before i start the calculations in sheet2, the file size is 400 kB... and after the calculations are done, it becomes 20 mB... i dont know why this happens... there are some things which i think might be a reason but not very sure...

1. i calculate the last row in column A using
lastrow = Range("A65536").End(xlUp).row

i tried Range("A500") and it seemed fine... Now u may tell me that i can just use 500 and make things simpler but its just a workaround and not a solution...

2. i use macros.. this is just an info...

3. Another thing is, if i use 500, the number of active rows is 500... i dont know whether the right word is active rows but wat im trying to say is, the scroll bar for the rows movement reaches row 500 when it reaches the bottom.

View 9 Replies


ADVERTISEMENT

Reduce Row Range In Existing Worksheet To Reduce File Size

Dec 17, 2013

I have a problem where I extended a formula down to over 40,000 records which has increased the file size substantially. I only need it to scroll down to a few thousand rows now that I realized that there is alot less data to populate the worksheet. Is there any way to get it back to a scroll range that is more modest in size?

View 1 Replies View Related

Loop Instructions For Number Of Active Rows

Nov 20, 2008

First: I am using following loop code to repeat until the last row with data in column B has been reached. I keep getting a compile error and can't figure out to to fix it. The compile error occurs on the ".cell" and ".range" portion of the code and has indicated an invalid or unqualified reference.

Second: Once I have the loop working, I need to reference different cells each time through the loop. The first time through the loop I need to reference cells B2 and C2....the second time cells B3 and C3.....and then B4 and C4....and so on. I am increasing the value of i each time but when I ran the code, I was not getting any results.

View 4 Replies View Related

Reduce Worksheet Scroll Bar Length/Height

Sep 2, 2006

I used to have cells in the extremes of my worksheet filled which resulted in the scroll bars being stretched very thin. Since then, I am only using the top-left part of the worksheet but it is difficult to scroll through since the scroll bars are still stretched. How do I bring them back to normal?

View 5 Replies View Related

Reduce The Number Of Lines That Are Highlighted

May 16, 2009

I have the following code in a User form and I was wondering if there was a way to reduce the number of lines that are highlighted, but obviously still get the required results!


Private Sub cbSearch_Click()
Dim Product As Range
Set Product = Sheets("Master").Range("A1:A300").Find(Val(tbLookFor), lookat:=xlWhole, LookIn:=xlValues)
If Product Is Nothing Then
MsgBox "Incorrect Product code, try again"
Else
'Populate the userform with data
tbData1 = Product.Offset(0, 1) 'Down 1 row, over 1 column
tbData2 = Product.Offset(0, 2)
tbData3 = Product.Offset(0, 3)
tbData4 = Product.Offset(0, 4)
tbData5 = Product.Offset(0, 6)
tbData6 = Product.Offset(0, 7)
tbData7 = Product.Offset(0, 8)
tbData8 = Product.Offset(0, 9)
tbData9 = Product.Offset(0, 10)
tbData10 = Product.Offset(0, 11)
tbData11 = Product.Offset(0, 12).....................

View 9 Replies View Related

Reduce Sheet To Rows With Certain Value

Nov 30, 2009

I have a spreadsheet with 34K rows. I would like to reduce to only the rows that include a certain word.

View 5 Replies View Related

Reduce Size Of VBA And Add 4 Rows

Jan 12, 2014

I have a working VBA Module that needs to be reduced. If you notice I have copied it 5 total times to get it work the right way.

Code:

Sub TestingSub()

Dim wsSource As Worksheet
Dim wsDest As Worksheet
Set wsSource = Worksheets("Catering and Rental Worksheet")
Set wsDest = Worksheets("Catering BEO")

'Entertainment Sub Box Fill
wsSource.Range("D13").Copy
wsDest.Range("F17").PasteSpecial xlPasteValues
Application.CutCopyMode = False

[Code] .....

View 3 Replies View Related

Leave Planner & Box In Colum A To Reduce The Number Of Days

Mar 18, 2009

I was created an annual leave planner and I would like the box in Colum A to reduce the number of days they have left every time they book leave. I would like it to start off as 25 days leave including UK bank holidays.

View 4 Replies View Related

IF Functions To Reduce A Large Number Of Bands To A Smaller Set

Nov 27, 2008

I'm using nested IF functions to reduce a large number of bands to a smaller set using the following formula:

=IF(LEFT(D4,1)="

View 9 Replies View Related

Formatting Worksheet: Re-adjust The Worksheet To Make It More User Friendly Based On Number Of Rows In Current Sheet

Oct 14, 2008

I have a worksheet with 30,000 rows. But sometimes even if I have fewer records in this worksheet(lets say 1000) worksheet shows the same 30,000 rows.And its annoying when you try to navigate using vertical scroll bar. Is there any option to re-adjust the worksheet to make it more user friendly based on number of rows in current sheet.

View 2 Replies View Related

Reduce Number Of Times Opening And Closing Blank Source File

Jul 9, 2012

I have code in VBA that takes a source Excel file and parses it to multiple re-formatted worksheets. Each formatted worksheet is different depending on a variable in the source. There are n of each type of data (1:n Water Sources, 1:n Water Treatment, 1:n Water Storage). Each item needs a copy of a blank re-formatted worksheet appended to the end of the existing data-type worksheet. For example: Water Source #2 is appended to the bottom of Water Source #1 on the same worksheet.

Currently, I am opening the blank re-formatted workbook each time an additional variable of same type is found in the source file. Meaning, if there are 8 Water Sources, I am opening and closing the blank re-formatted workbook 7 times to copy a blank Water Source to the bottom of the Water Source worksheet and then populate the data. AND if there are 3 Water Treatment, I would open and close the blank formatted workbook 2 more times to copy a blank Water Treatment to the bottom of the Water Treatment worksheet. The same goes for Water Treatment.

Obviously, a huge waste of resources and performance. I would rather open the blank re-formatted workbook once (first time an additional worksheet is needed), use the worksheets as needed, and close it at the end.

Attached is my current, working code of the above.

How should I re-write it to check if the blank workbook is already open use it, if not open it?

Code:
Sub Add_Facility(ByVal Worksheet_Name, Copy_Range, Max_Limit)
Dim Last_Row As Integer
Dim Source_Range As Range
Dim Dest_Range As Range
Dim wkb As Workbook

Set wkb = ActiveWorkbook

[Code] ........

View 5 Replies View Related

Number Of Rows In Worksheet

Jan 23, 2008

I have got an excel worksheet containing about 5000 records. However my excel file shows rows numbered up to 13000. All rows from 5001 onwards are blank.

The problem that i am having is that the scroll bar becomes smaller and it becomes difficult to navigate to a certain point within the sheet.

Is there a way i can delete or limit the number of rows that appear in excel. I have tried to select the rows from 5001 onwards and delte them but it doesnt work and i still have over 13000 rows.

View 9 Replies View Related

Lookup Function: Compare Every Part In The All Parts Worksheet To See If The Part Number Exists On The Active Parts Sheet

Dec 10, 2008

I have a spreadsheet with 2 worksheets. On the first "active parts" I have a list of active part numbers and on the second "All Parts" I have all of the parts available.

I want to compare every part in the All Parts worksheet to see if the part number exists on the Active Parts sheet - if it's there, I would like it to return the value "Active" in column B in All Parts. I have a formula in column B in All Parts that seems to work for the first few, but as soon as it finds one that is active, the rest of the cells below all return "Active".

View 3 Replies View Related

Calculate Number Of Rows Used On Sheet/Worksheet

May 28, 2006

Calculate the number of rows used in sheet. for exa: i have A1:A100 i want that B1=100 and if i delete some of rows the number of rows in B1 auto-change. and can let B2 display the number of rows deleted.

i have 2 sheets now, can the Cell C1 in sheet 2 display the number of rows in the sheets, B1 in sheet1 + B1 in sheet 2

View 9 Replies View Related

Set Textbox Control Source To Hidden Worksheet NOT Active Worksheet?

May 6, 2014

I have created an excel worksheet that will provide budgeting and estimating tools for my project managers. All data used to be manual entry and took a good while to complete. I am trying to automate the process with VBA.

I created a UserForm called InfoVerify1. On that form I have TextBox 1 - 10. When the UF opens, the boxes display project information from my worksheet called "Basis of Estimate", also known as Sheet26.

The TextBox1 ControlSource is set to "E4". When I run the macro with Sheet26 active, the proper information fills in. However, when I am on the Start page or any other worksheet and I run the macro, it tries to fill in the text boxes with E4, etc, from the active sheet. I tried changing the ControlSource to "Sheet26,E4" or any combo thereof with only error messages.

how to get it to refer to a cell on a particular worksheet and hold to that worksheet no matter which sheet I am on at the time I run the Userform?

View 3 Replies View Related

Search Across A Number Of Rows In A Worksheet And Then Match Against Two Columns

Nov 12, 2006

I would like to search across a number of rows in a worksheet and then match against two columns.

e.g.

Column B Column C

test 10

I would like the function to match against all rows that match against "test" in Column B and then work out which cell in Column C has the highest value

View 9 Replies View Related

Creating A Worksheet With Condtional Number Of Columns/rows

Sep 28, 2008

I have searched the forum and the 12 pages of results that had the words conditional clumns, but could not find the answer. I am new here so I don't want to ask a question that has been asnwered before. If I missed it I apologize.

I would like to create a spreadsheet that would "automatically" create the proper number of coumns or rows to satisfy a certain set of data. This may be better explained by way of example.

I do financial analysis of real estate. This real estate is say 100 lots today and these lots are going to sell out evenly over a 10 quarter period, or 10 sales per quarter. Simple enough to set up and show the proper cash flow. But lets say I wanted to chnage the sell out period to 8 quarters. Today I would have to manually delete the last two columns. Further let's say I want to run an analysis that has a sell out over 13 quarters. Then I need to add back in the proper number of columns and make sure I correctly copy over the formulas etc.

I'd like a way to have the spreadsheet automatically determine the proper number of columns (or rows) based on a formula that is part of the input data.

View 9 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

Copy The Active Worksheet

Jun 30, 2009

I have this macro created with macro recorder that makes a copy of my worksheet.

View 2 Replies View Related

Getting A Count Value From A Non-active Worksheet.

Dec 8, 2009

I am attempting to use the following line:

View 4 Replies View Related

Index Of Active Worksheet

Aug 28, 2007

I've been a somewhat casual Excel user and now need to do some VBA with a workbook that has several worksheets in it. In particular, the workbook has sheets that have been added "out of order", that is, the leftmost sheet is not the first one added to the book.

I need to write a VBA routine that looks "backward" from the current worksheet to "previous" sheets, i.e., sheets to the left of the current worksheet, but not to the right, so I can't refer to them as Sheet1, Sheet2, etc. and they actual display names that are not of that form anyway. I am aware of the "Worksheets" collection and the fact that I can "subscript" that to refer to the sheets in a left-to-right form.

I know that I can refer to the current sheet as "ActiveSheet" and I can determine properties like its name with "ActiveSheet.Name", but is it possible to find its index in the Worksheets collection? I'm looking for a function or property such that "ActiveSheet.Index" will allow me to refer to it as "Worksheets(Index)" and particularly to allow me to refer to preceding sheets as, e.g., "Worksheets(Index-1)".

If worse comes to worst, I can always cycle through the worksheets and check the name of each worksheet like this:

Sub Button1_Click()
Dim index As Integer
Dim strASName As String
strASName = ActiveSheet.Name
index = 0
Do
index = index + 1
Loop Until Worksheets(index).Name = strASName
MsgBox "Index of current worksheet is " & index
End Sub

And while I'm at it, is it possible in Excel to rename a control like "Button1" to something more sensible and mnemonic, like "btnRecalculate" or whatever?

View 9 Replies View Related

Rename Active Worksheet

Aug 25, 2006

I'm looking for a macro to automatically rename the active worksheet to Sheet1.

View 3 Replies View Related

AutoFilter Non Active Worksheet

Oct 2, 2007

I have a chart that gets updated to show the desired reporting period by clicking a button to run some code which applies filtering to the source worksheet using a value selected from a drop down validation list on the chart worksheet. When the code runs, the source worksheet displays temporarily. How do I prevent this switching back and forth between the data and chart worksheets during code execution? Undoubtedly, there is a better way to code this.

Sub Chart_FilterPPM()
Application.DisplayAlerts = False
wk = Worksheets("Charts"). Range("D63")
Worksheets("Leak Data").Activate
With Worksheets("Leak Data")
.AutoFilterMode = False
.Range("Headings_LeakData").AutoFilter
End With
With Range("Headings_LeakData").AutoFilter
Selection.AutoFilter Field:=2, Criteria1:=wk
Selection.AutoFilter Field:=11, Criteria1:=">5000", Operator:=xlAnd
End With
Worksheets("Charts").Activate
Application.DisplayAlerts = False
End Sub

View 3 Replies View Related

Track A Number Of Expense Items Accross 15 Worksheets With Up To 500 Rows Accross 30 + Columns Per Worksheet

Jan 12, 2010

I'm looking to use excel to track a number of expense items accross 15 worksheets with up to 500 rows accross 30 + columns per worksheet. Many of the learned people in this forum have helped me get this far, now I need some more assistance - please.

In my speadsheet I have a vlookup formula that returns a value from another worksheet. Here's an example.=IF(ISERROR(VLOOKUP($D3,Room_Configs!$A$1:$BO$3006,MATCH(M$1,Room_Configs!$1:$1,0),FALSE)),"",VLOOKUP($D3,Room_Configs!$A$1:$BO$3006,MATCH(M$1,Room_Configs!$1:$1,0),FALSE))

This works brilliantly. Now here comes the tricky part. What I'd like to do is append that formula with another one to do a vlookup on a second worksheet.

If both lookups return a value then I'd like the value of the 1st vlookup returned in the cell. If the value of the 1st vlookup is "0", then I'd like the value of the 2nd vlookup returned, and if the 1st and 2nd vlookup values are blank then a "0" is returned.

The name of the 2nd work sheet is "Non_Network_Equip"

Finally, it would be really great if the font colour for values returned from the 2nd vlookup forumla was blue.

View 9 Replies View Related

Separate And Save Active Worksheet?

Feb 26, 2014

Using VBA, I am trying (without success) to copy the active worksheet of my workbook and save it in the current folder using a filename shown in cell A1. I only need to save values and formats. Any existing code (auto fit) contained withing the sheet would no longer be required. I get a VB project message relating to macros. I would anticipate saving as xlsx would deal with this but again, am at a loss.

View 4 Replies View Related

Accessing Name Property Of Active Worksheet

Feb 23, 2012

In VB when I select a worksheet, I can amend the (Name) of the worksheet in the properties window. There is also the .Name property which is the same as the sheet tag name.

I can use the (Name) in vb code to identify the sheet e.g.

ControlSheet.cells(1,1)

without having to define ControlSheet as a worksheet first.

How do I access the (Name) which appears at the top of the list of properties in the properties window.

View 1 Replies View Related

Application Error When Worksheet Not Active

Mar 12, 2014

I am having an error in the following line of my code:

Set MyRange = Sheets("BackData").Range("rsJobTypes").Range(Cells(2, 1), Cells(cnt, 1))

If there is another sheet that is active, besides for the "BackData" sheet, I get an application error. I would like to know how I can reference this range without having to activate the sheet.

I tried adding "thisworkbook" before "sheets", but it did not seem to work.

View 3 Replies View Related

Macro To Change Name Of Active Worksheet?

Mar 27, 2014

Say i have a Worksheet named "gateway" or sometimes it will be "gateway (2)" (3) and so on. Is there a macro that i can call that in some ways calls the active worksheet and renames it to just "gateway" everytime?

View 2 Replies View Related

Copying Data From Active Worksheet Using VBA?

Apr 30, 2014

I have a code that I intend to use to retrieve 2 ranges from an active workbook (csv) and place those ranges in another named workbook. Both files are open during this procedure. The code I have is:

Code:
Dim rngA As Range
Dim rngB As Range
With ActiveWorkbook.ActiveSheet

[Code].....

The problem is nothing is displaying in Workbooks("data recorder template UTD Nodata").Sheets(".") I think that the code is not picking up the active workbook correctly but not sure.

View 2 Replies View Related

Find Active Cell On Another Worksheet & Go To It

Sep 28, 2009

I would like to be able to Click a Cell or Button to enable me to go from the 'VIN ENTRY' worksheet to the 'Date Completed' worksheet and then be able to enter the Date in the Correct cell cooresponding to the last 6 digits of the VIN. I have included the File

WorkSheet 'Date Completed

ENTER Last 6 Digits of VIN:K43070Click

Here to Enter Date Completed

WorkSheet 'Date Completed

Colum A Column B...................

View 3 Replies View Related







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