Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 125687

Microsoft Excel is a commercial spreadsheet application written and distributed by Microsoft.

1 vote

Calculate quantities in a userform

In any case, your approach will be slowed down by the frequent context switches between the VBA runtime and the Excel function evaluation engine. …
M.Doerner's user avatar
  • 1,510
4 votes

Writing an array to a worksheet

A faster alternative to writing the values individually is to assign the Variant array to the Value property of the top left cell of the range you want to past it into. That writes the array in one go …
M.Doerner's user avatar
  • 1,510
1 vote

Getting Rid of .Find in VBA Code

The most probable culprit for your performance issues are the constant context switches betwwe vba and Excel whenever you call find. …
M.Doerner's user avatar
  • 1,510
7 votes
Accepted

Summary Data According to Machine No, Order No and Shifts

To make the code more readable and more flexible, i.e. more maintainable, you might try to apply some general principles and some useful features of VBA/Excel. … You can define named ranges in Excel and then get the ranges by name in VBA. …
M.Doerner's user avatar
  • 1,510
4 votes

Pairing all identifiers from 3 sheets and list them on a report worksheet

Then you could avoid querying Excel for the last row each and every time you copy rows. …
M.Doerner's user avatar
  • 1,510
4 votes
Accepted

Remove unwanted characters from specified column in all Worksheets

Using Excel Functions If you do not want to use VBA at all, you can modify the previous approach to use a suitable Excel workbook function. …
M.Doerner's user avatar
  • 1,510
2 votes
Accepted

Populating monthly report with new data each month

Let me start with a number of general guidelines that can make your code more maintainable and more reusable. After that I will give some more specific advise regarding your code. General Guidelines …
M.Doerner's user avatar
  • 1,510
2 votes
Accepted

Transfer of data instead of copy.paste.clear used

(See this blog post testing the various ways to copy the values in ranges in Excel.) …
M.Doerner's user avatar
  • 1,510
4 votes

Merging rows in excel using VBA

Performance Next, let me give some performance tips that do not change your code radically: Accessing a worksheet in Excel VBA is expensive. … An alterntive approach would be not to use Excel at all and instead use a real database, e.g. Access for starters. …
M.Doerner's user avatar
  • 1,510
1 vote

Comparison of excel files, cell by cell

You only ask about performance, but I want to point out anyway that there is a small error in the definition of file2RC: you used column instead of row. Now, let me get to the performance part. The …
M.Doerner's user avatar
  • 1,510
3 votes

Sluggish Performance when using ranges from two workbooks to update the one

The outermost could simply do the enabling and disabling of Excel features and call a private procedure doing the comparison in between. …
M.Doerner's user avatar
  • 1,510
2 votes

Comparing Multiple Columns to Remove Duplicates

Reading in both the payment sheet and invoice sheet this way, allows you to iterate over both without switching back to Excel for every value. … In VBA the largest Integer is 32767, but a sheet in modern Excel can have millions of rows. You should really use Long instead. …
M.Doerner's user avatar
  • 1,510
3 votes

Increase the execution speed of VBA macro code

After having a short look at your code, I get the impression that your database accesses in a double loop are the cause of the long execution time. First of all, it is generally much faster to pull a …
M.Doerner's user avatar
  • 1,510
2 votes

"Pivoting" data with VBA

Data Input After the general pieces of advice applicable to basically all programming languages, let me come to some more Excel and VBA specific point. … Tables Even better would be to turn the input range into an Excel table, which we will call SourceTable. …
M.Doerner's user avatar
  • 1,510
6 votes

Recursive code to generate a parametric sweep of input values

This looks like a decent recursive implementation. So, this is mainly about style and readability. First, I would like to talk about two things which are really hard and could use some improvement he …
M.Doerner's user avatar
  • 1,510

15 30 50 per page