Questions tagged [excel]

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

Filter by
Sorted by
Tagged with
3
votes
1answer
66 views

Checking if date falls within a date range then write the date range to a cell

I want to simplify some code I have written but not sure how to go about doing it. When my workbook opens it checks the current date and compares it to dates I have on a sheet. If the current date is &...
0
votes
1answer
30 views

Macro which performs a series of operations on a given set of data

This macro calculates some basic figures from a given set of data. But it runs very slow probably due to me referencing the sheet again and again. Does anyone have a better idea on how to optimize ...
2
votes
0answers
71 views

Evaluate performance of DLL calls from VBA

While playing with a VBA project involving Windows APIs, I have noticed some odd behavior: API calls under Excel 2016/VBA7/x64 appeared to be much slower than under Excel 2002/VBA6/x32. Since I ...
4
votes
2answers
1k views

VLOOKUP Macro to reformat data between sheets preserving the connection to the source

Hello I'm relatively new to VBA and I have this macro to VLookup information into corresponding cells in the sheet that works, the issue is that it depends on a For Loop to iterate through 10s of ...
3
votes
1answer
52 views

Transposing an Excel sheet with pandas adding additional information for a different readability - Using Fake Pizzeria Data

The goal is to transpose the excel file that comes in the following form into this The code I created works properly, but I think it can be improved. I would also like to avoid using ...
2
votes
1answer
82 views

Reading excel files and save data into database

In my .net core console application, I am reading multiple excel files and bulk copy data into a database table. It is working as it is expected, I wonder if there are any improvements to make it ...
1
vote
2answers
61 views

Copy the last 125 rows from a selected excel file and paste into the used one

My task was to get the last 125 rows from an excel workbook. The rows are started from the 17th row and it goes until it can. Here's my code: ...
2
votes
0answers
59 views

My first vba-selenium code

I have been obtaining financial information on an annuity I have which is invested in multiple funds which are proprietary to the insurance company. The asset value is not available other than on ...
2
votes
2answers
66 views

Comparing Multiple Columns to Remove Duplicates

This code compares data from two spreadsheets generated from our clinic's software. The goal is to eliminate all the rows from the PaymentsSheet (our most recent ...
3
votes
1answer
98 views

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

A project of mine required me to search for certain workbooks in open instances of Excel. I found this article Code to get Excel, Word, PowerPoint from window handle which returns the applications ...
1
vote
1answer
91 views

Fancy new LAMBDA functions with variable number of arguments to mimic native methods - no VBA

The TEXTJOIN function has a really nice interface: =TEXTJOIN(delimiter, ignore_empty, text1, [text2], …, [text252]) ... where ...
3
votes
2answers
121 views

Sorting worksheet by a given column

My code runs exactly as it should. However, I would like to make it run a bit faster. I have tried defining some variables as Long to run it faster but it is still ...
0
votes
0answers
36 views

Creating Pivot Table taking time at average vales

I have created a VBA macro to create a pivot table automatically. But taking 15 to 20 minutes of time to complete the macro. Especially at the point of below code taking half of the time. Review Code ...
2
votes
2answers
113 views

Forms to enter trading information

My project has grown for a year and now comprises of 19 standard modules, 7 class modules 11 forms. Some of the forms appear to freeze when called but, in fact, they are just slow to respond, taking a ...
-3
votes
1answer
61 views

How to reduce the number of loops? [closed]

The following code works perfectly. It just works very slowly. Is there any way to speed up/optimize this code? I think its the amount of loops but I am unable to figure out how to reduce the number ...
0
votes
0answers
119 views

NIQE score and PIQE score calculation for batch of images in Matlab

There are some image quality assessment methods for "no-reference" image quality analysis. Here, I am attempting to calculate the NIQE score and PIQE score for batch of images in Matlab. The ...
1
vote
1answer
124 views

Simple encryption function for Excel sheets

I'm using this function to read a certain set of data in a hidden Sheet1 to do encryption based on the selection by the user. It's all working fine, but its kinda ...
2
votes
0answers
79 views

How to speed up the VBA scraping process

I want to scrape 25000 addresses using Column A cell values as search strings. I'm using the following code, it is working fine but it's too slow to extract 25000 results. Is there any way to speed up ...
3
votes
2answers
108 views

Comparing Three Columns and Copy Pasting data

I am using below code which is comparing three columns values and copy pasting the 4th column data into other column. My code is working fine but it is slow to perform the processing and takes much ...
1
vote
1answer
51 views

ContactEditor - Excel VBA db app: Storage Library and MVP

In the previous post, I presented my Storage Library. Here, I would like to focus on the integration of the library with the MVP component. Functional class mapping First of all, the figure shows a ...
1
vote
0answers
61 views

ContactEditor - Excel VBA db app: Storage Library

ContactEditor uses Excel VBA as a prototyping platform for a personal information manager combining the "Model, View, Presenter" (MVP) pattern and a persistent storage manager. Fig. 1. Data ...
3
votes
1answer
89 views

VBA introspection library for SQLite

SQLiteDB VBA Library is a set of VBA helper functions for the SQLite engine. The primary motivation behind this project is to provide convenient access to extended introspection features. Because of ...
0
votes
0answers
46 views

Fastest Way To Compare 2 Excel Worksheets And Output Differences To 3rd Worksheet

I have a workbook that loads in the results of an SQL query into two worksheets called Old and New. The New worksheet is then edited by an end user. Rows can be inserted, deleted and values changed. ...
2
votes
1answer
90 views

Daily Fantasy (DFS) Lineup Generator in Excel VBA

I have a macro I have been using to generate daily fantasy (dfs) lineups for soccer matches. I would like to know where I can speed up my code so I can run more simulations. Briefly, I have a ...
2
votes
3answers
91 views

VBA Vlookup to work faster

I have a code in vba that works well but it is slow so I am looking for a better solution to this code. If there is any one who could help me I would be grateful! ...
4
votes
3answers
193 views

Excel VBA Nested Loop Alternative

I am not an advanced user of Excel and am VERY new to VBA. My only programming experience is 2 C# classes in college. That being said, go easy on me ;) I am working on a team that audits military ...
6
votes
2answers
144 views

VBA - Excel add in Convert number to Text currency

No problem yet with the code. Here is a function that can be saved as add in and used as UDF in Microsoft excel to convert a number to text. For example, 4556.45 to ...
1
vote
0answers
21 views

Inserting captions under photographs in word based on entries in excel spreadsheet

I have a macro written in word for transferring captions written in excel to a corresponding photograph in a word document. At the moment it runs however I am finding that it slows down over time the ...
0
votes
2answers
74 views

Improving Speed of VBA Code - Copy/paste two sets of variable, Excel does a calculation, returns a value then copy/paste the output value

I am attaching the code here. I am very new to VBA and trying to do a complex calculation using Macro. Please help me improve the speed of the attached code. The code works fine and produces the end ...
5
votes
1answer
162 views

Can my excel to excel data copy code with some with data manipulation be more efficient?

I'm trying to copy data from a worksheet to another worksheet with some modifications made on the fly. Here are the details of the stuff I'm trying to do: Open the file from where I'm going to copy ...
1
vote
0answers
81 views

Replace2 using start and end rather than length

If you already know the start and ending character positions of text you want to replace, this bypasses the need to calculate the length. It just helps eliminate a step by not requiring you to ...
0
votes
1answer
108 views

Improvement for generating excel with many data

I have the problem, my methods become slower and slower after many data. My methods can generate 100 rows with 20 columns around 1-3s, but after that my methods become slower and slower. And for ...
5
votes
1answer
115 views

Copy Columns Forward Macro: From Procedural to OOP

Background: I had created a macro few years ago and when I was reviewing this now, it was hard to understand. I recently went through all the articles from ...
3
votes
2answers
161 views

How to iterate through data and write to excel file quicker with C# and openXML

I have a pretty simple method that grabs data from an sql query and then puts it inside of a list and finally iterates through two for each loops onto an excel file. It works fine with small amounts ...
2
votes
1answer
86 views

Best way to copy data to a new sheet and reorganize it (VBA)

I'm writing a VBA program which copies and organizes data from one master sheet into numerous other sheets. One of the recipient sheets unifies all the data from the master sheet which holds the same ...
2
votes
0answers
30 views

Speeding up my Python code for reading from Excel, performing geospatial analysis and writing to Excel files

I have written a Python snippet that reads lat and long stored in an Excel file. Converts them to a point which is then used to perform multiple geospatial analysis including buffer, intersection, and ...
1
vote
0answers
32 views

Appending and Prepending Text to All Selected Cells

The purpose of this code is apply a function to each selected cell. This works on contiguous and non-contiguous selections. function assignText(value, prepend) Returns a closure that encapsulates the ...
3
votes
1answer
71 views

Aggregating hourly location data into daily sublocation data for many columns

I start with an hourly table that has around 40 of items (example: bread, barley, bagels, beef, chicken). The purpose of my code is to aggregate this hourly table's numbers to daily numbers but broken ...
4
votes
3answers
130 views

Excel VBA code midStr() function using left and right position instead of length used with mid()

In the early days of Basic (1970's when i started coding) the midStr() function used left and right positions directly rather than left and length we now use with mid(). I always found it more ...
4
votes
2answers
277 views

2048 Game Implementation with Excel VBA

I am trying to implement the game 2048 in Excel VBA. The each TRUE / FALSE Boolean value in row 2, 4, 6 and 8 are used for determining the data of each cell in row 1, 3, 5 and 7 is 0 or not. The ...
1
vote
0answers
47 views

Excel datamapper with fluent config

Example of usage with header: ...
1
vote
1answer
97 views

VBA Excel substitute function for multiple conditions at once

I use the SUBSTITUTE() function in my VBA code. In Excel formula, we can nest it as shown in the thread below: https://stackoverflow.com/questions/22313965/how-can-i-combine-multiple-nested-substitute-...
3
votes
1answer
82 views

Create Table After Deleting Rows Before Desired Range and Filter to Delete All Other Unnecessary Rows

The code below first searches for the first searchText and deletes all rows that precede it to establish a range for a table object. Once the table object is ...
6
votes
2answers
202 views

Copy a contiguous sub-column of cells

This code searches for the word "Disbursements" and copies all of the rows with data below it, including the row with the specified word. After the rows are copied to a new sheet, the ...
-1
votes
1answer
69 views

Is it possible to make this macro faster? Copy and paste when condition is met [closed]

I have a problem with macro running too slow and I guess it is just because of lack of my knowledge. I have a macro that is copying data from "database" and paste it to another sheet. Macro ...
4
votes
2answers
212 views

Excel VBA Code for Imperial Length Measure Conversion and Formatting Yards Feet and Inches for English and Spanish

STR2INCHES is an Excel VBA Function that will convert string text for Imperial length measurements to a decimal number of Inches. It handles both English and Spanish words, abbreviations and symbols ...
0
votes
0answers
31 views

Calculating total payment value between date periods with different pay frequencies

For this problem I originally wrote some VBA code which worked perfectly. I've since been tasked with integrating the results it produces with the spreadsheets data model so thought a PowerQuery would ...
5
votes
2answers
545 views

excel-vba function to filter an array and return an array

I have a function to filter a 2-d array. It works. But I am not sure if the following mechanism is a sensible concept. The idea is: loop over the input array which is received as ...
3
votes
1answer
275 views

Recursive LAMBDA() function to create a formula that adds internal separators to a string in Excel

I have created a named function with signature PadInternal(base, width, paddingStr) where: base is a string you want to add ...
0
votes
0answers
97 views

Performance issue “not enough memory” Macro vba Excel - Parsing data

I have built some code that should parse the data according to a unique value and then create a new Worksheet for each unique value. My initial table has 10 Columns and around 25K rows. The code works ...

1
2 3 4 5
22