Hello! Please help someone... I am still at work and completely stumped. I am a relative beginner at VB and have put together some apparently awful code (as shown below). It is to compare two incredibly huge lists of strings (which might duplicate if I take out things like - (not sure if relevant!)), find matches and entering text next to each one. It is very slow and completes a loop about 4 times a minute (yes i have timed it). the annoying thing is, that it used to run quickly and now it hates me!!!!!
IDRange is 1D Range, but 15 000 rows long, and Restoring about 4000 long
How can i make it fast and why would it run quickly first and then run very slowly??? Please help... please!
Can email whole workbook if necessary.
Thanks, Becky - Sub UpdateRestoringNew()
-
-
'Update Restoring, Ingested, Failed, Multiple Tapes and Recheck
-
Dim IDRange As Range, Restoring As Range, Ingested As Range, Failed As Range, _
-
Recheck As Range, MultipleTapes As Range, ResString As String, IDMatch As Range, _
-
CellCounterRes As Integer
-
-
Sheets("Ingested Content").Select
-
Range("$D$5").Select
-
Set IDRange = Range(Selection, Selection.End(xlDown))
-
-
Sheets("Tracking").Select
-
Range("$A$460").Select
-
Set Restoring = Range(Selection, Selection.End(xlDown))
-
-
For CellCounterRes = 1 To Restoring.Cells.Count
-
ResString = Restoring.Cells(CellCounterRes).Value
-
-
' Restoring Update
-
Set IDMatch = IDRange.Find(What:=ResString, LookAt:=xlPart, LookIn:=xlValues)
-
If Not IDMatch Is Nothing Then
-
Restoring.Cells(CellCounterRes).Offset(0, 1).Cells(1).Formula = "Updated"
-
IDMatch.Offset(0, 1).Cells(1).Formula = "Restoring"
-
End If
-
-
Next CellCounterRes
-
-
End Sub
0 1156 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Shay |
last post by:
essentially I am trying to do some counts based on some
assumptions in the recordset. So I get the RS back, put
the values into a variable, move to the next record in the
RS and compare what is in the variable to the value in the
next record in the recordset and do a count. Then
overwrite the value in the variables and do the same for
the next record and so.
But this runs extremly slow. 5000 records takes about 10
minutes in IE6 and I...
|
by: DJJ |
last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL
tables to a Microsoft Access 2003 database. I am finding that the data from
the MySQL tables takes a hell of a long time to load making any kind linkage
with my Access data virtually useless.
I have the MySQL driver setup in as a USER DSN. The MySQL data is sitting
out on a server and the Access database is running locally. The network
connection is very...
|
by: Yonatan Goraly |
last post by:
I am in the process of adding PostgreSQL support for an application, in
addition to Oracle and MS SQL.
I am using PostgreSQL version 7.3.2, Red Hat 9.0 on Intel Pentium III board.
I have a query that generally looks like this:
SELECT t1.col1, t2.col1 FROM t1, t2 WHERE t1.x=t2.y AND t2.p='string'
AND t2.q=1
This query is strikingly slow (about 100 sec when both t1 and t2 has
|
by: Janross |
last post by:
I'm having trouble with a query that's prohibitively slow. On my free-standing
office computer it's fine (well, 2-4 seconds), but on the client's network, it
takes at least 5 minutes to run. Obviously not workable!
I know where the problem is, I just don't know how to fix it. The query calls
a function, and I assume it gets slow because the function runs on every
record.
So--is there a way to rewrite the function so it's quicker?...
|
by: spike |
last post by:
Im writing a program to search for a string in a binary file.
And it works. The problem is: It is sooo slow! how can i make it faster?
It takes 27 seconds just to search a 5 meg file.
I guess it has something to do with the strequal() function...
Btw, thanks to all of you who answered last time!
code:
-------------------------------------------------------------------------
#include <stdio.h>
| |
by: mp |
last post by:
Hi,
MS Access DB, C#, VS, SQL
I have implemented search with SQL statements like follows:
SQLString = "SELECT ENGLISH FROM MyTable WHERE ENGLISH LIKE
'"+txtWordManipulation.Text+"%' ORDER BY ENGLISH";
end everything is desperately slow. DB is more than 150k words and I haven't
defined primary key because indexed option is set on Yes (Duplicates OK).
|
by: Lucas Tam |
last post by:
Hi all,
I'm concatenating a large SQL string for updating a table. There are >
80,000 commands (rows) in the SQL string. VB.NET seems to be *VERY* slow at
string concatenation when the string gets large...
Is it possible to execute a SQL command from a text file? .NET can
streamwrite extremely fast so I was thinking of writing all the commands to
a text file then executing the text file.
|
by: Andy_Khosravi |
last post by:
My problem:
I'm having trouble with a query taking much too long to run; a query
without any criteria evaluating only 650 records takes over 300 seconds
to run (over the network. On local drive takes 120 seconds).
The Setup:
I'm running Access 97 non-developer edition. I have exactly zero other
tools to use and no way to change that =(. My database is compiled and
resides on a network drive. The database has not been split into a...
|
by: NeoPa |
last post by:
ANSI-89 v ANSI-92
Before we get into all the various types of pattern matching that can be used, there are two ANSI standards used for the main types of wildcard matching (matching zero or more characters or simply matching a single character) :
ANSI-89 - Mainly used only by Jet / ACE SQL
ANSI-92 - Mainly used by SQL Server and other grown-up products
In the later versions of Access it is now possible to select ANSI-92 compatibility as an...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |