Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [excel]

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

1
vote
1answer
47 views

Retrieve data from table with criteria

I have to create a custom table (like a pivot table), where users can find immediately the total of items, and when clicking on data, get the db page correctly ...
1
vote
1answer
62 views

Matching huge data set of business data

I am pretty knew to the VBA world but I am really eager to improve my skills. I have a case where I would like to match cancellation with new business to see what we get back from our dropped business ...
0
votes
2answers
35 views

Speed up array loop vba Excel

I've got here from stackoverflow I have a table with this data: I have this code: ...
0
votes
0answers
14 views

Excel VBA wrap text, fit headers, hide empty rows, create spaces

I have very long code for my document to go through each sheet and do several tasks before I export each sheet to PDF. This is the small part of code but I have the same tasks for at least 3 sheets of ...
3
votes
0answers
74 views

Excel VBA to download from IE Database Stops Responding

first time using Code Review, although I have been active on StackOverflow, hope I'm in the right place. I am putting together Excel VBA code that using information from various columns on a ...
1
vote
1answer
36 views

Excel VBA speed up code to hide rows/delete color

I am using following code to delete color and hide rows that include several criteria before exporting sheets to pdf's. Is there any way to speed up this process as it is taking quite a lot of time to ...
0
votes
1answer
39 views

Reading a checklist with multiple sections from an Excel sheet into a JS object [closed]

I have written JS functions to convert an Excel sheet into a JS object. The structure of Excel sheet will look like this for the Single section, there can be multiple sections can have more than 25 ...
1
vote
1answer
21 views

Combine contiguous spreadsheet cell references into larger ranges

For a hobby project, I am using openpyxl to export Excel workbooks as JSON. Part of this involves identifying the formatting applied to cells, and serializing this information (provided the format is ...
1
vote
0answers
48 views

Is it always faster to rewrite a workbook function and store it in the module as a UDF [closed]

I was looking at this answer in SO and I was wondering if it would be faster to write the code for the CountIF function. I imagine it would look something like this:...
2
votes
0answers
75 views

Use arrays to perform 'VLookUp' type activity between workbooks

Background I have the below UDF that opens a workbook (this workbook has extracted data from a queue within another app). I get the used range from this workbook and assign it to an array (...
3
votes
1answer
154 views

Error-Handling Class and Logging for VBA

I've been reusing an error class in Excel VBA projects for a few years now and I'd like to see if there are ways to improve it. Any suggestions for style, code, etc. are all welcome. The 2 ...
-1
votes
0answers
17 views

Simple website table reader and write to Excel file program

i have write a simple program that can read a table from Wikipedia which is in Malaysian language and write the captured data to Excel file (.xlsx format). I think the table in the website will not ...
4
votes
0answers
58 views

So what if the “View” in an MVC isn't a Userform, but is the Worksheet?

So I've been following the discussions around VBA as an OOP language and the applicability of various design patterns, such as MVP or MVC. Excellent postings on these topics are extremely informative ...
3
votes
0answers
50 views

Responding to Events of Dynamically added Controls

I was asked for an example of a class to wrap dynamically added controls as I suggested in this Answer. Although it is out of the context of a Code Review, I thought that it would make an interesting ...
1
vote
1answer
49 views

Loop through different controls and enabled the state of the whole group VBA

I got the below code that is looping through all controls and changing the state in a after update event and enables new row for user to use. Everything works fine but i'm just wondering whether there ...
7
votes
0answers
108 views

Web Battleship -The Unofficial Battleship UI

I've written my own UI for Mathieu Guindon's VBA Battleship (Battleship UI: GameSheet) which uses a webpage in a WebBrowser control for the View. Webform: Userform ...
4
votes
2answers
126 views

Space Invader Style Game - Model / Presenter Decoupled From View - Functional Again Too

Thank you for your patience. The game is fully functional again! I have tried to incorporate all the advice I have received so far. Thank you for taking the time to review and comment. I have now ...
1
vote
1answer
54 views

Space Invader game written In VBA, 3rd iteration [closed]

Here is a link to the workbook, classes, modules and forms: https://github.com/Evanml2030/SpaceInvader/tree/master Positive: I have decoupled the view from the control / presenter. I have ...
0
votes
0answers
20 views

Reading an Excel sheet in PANDAS and appending to cells

Please check my code below for any tweaks that can make the output cleaner or make the function run faster. ...
1
vote
1answer
65 views

User form that searches a spreadsheet

I have this userform that looks up into a sheet. The problem is that when there are a lot of rows to look up it takes too long to execute (for example 100 thousand rows). Is it possible to reduce the ...
2
votes
2answers
108 views

Index Match implementation

The code below takes header variables, retrieves the column index, and then, using an Index/Match function, returns data from a matching account number. The reason it is written this way is because I ...
1
vote
1answer
38 views

Sending data from sheet to other sheet in Excel (from a dispatch note to some records)

I have this code to save data into some records. It is a little slow, so how can I make it faster? To the first record (sheet MOV MERCADERIA) it copies 23 columns ...
3
votes
2answers
123 views

SpaceInvaders Second Iteration - Fully Functional - Next Up New Presenter Class

Going to take a look at Rasta's comment below tonight and just realized I am using byref to pass everything again - DUHOH - Old habits die hard I have revamped with some of Comintern's improvements ...
2
votes
2answers
96 views

Automating the creation of a weekly schedule

I'm trying to build an Excel workbook to automate and aid in the creation of a weekly work schedule. My current workbook is functional, but it's slow - especially on one task where I have a list of ...
7
votes
1answer
226 views

Space Invader Style Game Written In VBA

EDIT: Link to the github, https://github.com/Evanml2030/SpaceInvader/tree/master EDIT: SpaceInvaders Second Iteration - Fully Functional - Next Up New Presenter Class ^ a link to second iteration. ...
8
votes
2answers
163 views

Battleship UI: GameSheet

In the previous post I presented the MVC architecture, but all we saw of the View was the pretty bits. From the outside everything looks innocently pretty: The guts of the worksheet's code-behind is ...
2
votes
0answers
62 views

Excel for travel expenses

Every Month I need to make an excel sheet with travel expenses, since this is a tedious task I decided to make a little python script to do this work for me. Everything works correctly, but any ...
1
vote
1answer
42 views

Copying data from various sources into a master list

I am working on a Master List, where I am copying data from various sources for each month into the columns Z, AC, AF, AI etc. (always separated by 2 columns). Then I copy that cell all the way down ...
1
vote
0answers
37 views

Insert Emojis Into Outlook Email With VBA Application (For those of us who cant use add-ins)

I cannot use add ins here so I set out to create an excel application that could get the job done. I suppose that I could easily transport this into outlook? Basically I want to click one of the ...
1
vote
1answer
34 views

Function to get constants of range

The following small function receives a range and returns it with only the cells that contain constants or Nothing if there's none. ...
1
vote
1answer
85 views

VBA Script to Remove Duplicates

I'm curious if there's any way I can substantially improve its speed (it runs through >200k rows). I think I'll most likely need this once, so please bear with me since it probably looks terrible. ...
0
votes
1answer
40 views

Copying ranges from multiple Excel sheets into a main sheet

I have a VBA code which copies same data from Multiple sheet and then paste it in "Main" Sheet. It then auto fills the blank cells for values from above and then it delete all the rows Where H:H is ...
3
votes
1answer
95 views

Running SQL Queries On A Worksheet (With Set Of Random Numbers Between 1-20 Filling Column A) Handled As An ADO

INTRO I am using an Excel worksheet as my "database." No headers so [F1] is assigned to column one by default. I filled the entire column, all 1,048,576 cells with ...
2
votes
1answer
30 views

Compensation Year-End Planning VBA Script

I have a pre-planning file for year-end review that does a lot of index/match formulas and IF statement formulas based on certain parameters when referencing ...
2
votes
2answers
52 views

Conditional highlighting (Font size colour, size and Bold) using VBA

Note: Question originally asked in SO. Objective of Code In my worksheet I have several columns that need to be compared to other columns. None of these column pairs are contiguous, so it can be ...
0
votes
1answer
62 views

Class Module of Table properties, Record Table HeaderName and Column number to dictionary

This code creates a class module that record headers in to a dictionary which then allows for copy and paste data from another file where by the headers match. This helps to create a more dynamic ...
-1
votes
1answer
10 views

How do I increase my VBA macro speed?

This is my VBA code. It's actually adding COUNTIF value to the next sheet of columns. when I'm running this it will take at least 7 minutes, how to decrease that time? ...
6
votes
1answer
146 views

Sudoku-lite challenge

You can find the problem here. The example: Column A, B, and C are each 3 and together equal 9: ...
2
votes
1answer
65 views

Executing arbitrary SQL statements using VBA in Excel

I built a workbook to help me extract data from a MSSQL database into Excel. I realize that this is fairly easy to do with Microsoft SQL Server Management Studio, but I can't easily get that installed ...
4
votes
2answers
69 views

Macro to convert an indented hierarchy to a database format

Our business intelligence suite outputs data as an indented hierarchy, as below: ...
0
votes
1answer
93 views

Generating output comment for 70000 rows

For traversing 70,000 rows (using a for loop), my macro is taking a lot of time to give output comment as per various conditions (...
3
votes
1answer
92 views

Export to Excel From DB is too slow

My function works pretty slowly with big results from the db (420000 records and growing). Can some one give me any proposal to make it faster? ...
0
votes
1answer
38 views

Pasting from another workbook

I have a macro comprised of this and similar Subs. They work, but I feel like it's slowing it down. Two workbooks are open, and various ranges are copied from one that is hidden (wbSource) and pasted ...
4
votes
2answers
66 views

Importing files into Excel

Any tips to reduce lines, improve speed, or any cool thing, are welcome. I have been using this for years and I just realized, why not improve ...? ...
1
vote
1answer
56 views

Read unstructured Excel payslip and export to structured Excel table

I've not used this site before, I would like to get opinions on the code I've completed for my first 'program' in Python. I would like to understand how 'good' it is and where it can be improved, ...
4
votes
2answers
388 views

Dijkstra's algorithm implemented in Excel VBA

I wanted to implement Dijkstra's Algorithm in an Excel VBA Add-In and built it to be used as follows: Define a list of paths with distances between points. This list needs to contain 3 headings that ...
-1
votes
1answer
43 views

Macro to clear cells that do not appear in a master list

The macro below clears cells that do not match any cell in comparison to a range (a master list). It works on small file but is too slow to work for files with large ranges. ...
0
votes
1answer
126 views

Macro that combines data from multiple worksheets

I have created a macro to combine data from different excel sheets into one final report. As it is obvious from the code provided below, there are very clear steps in the code. The code has no issues (...
1
vote
2answers
156 views

Matching a checkbox caption to a cell's value

There are 30 checkboxes that need to have their caption compared to a cell value. The basic code is repeated 30 times for 30 different check boxes The only Lines that Change per CheckBox are the ...