Questions tagged [excel]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
34 views

Update cell format based on adjacent cell values

Trying to speed up this macro, it just loops through 'C-L" columns and changes the format based on adjacent cell values. ...
1 vote
0 answers
37 views

makes plots associated with selected utilities

This code is applied to a master workbook with tabs containing characteristic information e.g. "Reliability standards", "Targets" etc. about each utility. The utilities of interest ...
1 vote
2 answers
61 views

Copying formulae between sheets

I am currently running multiple macros on a large volume of files however watching it go through its processes today I realise one of my issue is that my loop runs through my workbooks 3 times instead ...
4 votes
2 answers
300 views

Loop between two Arrays and change values based on condition

Instead of using 45 IF conditions , I put my two ranges into variant arrays. Then I used the below code to loop between them and change values of the first array ...
  • 205
6 votes
1 answer
298 views

Fastest function to `Remove Duplicate Lines` per each cell

The below function is used to Remove Duplicate Lines per each cell. It works without problem, but it is slow with a range of only one column and 17k rows. Actually, ...
  • 205
1 vote
0 answers
30 views

A Type.FromText function in M for PowerQuery using Expression.Evaluate

The Solution I recently came across this solution here, for a Type.FromText() function in M for Power Query*. This solution allows a user to extract the actual <...
  • 279
9 votes
2 answers
605 views

Small datasheet code running super slow on Excel VBA

The code has been super useful with my work datasheets. They all have this pattern and the VBA code makes sure it all has the right format. Why is it so slow? Sometimes it takes 2~3 minutes to run a ...
-3 votes
1 answer
59 views

Transpose and Paste VBA [closed]

Currently from my sheet2, I wanted to copy the column C36-N36. However, each of these cells has one formula that is generated from the numbers within sheet2, i.e. C36 = A1+A2/2 something like this. ...
0 votes
0 answers
36 views

Export dataGridView to an Excel Worksheet in c#

I have a dataGridView in a WindowsForms. I also have a button to export this dataGridView to an Excel Worksheet. If the button will be clicked, the data in the dataGridView will be exported to a XLSX-...
  • 140
6 votes
1 answer
201 views

Filter Range VBA function for Excel

Premise I have written a function in VBA, called FILTER_RANGE(), which accepts a Range object and a filtration parameter. Unlike ...
  • 279
2 votes
1 answer
67 views

Gathering data from a file and analyzing it

Recently started learning python, and it's quite a difference coming from C and knowledge taught in CS1. Overall, I am trying to build a team building script for my summer side-project (probably will ...
2 votes
2 answers
147 views

VBA functions to calculate sun and moon positions

I have the following VBA code (across three modules) to make UDFs to calculate sun & moon position data. The issue I'm facing is that they are very slow to run as I have over 6000 rows (over 10 ...
  • 21
3 votes
1 answer
94 views

Add padding to top and bottom of cells

I have a column with variable length text in each of the cells. I have written some code to add padding to the top and bottom of the cells. While the code works well it becomes quite slow when the ...
  • 131
1 vote
0 answers
50 views

Extract, transform, and load Excel files

I am curious to know if there is a cleaner/better way to write this. Any suggestions would be greatly appreciated! I do ask some questions in comments within the code specific to certain functions/...
  • 11
2 votes
1 answer
61 views

Identify Anonymous orders in BOM list & update accordingly, execute time is taking very long

Right here, I'm trying to identify whether or not the demand order in my multi-level BOM list is made by an anonymous customer and then update accordingly. -In laymens term, I'm checking if an item ...
  • 55
2 votes
0 answers
130 views

Command line framework for VBA compiler app, written in twinBASIC :o

Ok compiler is a bit of a stretch... I'm working on a package manager for VBA code, written primarily in python. One fiddly step of the pipeline involves "compiling" packages; this is the ...
  • 2,210
0 votes
2 answers
105 views

VBA - Compare & Consolidate Dynamic Arrays

Background The CSV files being used can be 6+ mill records in size, using a small sample size to proof the methodology. Why are you doing this on excel? Access or SQL would be quicker My company has ...
  • 11
8 votes
0 answers
144 views

A VBA program to quantify the performance of code execution timers

Motivation I am interested in optimising the execution time of code with short (fast) execution times on the order of microseconds (µs), but that will be used with high frequency (e.g. like ...
  • 181
2 votes
1 answer
67 views

VBA, Data Split Into Two Rows, Convert To One Loop Optimization

I'm trying to convert a data set that is split into two rows into a single row. This was my solution. ...
2 votes
1 answer
206 views

Excel VBA to Fetch email addresses from inbox and sent items folders

I am using the following VBA to fetch multiple specified Email addresses from inbox and sent items folder also including cc and bcc for eg(gmail.com;yahoo.com) must return all mails having that domain ...
2 votes
0 answers
48 views

Python data entry into excel based on equality check with dataframe

My objective is to enter/type in values into Excel cells if the column names and indices match between Excel and dataframe. So, my code does the below Gets the ID values from the dataframe for each ...
  • 235
0 votes
0 answers
80 views

Load license plate data from Excel

The code below gets data from an Excel spreadsheet and returns some values; this can take up to 15 minutes because the Excel has more than 15 columns and an average of 20,000 rows. ...
  • 11
3 votes
1 answer
169 views

Automating shortages report from BOM list in excel but the total run time to output the report is quite slow. Using Excel 2010 - CLOSED

I MIGHT REWRITE THIS QUESTION IN A CLEARER WAY WITH SOME SAMPLES TOO AND POST IT AS ANOTHER SOON, AS NOW MY EXPLAINATION HERE IS QUITE HARD TO UNDERSTAND & MIGHT BE PHRASED WRONG. I do have ...
  • 55
0 votes
1 answer
63 views

importing excel data by matching and performing lookups

This code imports data from a separate sheet and matches it based on Column E's data, it does this for every cell then offsets to the next one (622*6) times. If there are any substitutions for vlookup ...
4 votes
2 answers
116 views

Scraping campsite availability from a webpage using vba with selenium

I wrote some code to extract the information from a table, but it takes an extremely long time. The table is in the format of a calendar. I need the information on an Excel sheet with column 1 as the ...
  • 41
5 votes
1 answer
212 views

Safe Windows API Timers for Excel

Motivation Windows API timers are notorious for crashing. I've been using them for years to workaround a nasty bug that makes User Defined Functions (UDFs) very slow in Excel when calculated in ...
3 votes
0 answers
70 views

Updating VBA code from a central repository in distributed Excel workbooks

I wrote this to help manage the code in a bunch of distributed workbooks. Maybe someday I will re-write this as an add-in, but for now, I just needed a way to manage the code without having to ...
  • 409
1 vote
0 answers
50 views

Get & change file names from folder

This was originally posted as a Stack Overflow answer. Objective Import all filenames from a folder & change the filename using a mapping table. Challenge As described in the original posting, ...
  • 11
0 votes
1 answer
73 views

Python - Efficiently pick random data from an array, generate random UUIDs and save it all in an Excel table

I wrote the following prototype: ...
  • 195
18 votes
0 answers
369 views

Progress Bar for Excel

Any future updates can be found at Excel-VBA-ProgressBar What I've been using so far For the last 6 years I've been using a progress form which I wrote in VBA using just Windows API calls. The code (...
0 votes
0 answers
49 views

Syncing Multiple PivotTable Slicers using VBA

I am extremely new to VBA code; however, I have found a resource online that has helped me sync my PivotTable Slicers in Excel. The code seems to work exactly how I want it, but it takes approximately ...
  • 1
4 votes
2 answers
124 views

User interface for a simple tool that generates Word documents from Excel data

This question provides the code behind the dialogs in the C# refactoring question. I'd like a review of this code as well. I'm not currently using databinding anywhere, and there is really only one ...
  • 19.4k
3 votes
3 answers
108 views

Follow Up: Refactored C# Tool to Generate MS Word Document Mailbox List From MS Excel

Background Some very good observations were made about my original code in the 2 answers to this question. In this version I have attempted to reduce cyclic complexity and class coupling even more as ...
  • 19.4k
-1 votes
2 answers
83 views

Verify items and prices in a large Excel sheet

This code searches for a lookup value (Worksheet "Price", Column B13:B31) from the table array in (Worksheet "Sheet1", Column A4:Z10000). Can this be done in a simpler or shorter ...
3 votes
2 answers
103 views

C# Tool to Generate MS Word Document Mailbox List From MS Excel

There is now a Follow up question to this question. Abstract The VBA solution didn't work on the clients computer because Office 2010 Starter Edition doesn't support VBA. I decided to try a C# ...
  • 19.4k
4 votes
0 answers
128 views

Print apartment mailbox lists from excel

Update Due to the fact that the client's version of excel does not support VBA, I have moved on to a C# excel interop solution which has been reviewed. The test data has been added at the bottom. The ...
  • 19.4k
1 vote
1 answer
71 views

Extracting data stored in a JsonDocument from an Excel file on sharepoint.com, retrieved using Microsoft Graph

I retrieve data from an Excel file located on sharepoint.com using Microsoft.Graph like this: ...
  • 10.9k
3 votes
1 answer
85 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
1 answer
41 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
0 answers
133 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 ...
  • 395
4 votes
2 answers
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 ...
  • 57
3 votes
1 answer
77 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
1 answer
130 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 ...
  • 51
1 vote
2 answers
68 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
0 answers
180 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
2 answers
72 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
1 answer
180 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 ...
  • 4,028
2 votes
1 answer
243 views

=PRINTF("{1} - {2}", ... ) in Excel without VBA - LAMBDA functions with variable number of arguments

The TEXTJOIN function has a really nice interface: =TEXTJOIN(delimiter, ignore_empty, text1, [text2], …, [text252]) ... where ...
  • 2,210
3 votes
2 answers
127 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
0 answers
55 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 ...

1
2 3 4 5
23