Best Method To Sort Huge Sheet
Aug 7, 2012
Is the a more efficient way of sorting a huge sheet (One Column only)? Currently, I use the below code and sometimes it throws an error (due to insufficient memory/ cannot undo this step)
VB:
Sub sort1()
Rows("1:1").Select
Selection.AutoFilter
ActiveWorkbook.Worksheets("Sheet1").AutoFilter.sort.SortFields.Clear
[Code] .....
View 3 Replies
ADVERTISEMENT
Apr 1, 2007
Is there anyway to put a background on a worksheet, without the file size of the workbook becoming monstrously huge? I have a small jpg file of our company logo, and I think that it would be a nice touch for it to be the background to our spreadsheet. But when I use this 50k file as the background, the workbook suddenly grows to a size of 7MB.
View 4 Replies
View Related
Jul 9, 2013
I have the following setup on a worksheet :
5427 Data
5427 Data
5427 Data
6565 Data
6565 Data
7765 Data
all I want to do is have the above table look like this :
5427 Data
6565 Data
7765 Data
The concept being that I can double click that row to see the additional information(i.e. expand to show extra information)
Real life use would be of such, the first column contains the invoice number, the 2nd 3rd etc contain item associated with such invoice.In grouping the column invoice number, you only have to look at one invoice, instead of it duplicating for each item contained within the invoice.
This will need to be done in an efficient manner(over 4000 rows need grouped)
I realize I could just create a list that has one copy of the duplicates, but I want to extract the original information as well. For example, it would look like the following :
Original :
1212 Data
1212 Data 2
1212 Data 3
2323 Data 1
2323 Data 2
Edited :
1212
2323
double click 1212 for :
1212
+Data 1
+Data 2
+Data 3
2323
Note : This grouping will also have to span across the whole row, sample rows :
Invoice# Price Color Weight Item
1212 Column1Data Column2Data Column3Data Column4Data etc.
1212 Column1Data Column2Data Column3Data Item2Column4Data etc.
View 4 Replies
View Related
Jul 6, 2009
I am writing a class to be used in Excel 2007 that will mimic the action of the FileSearch in 2003, but I am stuck with the sort.
View 2 Replies
View Related
Jun 9, 2007
I encounter a runtime error '1004' if the "Invoices" sheet is not selected when I run this procedure. The last line of the code is one which is highlighted when I debug.
Sub ProcessData()
Dim aiOldRows() As Integer, aiNewRows() As Integer ' Arrays of new/old rows
Dim rngRaw As Range 'Data entry area
Dim rngInvoices As Range 'Invoices range
Dim rngOpenPoint As Range 'Top-left corner of data entry area
Set rngOpenPoint = ThisWorkbook.Worksheets("Data Entry").Range("a3")
Set rngRaw = Range(rngOpenPoint, rngOpenPoint.End(xlDown).End(xlToRight))
FindNew aiOldRows, aiNewRows, rngRaw
InvoiceSequence aiOldRows, rngRaw
Set rngInvoices = Range(ThisWorkbook.Worksheets("Invoices").Range("A2"), _
ThisWorkbook.Worksheets("Invoices").Range("A3").End(xlDown).End(xlToRight))
rngInvoices.Sort Key1:=Range("M2"), Order1:=xlAscending
End Sub
You'll notice that there are two other procedures (FindNew & InvoiceSequence) being called by this procedure. I don't think those have anything to do with the error, but I can provide the code for those if needed. Oh, and one other secondary question. To declare the ranges rngRaw & rngInvoices I pick the top-left cell of the data and then do:.....................
View 3 Replies
View Related
Apr 6, 2012
My code is :
Public Const GRAPH_PutData_COL1 = "A"
Public Const GRAPH_PutData_COL2 = "B"
Range(GRAPH_PutData_COL1 & "1").Sort Key1:=Range(GRAPH_PutData_COL2 & "1"), _
Order1:=xlAscending, _
DataOption1:=xlSortTextAsNumbers
it is showing error, "sort method of range class failed error 1004"
Above error only showing when first record is empty...
View 2 Replies
View Related
May 9, 2007
i added a "Microsoft office spreadsheet 11.0 " object using additional control and used it in my form of Excel Macro. then i added some data from the combo box to the embedded excel object dispalyed. the form displays correctly and am even able to add data to cells.
but am not able to sort a column. gives me the error message "Sort method of range class failed"
have tried to make sure the sheet is active using the ".Activate" with the object name. this is the only solution available on the existing forums.
View 9 Replies
View Related
Jan 28, 2007
I have a macro that copys a worksheet a user-inputted number of times but throws an error after adding Sheet #62. The line it hangs on is:
Sheets(myTemplate).Copy After:=Sheets(i - 1)
Does anyone know if this is a problem with my code, a memory issue, or the workbook I'm using to copy? In the past when I've copied a lot of sheets in a workbook (to the same workbook), Excel sometimes won't let me add anymore but if I copy all the sheets to a new workbook it will sometimes let me add more sheets. I figured it was a problem with how Excel counts sheets.
Sub CopySheets()
myTemplate = ActiveSheet.Name
'First, jump through the validation hoops
Dim AddSheetQuestion As Variant
'Define the application input box question
showAddSheetQuestion:
AddSheetQuestion = Application.InputBox("Please enter the number of sheets you want to add," & vbCrLf & _
"or click the Cancel button to cancel the addition:", _
"How many sheets do you want to add?")
'Cancel or the X was clicked
If AddSheetQuestion = False Then..................................
View 9 Replies
View Related
Dec 10, 2008
I'm trying to get the Find and FindNext methods to work. Column C contains serial numbers and there's a chance that a serial number might appear more than once in the column. What I'm trying to do is get Excel to find the first occurance of the serial number, find what row it's on and then see if this matches the variable 'CurRowNo' (defined earlier in the code). If it doesn't I want it to look at the other occurances of the serial number, find what row they're on and see again if it matches CurRowNo.
The variable 'EngCount is the number of occurances of the serial number (also worked out earlier in the code). I've got the code below, but I get the error 'Method Range of Object Global Failed' on the FindNext line. I have no idea what this error means or why it's happening.
View 3 Replies
View Related
Oct 25, 2009
Sheet 1 is my main page containing all my data, full of formulas and is protected. Sheet 2 is a simple sorting page with no color and is simply for sorting and printing.
Sheet 2 has IF formulas refrencing rows and cells on Sheet 1.
Example Sheet 1 A2= Bob
Sheet 2 A2="" until I put in this formula:
=IF(Sheet 1!A2="","",Sheet 1!A2)
Now Sheet 2 A2= Bob
Simple...
But when I delete a row in Sheet 1 (using my cool new macro...long story)
I get #REF! in the cells on my sorting sheet, as I should I guess, because there is no more row there to reference. It's annoying, but what do I do to fix it without just unchecking the #REF! in autofilter on Sheet 2.
I just want to eliminate #REF!
Do I need to put something else in the IF formula?
View 9 Replies
View Related
Jul 4, 2014
i want to Sort by column E Type,which i can do manually easily.but then i want to run a macro that will copy all the rows with values,ie.Express Checkout Payment Received etc to another worksheet and name that worksheet with Express Checkout Payment Received.
View 1 Replies
View Related
Mar 31, 2014
use CTRL+ Navigation Arrow Key on keyboard i.e. if you wanna go to the last Non-Blank row in a column press CTRL+Down Arrow key if your range contains empty cells then use this shortcut SHIFT+CTRL+Arrow key
if you wanna Get the Value of cell in a column you can use this formula
=INDIRECT("A"&COUNTA(A:A))
This formula will work only if there is no Blank Cell in the range.
View 1 Replies
View Related
Oct 26, 2008
I have to create a 12 row 14 column table which will be printed out and put onto a (around) 20 by 20 poster board...so it has to be HUGEEEEEE. How do I do this, all the boxes inside the table I want to have control of meaning size and stuff. I will have to write in all boxes.
P.S: Yes. I know you guys prolly think im a idiot but this is my first time and my due date is appraoching fast, if anyone could help that would be great.
View 7 Replies
View Related
Jan 14, 2005
I have an excel file that is 50mb and I don't know why it is that huge. I did not create this file and was asked to look at it and figure out why it takes 10 minutes to open?
There is 3 tabs and very little data. How can it be so huge?
View 9 Replies
View Related
Sep 19, 2008
I'm working out some vba script, that could filter up to 300,000 rows long list.
here is sample from that list:
1000999999027FRESH PASTA FETTUCINE WITH TOM102002P N0809100000035000000012810000000+0000000+ 0000000000000000+0203001896409
2000999999027020300189640900000000000005740200070063
1000999999027FRESH PASTA FETTUCINE WITH SPI102002P N0809100000025000000015700000100+0000000+ 0000000000000000+0203001896454
20009999990270203001896454000000000000057010180265125740200070070
As you can see, the rows are starting with 1000 and 2000. And that would be the criteria.
I'm importing the loooooong list file onto sheet1, and i'd like to sort the list so it puts all the codes starting with 1000 onto sheet2 and rows starting with 2000 onto sheet 3.
With regular filtering mode it's impossible and keeps giving errors.
I know it's possible, but i can't figure it out anymore.
I was thinking about to make script that would copy one row from sheet to sheet and loop it. But my mind just crashes doing that.
View 9 Replies
View Related
Apr 27, 2009
When i'm working with huge data on excel say for exam 50000 records and about 25 to 30 columns, everytime i use any formaula and while saving it the file is not responding, what ever the formula like vlookup, countif, converting in values applying filters and removing filters and with that whatever the changes i do that is not seen next time when i open file.
View 9 Replies
View Related
Jan 8, 2008
I have several columns of info on my worksheet. I want to output a list of all possible permutations from this worksheet (not the number of permutations but the actual permutations themselves).
View 9 Replies
View Related
Jun 25, 2008
I'm currently stuck with the following problem. I have a fairly large database with 10,000+ companies (in the rows) over 10 years (in the columns). I want to aggregate industry averages of a financial item in so-called SIC codes (there are approx. 1,000 different 4-digit SIC codes).
I've been using the daverage function, which works for one criterium (e.g. SIC = 0100) but not for the entire range of criteria. Does this mean I'll have to manually adjust every daverage function for every single SIC code? Or can this process be automated in some way?
Attached is a simplified version of my database file.
View 9 Replies
View Related
Jul 21, 2014
I have a huge data file. I would like to have excel automatically delete all rows with the value of 7 in column b. Can I do this without manually selecting all of the rows (I can sort by that value, but there are 120,000 rows).
View 6 Replies
View Related
Aug 29, 2009
I have a sheet that has 65000 rows and 3 columns, I need to load this sheet into a system that will only deal with 25000 rows at a time. How do you do a huge range select with Excel?
I need to select range a1:c24999 cut it out and paste it into another sheet. I have about 75 of these these sheets to do is there a way with a formula, a script or? to do these huge selects?
I am a Mac user, running MS office 2008 for Macintosh.
View 11 Replies
View Related
Apr 12, 2013
The project I am currently working on is to extract the from over 25,000 lines of data the top ten of our customers for 2012. Our customers are billed monthly. We have about 2,300 customers. There are several customers who have more than 1 account.
The easy part has been to create a "charges" report and download into an excel format. The information can is alphabetized, but then the challenge comes in. Ideally it would be a snap to total each customer seperately and then somehow be able to extract the top ten from those totals.
View 14 Replies
View Related
Oct 24, 2013
I have this table with some information that I need to work with. The data is simple, but it has many issues, at least for me, to be able to work with it properly.
Basically, I just need to transfer part of the data from this table to another table (in another order). I failed to use vlookup because I need more than one parameter to search the data (Date, Shift and Sector).
The problem I am having to get the codes from the source table is that the same code sometimes shows up more than once per date, per shift and per sector. It's also not following a numeric pattern. I couldn't elaborate any combination of formulas to get the info I need....
I also can't change the format of the source table, because I'm not the one who made it, it has years already, and is constantly updated day by day by a good old man who doesn't know much about computers.
The file is attached : Example.xlsx
View 4 Replies
View Related
Dec 7, 2011
We just upgraded to Office 2010 and now on many of my regular Excel files, when I open them in the new version, the last row that's visible in the window ends up with some massively huge row height such that you can't even page down past it.
I can resolve it easily by clicking on the row number and re-sizing it, but I'm getting tired of doing that.
What's wrong with Excel 2010?
View 3 Replies
View Related
Mar 6, 2014
I have a file with 300k lines of SKU data. This is data by month for 12 months (so roughly 25K SKUs per month, with changes in SKUs each month.) I take this data and pivot it and drop it into a file.
I noticed last month when I prepared that the SKUs have names next to them, and sometimes the information is pull by the name instead of the SKU. Unfortunately, in the master data, someone entered different names in a few of the months. So for example, in some months SKU 0012 is Green B and in other months it's Green Beans. I need the names to be the same.
Is there a quick way to fix this given that I'll have 12 records and maybe 3 will be one name and 9 will be there other? Finding and replacing every one is a chore because on pivot there are 40k. I don't think I can do a quick remove duplicates because it would remove multiple months. I just want each SKU to have the same name.
View 3 Replies
View Related
Feb 21, 2010
I have a problem with one of my loops, it takes about 17 seconds to do the job of calculating a simple moving average for 200 periods on 20,000 rows. However, if I do the "FillDown" function for the same type of average, it takes 1 second.
Here is the code for the loop:
View 9 Replies
View Related
Aug 2, 2006
i have two columns in tow seperate workbooks to be compared:
in say inp.xls, there is a column(COL A) containting a lot of entries(numbers) - roughly around 60,000. Now in the other workbook, say mem.xls, i have a smaller set of numbers in a colum(COL B) - roughly around 300.
Now, the problem is, COL B, has numbers which may or may not match with numbers in COL A.
* If there is a match(between COL A and COL B), the row number at the match in COL A.
* If there is no match, the row of the closest number (in COL A) before to the number in COL B.
Example:
ROW COL A-----> COL B---------->
1 2184058252 2184276560
2 2184058280
3 2184058296
4 2184058312
5 2184058320
6 2184773640
7 2184774216
8 2184774272
9 2184774424
Now, i want to find 2184276560 in COLA, since it is not there, i want it to return the row number of the closest(previous) viz. row 5(2184058320).
Now, since this is a huge comparision set, im wondering what is the best way to do it. Im using VBA....
View 9 Replies
View Related
Feb 5, 2014
I've got a main workbook (excel 2007) with a main spreadsheet where i group all the information (text and values) about brands and models linked to 10 workbooks (brands) with several spreadsheets (one spreadsheet=one model).
On the main spreadsheet I've got 16 lines for each model which they have the follow formulas, wich are linked to other workbook / spreadsheet (Mar/Gato)
1)
IF(ISERROR(VLOOKUP(V844;[Mar.xlsx]Gato!$A$3:$CE$78;3;FALSE));"";VLOOKUP(V844;[Mar.xlsx]Gato!$A$3:$CE$78;3;FALSE))
and will return text values
2)
IF(ISERROR(VLOOKUP(V844;[Mar.xlsx]Gato!$A$3:$CE$78;82;FALSE));"";VLOOKUP(V844;[Mar.xlsx]G!$A$3:$CE$78;82;FALSE))
And will return number values
3)
IF(M844<>"";HLOOKUP($V$3;[Mar.xlsx]Gato!$A$2:$CE$78;2;FALSE);"")
And will return number values. The return value (;2 goes from 2 to 16.
This process repeats to all the 10 workbooks e and 250 spreadsheets
4) Table Array of the model spreadsheet
With regard to formula 1) and 2)
The problem is that the table array (on the model spreadsheet) could have diferent dimensions (becouse the launch year of the model) like this:
A$3:$CE$78 (2009 - Launch year)
A$3:$BR$78 (2010 - Launch year)
A$3:$BE$78 (2011 - Launch year)
A$3:$AR$78 (2012 - Launch year)
A$3:$AE$78 (2013 - Launch year)
And the return column (value) for formula 1) is always ;3;
And the return column (value) for formula 2) are like this:
;82; (2009 - Launch year)
;69; (2010 - Launch year)
;56; (2011 - Launch year)
;43; (2012 - Launch year)
;30; (2013 - Launch year)
;17; (2014 - Launch year)
The difference between above values is 13, it corresponds 12 months and the total column (12+1)
For the formula 3) the table array its the same, the only difference is instead of starting A$3, starts in A$2
5) The update of the formulas 1) 2) 3) for 2014
I'm doing this manually... The formulas are updated like this,for 2013, I've got table array A$3:$AE$78 and the return value (;17, then for 2014 i will have a table array A$3:$AR$78 and the return value will be (;30, and so on
5) Change the network drive
For other reasons I've to change my files to another network drive, something like this:
Q:KPI2014Main File
6) Main Goal
I was thinking using Excel's regular Find and Replace feature to change:
- The network drive designation
- the table array area
- The return value
But I don't know if this process ( Find and Replace) is safe and clean. I'm doing this manually and I've got on the main worbook/sheet 4000 lines with 3 formulas its 12000 operations!I'm on the 350 line....!
The main goal is to update the all formulas (links) to "brand" workbooks and inside "model" spreadsheets automatically with a macro.
View 2 Replies
View Related
Apr 11, 2012
I wanted to see if there is a VBA code to do the following :
a) Select a TabText Delimited file based on a criteria
b) Import the Selected Data to Excel
I have the vba code where I can open the tab text delimited file in excel, use a selection criteria and then copy the data into excel. But I am having problems with the case where the Tab Text Delimited file exceeds the row limit that excel currently has and wanted to see if the data import can be done without opening the text file into excel at all.
Here is my current query :
Sub TEST()
' TEST Macro
Workbooks.OpenText Filename:="E:Testdata.txt"
ActiveSheet.Range("$A$1:$B$1048576").AutoFilter Field:=1, Criteria1:="1234"
Range(Selection, Selection.End(xlToRight)).Select
[Code] .......
View 3 Replies
View Related
Oct 28, 2008
My workbook holds a month template and sheets for each month. I work on modifications in the template ,but would then like to update all the monthly worksheets. I recorded a macro to show me how to start programming the vb sub, but get a runtime failure 'error 1004 Select method of range class failed' when trying to select the column to copy,
View 4 Replies
View Related
Jul 20, 2008
I teach in about 30 student a class I have in a sheet their names in column A columnB their mark the third columnI want to put a b c : A for excellent b for good c for bad I want these to be sorted into the other sheet
sheet2 contains all of the studnt with the A
sheet3 contains all of the studnt with the b
sheet4 contains all of the studnt with the c
View 9 Replies
View Related