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 146810

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

5 votes

Which is faster: Unhide rows during IF or Unhiding them all at once in another macro?

The difference is whether you are doing the looping in VBA or getting Excel to do it for you. … In effect the time taken for Excel to hide 1000 rows will be very similar to 1 row, since the majority of the time will be spent warming up (switching context from VBA to Excel) and doing the screen rendering …
Greedo's user avatar
  • 2,595
4 votes

VBA: Efficiently Organise Data with Missing Values to Achieve Minimum Number of Tables

Not really an answer but too long for a comment On the algorithm, I'll ignore the point that this isn't doing what you want (isn't guaranteed to give best answer) since that kind of thing is off topic …
Greedo's user avatar
  • 2,595
3 votes

Evaluating formulas greater than 255 characters

To follow up on this, if you want this to be a formula you can call from inside an excel cell (which as I say in comments is probably a bad idea x->y problem). … In modern Excel I think LAMBDA or some other approach negate most uses for calling Evaluate through VBA from the workbook Update To explain what I meant about doing the evaluate delete return in helper …
Greedo's user avatar
  • 2,595
7 votes

Small datasheet code running super slow on Excel VBA

Here's why code might be slow specifically in Excel VBA: Reading data from the sheet to VBA one cell at a time rather than all in one go. … VBA is designed to integrate really closely with Excel, so my VBA apps generally do most of the calculating in the worksheet, and just a bit of automation from VBA. …
Greedo's user avatar
  • 2,595
3 votes

Loop between two Arrays and change values based on condition

(moved from comment as I ran out of editing time) If you have access to the formulas, something like =IFNA(XLOOKUP(P1#,A1#,B1#),Q1#) will probably be faster than anything VBA can do. For the same amo …
Greedo's user avatar
  • 2,595
5 votes
Accepted

Collecting all instances of an Office application (Excel, PowerPoint, Word)

Public Declare PtrSafe Function AccessibleObjectFromWindow Lib "oleacc" (ByVal hwnd As LongPtr, ByVal dwId As LongPtr, ByRef riid As Any, ByRef ppvObject As Object) As LongPtr Public Declare PtrSafe …
Greedo's user avatar
  • 2,595
4 votes
Accepted

Managing Excel Tables (ListObjects) with OOP Approach

On the whole nice work! This is actually a problem I've looked at in the past, and as a result I'd like to review the approach you've taken and the API/ way users can interact with your code. As I …
Greedo's user avatar
  • 2,595
5 votes
Accepted

2048 Game Implementation with Excel VBA

Some quick feedback because I think you can make some small changes to really improve the readability of your code. If you decide to make some of them you can then post a new question with updated cod …
Greedo's user avatar
  • 2,595
1 vote
Accepted

Update an Excel master workbook with values from new workbook

Refresh using the refresh all command in Excel. … Built into Excel so no added dependencies easier to maintain and distribute It is possible to pass params like filepaths, column names etc from VBA to PowerQuery if you want interactivity. …
Greedo's user avatar
  • 2,595
3 votes

concatenate values and delete the remaining rows using arrays

As mentioned, in Excel 2016 you should have access to the Power Query Editor through Data tab -> From Table/Range Then combining the text as you have done and loading to a new table should be easy - this … Optional - You can use the dropdown under the save icon to Close and Load To a different location, e.g. a table next to the source data Justification Like VBA It is built into Excel and the powerquery …
Greedo's user avatar
  • 2,595
3 votes

Safe Windows API Timers for Excel

Too long for a comment on @TinMan's answer s = s & "Public Sub Init(ByRef hWnd As LongPtr _" & n You should just have standard modules containing your "Remote Code" Then in your main workbook do s …
Greedo's user avatar
  • 2,595
1 vote

Sub that calls itself when its parent Workbook is closed

- Setting up real, stable asynchronous callbacks with WinAPI Timers in VBA These can be used to call a method which may be: Stopped with the stop button Disabled when Excel closes Even stopped with the … But it's a bit more overhead (which may or may not be an issue for you) and Excel specific IIUC and it sounds like you want host-agnostic code. …
Greedo's user avatar
  • 2,595
2 votes
Accepted

VBA introspection library for SQLite

Micro-review: '@IgnoreModule ProcedureNotUsed I used to sprinkle this around too, however there are a few reasons not to use it: It indicates your integration tests - if held in the same project fil …
Greedo's user avatar
  • 2,595