Slow Writing To Large Number Of Cells

Mar 1, 2007

I heard there is an efficient way of writing large amounts of data at once to a worksheet. My program is writing alot of data (e.g. 600+ items in each row) and takes over an hour to run because it writes to each cell one-at-a-time. I seached this forum and couldn't find the answer. Here is an excerpt from an old 1998 article by Dermot Balson and William Mercer that used code to write to cells in large chunks but it doesn't work for me - I get a method failed message.

'to read in
Dim A As Variant 'MUST be variant, no brackets
A = Range("SomeRange").Resize(10,20) 'reads 10x20 array starting at range SomeRange
'(NB I've used Resize above but you can specify a range of cells any way you want)

'to write back to sheet
Range("SomeRange").Resize(10,20) = A
'A can be any data type but MUST be two dimensional even if you are only writing one
'column or row - first dimension is used for rows, and the second for columns
'this can be slow - see third question below for workaround..

Here is the link to the article: http://www.avdf.com/apr98/art_ot003.html. A more detailed explanation how this trick works

View 4 Replies


ADVERTISEMENT

Slow Writing To Cells

Jul 6, 2007

A macro in workbook 1 creates a report by reading & manipulating data from two workbooks(WB 1 and WB 2).

A new blank report sheet is copied from WB1 to WB2. The data (some text, some numeric) is collected in a 20 element, single dimension array & written to the new sheet in 20 columns using a for/next loop. This is repeated for many rows(can be more than 1000).

The array is "erased" before each row. Screenupdating is turned off, calculation is turned off. The report takes longer & longer each time it is run - Why? With the one-and-only "Write" line "remmed out" the report takes just 2 secs however many times it is re-run - including the copying of the blank master report page. If the first report takes, say, 1 min the second time takes 2 mins & the 3rd - 3 mins etc. Reset is only achieved by exiting excel. The code in question is:- For col = 1 to 20 : cells(ro,col) = d(col) : Next col. (ro = the current row number which is incremented for each pass, d() is the data array)

View 9 Replies View Related

Large, Slow Workbook

Aug 31, 2008

I have a large Excel workbook (about 70,000KB) and it takes ages to load and is slow to operate.

Is there anyway of compressing it or making it run faster and not slow down the computer?

View 9 Replies View Related

Writing Formula In Dynamic Number Of Cells?

Feb 13, 2014

I'm trying to create a "master file" that can be used later (a tool other uses can pull up) on with datasets of varying size. I'd like to "data dump" a table of individuals with subsequent columns of various characteristics, then automatically compute various things. So then a user can dump their data into my file and "get the answer" immediately. I've seen some stuff on running one calculation on a dynamic number of cells, but let me illustrate why this is different. I want to perform a dynamic number of calculations, see below:

Each row (record) is a person, with some characteristics (numerical). Ultimately I have a few columns on the end with some computations (Excel formulas) I'd like to do. I'd like to do this for each person (that is, each row) in that data that I dump in. But the thing is, ahead of time we don't know how many people will be dumped in, and that changes (because I'd like this to be a tool...). So how do I tell Excel to compute things if there is a person in that row, but do nothing and leave cells blank if there isn't a person? Ideally I don't have millions of ifs testing for blank cells either. I'd like to do this with Excel functions only and not VBA, if at all possible.

View 1 Replies View Related

Slow Scrolling On Large Sheet?

Apr 20, 2009

I currently have a workbook with 6 sheets, the main worksheet has roughly 10000 rows rows (with is the one Im having trouble with) up until a few days ago scrolling wasnt to bad but just recently it is really struggling to scroll (no changes to workbook)

I have a quad core Q6600
4GB ram
plenty of HDD space
the excel doc size is 2.8MB

is there anything I can do to improve scrolling on large spreadsheets?

View 7 Replies View Related

Vba Macro: Check A Large Number Of Cells

Jul 13, 2006

What i'm trying to do is to check a large number of cells, if "0" is written down in that cell it stays as it is and if the number is different from "0" i want to put a "1" instead.

View 5 Replies View Related

Macro To Link Large Number Of Cells Between Worksheets

Feb 18, 2008

I would like to write a macro that links cells in one workbook (working) to cells in another workbook (summary).

I don't want this to be a straight swap thought, I'd like it to contain the following formula:

=IF(Working!G8="a","a","")

The cells in the working workbook are listed vertically, while the cells in the summary workbook are listed horizontally.

ie. link G8-G18 in working to B3-K3 in summary
link H8-H18 in working to B4-K4 in summary
...etc

View 9 Replies View Related

Calculate The Cells In Sheet Containing A Large Number Of Array Formulas

Oct 14, 2008

I I have a excel document which has a sheet containing a large number of array formulas.

I turned the automatic calculation off.

However, even when I press F9 to calculate the cells it just crunches, gets stuck at “Calculating 0%” and then crashes.

The majority of the array formulas are IF queries with multiple criteria.

Would it speed up the calculation if I didn’t use array formulas?

View 2 Replies View Related

Writing A Number After The Formula For A Cell

Aug 17, 2007

I have a cell in which I use the following formula:

View 13 Replies View Related

Writing Number As Text To A Cell

Jun 16, 2013

Process is that I read in lines from a text file and then based on a filter I then write some those values to a sheet. One of the values I transfer is always 5 characters with a trailing space. The first four may be all numbers (e.g. "0013 ") or a mix (e.g. "013G "). When I write these to the spreadsheet the ones without letters always end up as a number (e.g. "0013 " become 13). How do I force the cell to show all values as text in the cell just like I read it in. In fact, I'd prefer stripping out the trailing space but it's not critical. That I can do (TRIM).

View 4 Replies View Related

Writing In Two Cells One Word?

Apr 22, 2013

I'm trying to write a word or more but i want it to be in different cell.

Like: this sentence "Excel Program" write it in cell a1 but it slip to the cell a2. (so in cell a1 adn a2 this sentence).

View 4 Replies View Related

Writing Sub That Reads All Cells In Matrix?

Apr 11, 2013

How to write a sub that read all cells in the matrix ( a block of cells let's say: A5:F15).in two dimensionals. This is what I've done so far, but i got nothing:

Sub myarray()
Dim myarray() As Variant
myarray = Range("A5:f15").Value
End Sub

View 2 Replies View Related

Use More Than 1 Range Of Cells When Writing A VBA Macro

Nov 18, 2008

Just wanted to know if I could have a range or ranges which are split. The current range i have is N5:AV6. I need to miss out every 6th cell so am looking to do a number of ranges like this - N5:R6, T5:X6, Z5:AD6 etc etc. If this can be done could you show me how I would need to lay it out?

View 2 Replies View Related

Writing The Contents Of Cells Into A File

Apr 12, 2009

I have a bunch of values in column A, and I need to write (export) the entire column into a file called "ColumnA.dat".

create an Excel Macro Script that would accomplish that?

View 9 Replies View Related

Subscript Out Of Range Writing To Cells In Loop

Oct 4, 2006

i'm trying to get my code to work. Basically my code opens up workbook and extract the relavant data into the main workbook. Previously Its just a single For loop and it works perfectly after changing to double for loop its stuck.

Sub RunCodeOnAllXLSFiles()
Dim lCount As Long
Dim wbResults As Workbook
Dim wbCodeBook As Workbook
Dim rCell As Range
Dim lCount2 As Long
Worksheets("Data").Select
Range("a2:ac65536").Clear
Application. ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False
On Error Resume Next
Set wbCodeBook = ThisWorkbook..................

View 6 Replies View Related

Slow VBA - Refresh Button That Enter Formulas Into Cells

Jun 13, 2014

I built a very basic refresh button that enters formulas into cells.

.Range("C12").Value = "=SUMIFS(Inventory!$R:$R,Inventory!$M:$M,'Frozen Dashboard'!$D$3,Inventory!$A:$A,
'Frozen Dashboard'!C$11,Inventory!$Q:$Q,'Frozen Dashboard'!$B12)"

Basically, I have around 50 of these individual cells that I am pasting the formula into.

Currently is taking 28-32 seconds to refresh these 50 cells.

Anyways to expedite these refreshes ?

I am also using the :

application.enableevents = false, and application.screenupdating = false

but still way to slow..

View 4 Replies View Related

Large Number Count

Aug 17, 2007

If I have the numbers 1-50 repeating in columns, 1-50, 1-50 etc is there a way to determine that number "1" falls 1st, 51st etc in the sequence without doing a manual count? Or that the number 2 falls 2nd, 52nd etc?

View 10 Replies View Related

VBA- Large Number Of Lines

Jan 10, 2007

I am trying to copy part of one line of pasted information in to a certain place on the line below.

i.e I want
ABCabc

to look like

ABC
abc

This needs to happen for a large number of lines. I have already added a space in between all the original lines.

View 9 Replies View Related

Want To Display The Cell Next To A Max/large Number.

Sep 22, 2009

I'm working on a spread sheet to identify the to ten numbers from a list. I can find thes numbers and use ( =MAX('MHF2'!B:B) )for the function to do so. I'd like to dispaly the data in the cell directly to the left of this number... How do I do this?

11302
21000
3484
4440
5428
6419
7367
8333
9315
10258...........

View 2 Replies View Related

Find Top 3 Value From Large Number Of Data

Apr 20, 2014

I am facing problem to make summary sheet of top 3 value from large number of value of my excel sheet like-

Sheet1

A
Group
B
Name
C
Value

1
Nashid
200145

[Code] ......

Now I want to make summary in sheet2 top 5 value among the list of sheet1 separately from group 1, 2 & 3.

If group number is 1 in sheet1 then top 3 value will be like this-
Group1
Name
Value

Nashid
200145

Jabed
184198

Eman
156622

If group number is 2 in sheet1 then top 3 value will be like this-
Group2
Name
Value

Rubel
172569

Hasin
152304

Monem
104463

If group number is 3 in sheet1 then top 3 value will be like this-
Name
Value

Romel
168251

Nasim
136357

Hasan
120410

View 1 Replies View Related

Formatting Large Number Of Websites?

Jun 17, 2014

I have an issue where I need to apply certain formats to a number of text strings which are domain names. This is purely for reporting purposes. I don't need to actually visit the url. This video demonstrates a bit more. [URL]

View 1 Replies View Related

Sorting In A Large Number Of Rows

Oct 29, 2007

I am trying to sort in rows, a large number of rows. I can do text to columns, delimit by colon, and sort individual rows. But I have spreadsheets that are 100s of rows long. Is there anyway to automate?

View 4 Replies View Related

Large Number Loosing Last X Digits

Jun 13, 2008

I have problems in PASTING my 19 digit number from the source report into excel.

E.g, the original value is 8321515222222123122 but it always transfer to 8321515222222120000

I have tried the simple cell format setting, that is after pasting, I set the cells to text, but it doesn't help and also try the custom fomat "###################", but it is still the same result with the last 4 digit lost.

What I want the format to be is not in scientfic and have to be full display.

View 4 Replies View Related

Applying Formulas To Large Number Of Dates

Mar 17, 2009

i have a spreadsheet with a certain data (rate of return) associated to a specific day of a year. (ex. 8-dec.-08 0.99865), and i have to calculate the rate of return (r) for every month, which is done by applying a formula (GEOMEAN) to all the rate of returns for the days of a month (ex. GEOMEAN(r[01 dec.]:r[31 dec.])).

i don't have any problems with that part. the hard part is that i have every single trading day from jan 00 to dec 08 (2000+ days), and i do not want to manually select the ranges. also, the dates do not include weekends (trading days per year = 252) which means that i cant (a) automatically determine a range or (b) automatically associate a number of days to a month (ex. oct 08 doesn't have the same amount of days as oct 07, because of the way week-ends and holidays are arranged..)

View 5 Replies View Related

How To Get Large Number From Raw Excluding Date Format

Apr 10, 2013

I have data in F6:AG6 raw filled with numbers as well as dates, i am looking for formula which can calculate a larger value of number format (excluding date format).

View 1 Replies View Related

Convert Text To Number - Large Database

Aug 30, 2009

The format of the numbers are:

####-##-###-####

I have 2000+ numbers is coloumn B.

There are a lot of sets of numbers that are still text! It's highly annoying and I need to analyze the data in Access.

I tried the paste special advice and the 3 ways microsoft suggests. I have a feeling its not working because of the required format that I need.

I need to do this project tonight!

Background: these are imported numbers, I had to combine other excel databases... By the way, is their an easier way to combine excel sheets into 1?

View 12 Replies View Related

Delete Blank Rows :: Large Number Of Row

May 18, 2009

The following macro deletes blank rows in my project (I have a source sheet that I "transfer" information to various "law practice worksheets", and it works fine. However, once I get past a certain number of rows (my project will include 65,000 rows), the macro does not delete the blank rows any more from the "law practice worksheets" (I previously sent this spreadsheet to the Forum with another question that was not answered yet). Here is the macro for deleting rows:

On Error Resume Next
Sheets("InternatlLaw").Select
Range("A2:D65000).Select
Application.DeleteBlankRows = True
Selection.EntireRow.SpecialCells(xlBlanks).EntireRow.Delete
ActiveSheet.Range("A2:D65000").Select
On Error GoTo 0.............

View 9 Replies View Related

Method For Find Large Number Of Data

Jan 19, 2010

Each sheet contains 30,000 rows of data in column A, C, E, G and I.
I want to find each cell of column A, C, E, G and I to another sheets column A, C, E, G and I respectively.
If match found then it should return "True" in column B, D, F, H and J.

I have tried VLookup, but it takes too much of time for calculation (1,50,000 vlookup Formulas needs to calculate in each sheet with If condition) some time calculation gives wrong results.

As well as I want to do filtering on this all the data... so that time calculation gives the problems (I have used application.Calculation=xlCalculationManual)

So now I am using Range.Find method, but that loop excecutes for 30,000 times and each ittration contains 5 Find methods.

View 9 Replies View Related

Excel 2007 :: Handling Large Number Of Records

Jul 10, 2013

I have various month's data - forex tick data - each month has between 12 and 14 million records and comes down as a .csv file.

I would like to analyse the data in Excel

How I can breakup the huge .csv file into manageable excel parts?

View 3 Replies View Related

Data Filtering Based On Last Two Digits Of Large Number

Mar 17, 2006

I have a very large database where I want to filter out numbers that do
not have certain two digits as their last two. For example, the column
based on which I want to filter out data contains numbers like
197301310153. I want to filter out anything that does not end in 53....

View 13 Replies View Related







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