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.

0
votes
0answers
12 views

Getting totals of each primary key by matching it with another worksheet with a many relationship

I have already resolved several others using Application.Index with Application.WorksheetFunction.Match and reduced time to ...
-1
votes
0answers
27 views

Is there a more elegant way to put this series of filters?

I have a ton of code blocks for autofiltering a report and applying a value to the SpecialCells(xlCellTypeVisible) range. It does the job, also quickly, but I just ...
-4
votes
0answers
22 views

For each loop not making changes to all sheets? [on hold]

I am learning excel vba through an online course. One of the exercises requires that you you find and replace text in a selected cell for all sheets. Here is my attempt at a solution using a For ...
1
vote
0answers
20 views

VBA Strange Email Hangup [closed]

My VBA Code works on one Workbook but not on the other. In Summary the code: Produces the needed end result in both But it lags about a minute in one long But is otherwise identical Sheet names ...
3
votes
1answer
51 views

Excel VBA: Implementing Box Muller, Zigurrat and Ratio of Uniforms Algorithm

This is a very specific question mixing up stochastic knowledge and VBA skills. So very exciting! I'm trying to compare several methods for generating standard, normally distributed numbers given a ...
2
votes
2answers
82 views

Macro to distribute data within the sheets based on tabs name

I wrote a macro which works, but given the large amount of data, it takes a lot of time. I wonder if there is a way to speed it up. Here is a summary of what it does: In "Summary (All)" tab I have ...
2
votes
1answer
86 views

Data scraping from Internet with Excel-VBA

I have built an Excel application, which gets all the titles of books from Amazon.com, which it is asked to do and scrapes the following data out of them: Book Title Author Price What do you need to ...
1
vote
2answers
79 views

Tab month tracker

The code works; the problem is in the processing. I feel like the code can further improved and I believe the answer is Arrays however, my knowledge is very limited. Here, I loop through ~ 1000 ...
4
votes
1answer
68 views

Migrating data from multiple spreadsheets to multiple text files

This is like the reverse functionality of Text file to spreadsheet. One or multiple .xlsx files in the path of the script get opened and the content is split into ...
3
votes
0answers
51 views

Retrieving data in multiple formats from Excel with Python

Scenario: I have an excel file that contains some data in the first sheet. That data can be simple strings on a cell or CheckBoxes (marked or not). Data example: ...
9
votes
2answers
321 views

Text file to spreadsheet

Lets say you have several .txt files in a folder and want to merge all text files into a single Excel document: A.txt ...
5
votes
2answers
59 views

Invert rows and columns in an Excel file

Annother little excercise with openpyxl: Say you have a Excel file like this: The Goal is to make make it look like this: My code to acomplish this: inversion.py ...
2
votes
1answer
26 views

Excel blank row inserter

I wrote a program as an excercise, to check the openpyxl module, which inserts blank rows into an excel file. See the docstring in the code for more description. I ...
2
votes
0answers
24 views

VSTO add-in for Excel to solve systems of linear equations

This code is part of a VSTO add-in for Excel. As the title states it solves systems of linear equations by allowing the user to select the appropriate ranges. The code works and covers most issues I ...
2
votes
2answers
40 views

Excel Multiplication Table Maker

I did the following exercise from here to try out the openpyxl module for generating excel files: Create a program that takes a number N from the command line and creates an NxN multiplication ...
-1
votes
2answers
70 views

Excel Range less clumsy [closed]

As an old dog (age 73) learning new (Excel VBA) tricks, I am reasonably happy with putting together the code below. But I think it could be cleaner. How would you have coded it? ...
3
votes
1answer
44 views

Superscript all numeric characters after ^ in an excel cell

I have material property entries in a cell those look something like this: cell.value="O2 Permeability [cm^3/m^2]" The goal ...
4
votes
5answers
96 views

Function for minimum non-zero with multiple additional conditions

This function works, but seems unnecessarily complicated. I would like to simplify but performance is vital as it is called many times. The conditions are: 1) If either value is negative, then ...
3
votes
0answers
64 views

Document “Search Engine” in Excel

I've created a somewhat "Brute-force search engine" based on a document's filename, as well as an additional keyword that describes the said document. I had to make one as my company's resources are a ...
8
votes
1answer
252 views

A simple ascii progress bar

I've been wanting to experiment with a bit of error handling and robustness to make my code more user friendly. I was inspired by this answer on UX to try and add a progress bar to a button - but was ...
0
votes
2answers
51 views

Searching multiple Excel sheets for the cheapest item

I am creating an estimation tool, where users can input part numbers and quantities, and the tool will output the lowest cost for that part number based on searches through multiple databases. I ...
2
votes
1answer
117 views

OOP Cross Sum Solver

Not satisfied with the Brute Force Solver that I wrote for All possible combinations of 1 to 9 in the same cells without repetition, I created an OOP Cross Sum Solver. As expected my OOP Solver ...
1
vote
0answers
27 views

Build routing network from its nodes

I have this code so far: Input A dictionary, which has Excel Data ...
2
votes
3answers
65 views

“Pivoting” data with VBA

I've attempted to erite some VBA for this this question. The output is OK but the code is not very elegant. I'm happy-ish with creating unique list of names and certificates, but the rest seems ...
1
vote
0answers
26 views

Open/Close several workbooks to sort data

I have written a macro to process all excel files within a user-chosen folder and then save the processed files as a new file in a new folder ("FINAL"). The macro I have works, but is slow. Do you ...
3
votes
0answers
54 views

CheckedRange Class

This class is used to make Excel Cells behave like Checkboxes. Clicking the cell raises a CheckedRange_Clicked(Target as Range) event and toggles it's value ...
2
votes
1answer
68 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
78 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
61 views

Speed up array loop vba Excel

I've got here from stackoverflow I have a table with this data: I have this code: ...
3
votes
0answers
92 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
50 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 ...
1
vote
1answer
22 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
53 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
76 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
256 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 ...
4
votes
0answers
72 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
109 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
66 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
128 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
148 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
56 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 ...
1
vote
1answer
70 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
113 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
42 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
131 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
98 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
288 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
178 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
65 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
46 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 ...