Stack Exchange Network

Stack Exchange network consists of 175 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
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [excel]

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

0
votes
0answers
29 views

Looping through table rows and replacing key terms in a word template

Here is my code for a sub which does the following: read header of a table into an array reads first row of said table into a 2nd array loops through the first array and replaces the marked ...
1
vote
1answer
44 views

Improving speed of data clean process in vba

My code does exactly what I want it to. However, being relatively new to VBA, I feel it could be a lot more efficient - namely I think I have overused loops and worksheet functions which are slowing ...
-1
votes
0answers
21 views

VBA Outlook/Excel Object model [on hold]

While coding, i've noticed a quite funny thing which, unfortunately, I wasn't able to google. That's why raising it here -- maybe you can help me. Below code, copied from MSDocs works fine. ...
1
vote
0answers
32 views

Running an UPDATE SQL QUERY within VBA using DAO

I have a macro in Excel that updates a recordset using WHERE a primary key in MS Access matches a primary key in a UserForm label value. The macro is called from a ...
2
votes
1answer
44 views

VBA - If value in sheet1 found in sheet2, then delete data from sheet2

I have 2 sheets setup: Exclusions and Issues Issues has a list of CASE ID's and Columns that list the "Issue" Exclusions will be populated with CASE ID's that are to be excluded (and removed) from ...
1
vote
1answer
58 views

Merging records from one spreadsheet into another

I have created the code below that compare two spreadsheets . It initially compares the range of value from sheet1 ("Status") to sheet2 ("Interface") . Whenever a range matches with the ranges present ...
3
votes
1answer
28 views

Python: Combining Two Rows with Pandas read_excel

I am reading an Excel file using Pandas and I feel like there has to be a better way to handle the way I create column names. This is something like the Excel file I'm reading: ...
3
votes
0answers
47 views

Converting VBA Add-In to C# VSTO. Code following button click event

This is my first program with C# and VS and was originally a VBA Add-In I wrote. I have embarked on this as a learning exercise. The code does work and provides the desired output in a new workbook. ...
1
vote
0answers
53 views

Copy and Transpose Macro VBA

I have a macro where I open several text files to copy and transpose several columns into my worksheet. As it is now this actually works. I am right now opening the text file, copying a column, going ...
-1
votes
1answer
37 views

How to return cell values of a non-sequential set of cells from multiple closed spreadsheets? Code condensing/simplification [closed]

The code below does what I need it too but it is ugly and clunky. If I could set the list of cells I want to retreive data from as an array that is declared somewhere, then I could loop through that ...
0
votes
0answers
81 views

VBA processing multiple files

...
7
votes
3answers
142 views

Speed up VBA with 138k rows and ~330 sheet creation

I have a VBA script that does the following and I am trying to see if I can have it perform faster than 44 seconds: start with ~138k rows of data on sheets("Data") concatenate each cell in the row ...
2
votes
0answers
44 views

VBA Array Functions: insert element, remove element

An extension to array functions I am building for my snake game. This one allows you to remove / insert particular elements. API CALLS ...
2
votes
1answer
107 views

Sluggish Loop Transferring Dictionary Data to Spreadsheet

I've added a timer to my code and the bottleneck comes when I'm looping through 47 rows and inputting data from a dictionary that I previously loaded with values. Since i use these files for a lot of ...
3
votes
0answers
40 views

Stop flickering / refactor code for Excel ScreenUpdating false on Copy Paste to another worksheet [migrated]

I am beginner and still learn about programming MS Excel VBA macros. I need help from the community to solve my problem with macro code on excel. ...
1
vote
1answer
58 views

Loop whose endpoint (?) change during the loop [closed]

I have a loop which insert rows on specific cases. The loop goes through ~2000 rows and insert about 500. Due to the inserted rows it doesn't loop the full range I want. I have solved that problem by ...
2
votes
0answers
85 views

VBA array functions: push, pop, shift, unshift

I want to write my snake game procedurally, using as much windows call as I can so as to practice. Looking into GetAsyncKeyState to capture keyboard inputs and play sound functions. Also making a ...
-1
votes
1answer
45 views

Standardize and reduce repeating same procedures in my coding Excel VBA [closed]

I am aware that my VBA code can be improved.I would like to standardize and reduce repeating same procedures. Can I have some guide lines for this? Where to start? I would be glad to have some ...
2
votes
1answer
40 views

Python webscraper to get property info from Tripadvisor

I'm very much a beginner at programming, and hoping to get some advice! I'm having some trouble with a tripadvisor scraper being slow, and have identified the part of my code that is taking a while. ...
3
votes
1answer
56 views

Array that stores values from two ranges and compares if one cell is blank

This is my first Array in VBA for Excel, but I need some help to optimize the code and try to reduce the number of If statements. The long and short of the code is ...
1
vote
1answer
42 views

Vba to create a new column and insert array formula

My below code is the slowest sub in my workbook. I can't set it to put the Array in immediatley, because the mode is calculated incorrectly (calculates for just one ...
1
vote
1answer
87 views

Optimizing VBA Select Code

I'm trying to reword the code below to avoid using the Select and Selection terms. I tried to Range("S"...).Copy instead of .Select but that didn't work for some reason. Does anyone know a way I can ...
0
votes
0answers
49 views

Data Scraping Using VBA

I have below code, which fetch data from a Intranet. But its taking more time to fetch data.can someone help me to modify the code to increase the performance. Thanks In Advance Note-I haven't posted ...
5
votes
1answer
59 views

Define a range based on passed arguments

TL;DR I'm self teaching VBA, learning about functions and passing arguments from a subroutine into the function and want to know if my very basic function to define a range is optimal and follows ...
6
votes
1answer
107 views

Snake Game - within worksheet - cells as pixels

Since my rather mediocre attempt at making a Space Invaders game, I stumbled on a cache of Visual Basic for Applications games written by Japanese excel wizards. I have even seen someone create Zelda?!...
2
votes
2answers
70 views

Abstracting and unit testing lookups in Excel table

Background I have a vba solution that I use to ingest investment text reports and reformat them for analysis in Excel. It works, but the macros involve a lot of direct manipulation of Excel objects, ...
3
votes
0answers
49 views

Code runs slower when executed from ribbon compared to directly in module

We use third party addin that downloads market data from the internet into a workbook. The addin works with custom functions that begin with CompanyAddin. For instance, a formula in a cell could look ...
2
votes
0answers
117 views

Fixing Medical Claim Files through Text File Read/Write v2

This is another review on a program I've asked about before, with a different target in mind. Program Function As before, this program makes emergency changes to medical claim files, delivers all ...
3
votes
1answer
61 views

Cell Gradient Fill Macro

I have two functions here, each one displays the gradient slightly differently with up to 5 gradients. Function 1: ...
1
vote
1answer
57 views

ImportExcel for Dataset with Multiple tables

I need to be able to create an Excel document with multiple tabs for a dataset with multiple results\data tables. I have a stored procedure with 3 selects in them, fairly simple ones pulling data from ...
7
votes
0answers
93 views

Free body diagram generator using MVP for VBA

Based on my understanding of Model View Presenter (MVP) I have it generate a diagram. Is this a correct implementation of MVP? What deficiencies are there in my implementation? UI Generated diagram ...
0
votes
1answer
43 views

Merge info from two sheets info one list

I've created a code that works but takes time to run. Is there any way of making this code work in a more efficient way? In short terms I want to: make a new copy of sheet 1 and 2 Select the row ...
0
votes
0answers
31 views

Weekly TextToColumns formatting, sorting, refreshing all pivots then copy/pasting specific rows to the bottoms of a series of specific columns

Firstly, this code works, but it is long and needlessly inefficient. I want to clean up the code. I am working on a spreadsheet (this code is part of) that I import two other weekly updated ...
1
vote
1answer
36 views

Shortening Custom Document Property additions [closed]

Context I have blocks of if statements that check if a certain cell contains a particular string and to add to the counter of the respective custom property. Originally I was using global variables, ...
7
votes
3answers
174 views

Standardized and automated Class block generation for VBA

I recently developed a tool which automaticaly generates VBA code in order to smoothly create class templates. I wanted to share this tool with the community, hopefully this is the right place. The ...
0
votes
0answers
85 views

HttpListener Server for building reports in Excel

I have coded a web-based Excel file builder and sender, that serves the file over Http(example links in code). I would like to see improvements and any suggestions you might have. ...
1
vote
1answer
74 views

Generating a data validation list and sorting it alphabetically

The following code clears 11 columns that contain lists that are used for data validation on another worksheet. This list is constantly changing due to records being added/removed from the source data....
2
votes
1answer
108 views

Making a catalog of pictures

Is there a way to make this code run faster? I have over 6000 pictures in .jpg optimized to a maximum of 40 kB. It starts quickly but after like 2000 pictures it runs way slower. The final .xlsm file ...
2
votes
3answers
86 views

VBA code slowing workbook

I have a spreadsheet with five sheets all of which run the same VBA code; everything was good when it was on just the one sheet, but now it's running on all five sheets Excel is extremely slow to load ...
1
vote
1answer
37 views

Excel custom cell style remover

When you only want a couple styles from a workbook but not all of them it's easier to merge styles then remove those you don't want. How can I improve the form or the backing code? Userform with ...
3
votes
4answers
160 views

Fastest method of getting the bounding box containing all value ranges

I want to find the fastest method of getting the range object which contains all values in a worksheet, while only containing 1 area. Traditionally one might think this is what ...
0
votes
0answers
37 views

Use PowerShell to create hyperlinks in Excel to local images

I'm rather new to PowerShell so I could use some help with why my script is running so slow. It starts off just fine, and even the first 30 or so iterations of the for loop are zippy. But by the time ...
3
votes
1answer
41 views

Excel to CSV converter

To check out the cssv module i wrote a small programm which takes all xlsx files in a folder and converts them into csv files. Let me know what you would improve on this program. xlsx_tp_csv ...
0
votes
1answer
51 views

Excel sheets with employees and dates

I have more than 20 sheets in Excel and one main sheet (all programs with 200 names). Each sheet has a column with names and 24 months (Jan 18 to Dec 18, Jan 19 to Dec 20). Each sheet names is a ...
1
vote
1answer
49 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 ...
6
votes
1answer
82 views

Excel file format converter

I'm using C# .NET Core 2.1 and Excel lib DotnetCore.NPOI I'm converting xls file to xlsx by ...
3
votes
1answer
87 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
88 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
122 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
85 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 ...