289,618 questions
1
vote
4
answers
114
views
Why doesn't getting a value from a named range work, only for this specific value?
I have a named range called A2Bounds25:
Grade
Percentage
A*
80
A
71
B
60
C
49
D
38
E
27
I pull the percentage from A2Bounds25:
=VLOOKUP(F74, (INDIRECT($K$3)),2)
where F74 contains the grade I want to ...
2
votes
0
answers
90
views
How can I write a matrix or a pandas DataFrame to an Excel file using openpyxl, without iterating cell by cell? [duplicate]
I’d like to insert a 2D array (for example, a pandas DataFrame) into an existing Excel worksheet at a specific position (e.g., starting at cell M8), using openpyxl.
Is there a way to assign the whole ...
0
votes
0
answers
40
views
Problem signing Excel VBA files with Signtool and Google KMS
I'm using Google KMS with HSM to store my private key and:
Signtool
CNG 1.2
to sign exe and dll files for my software.
Command looks like this:
"signtool.exe" sign /v /fd sha256 /tr http://...
0
votes
0
answers
37
views
Can I use FIND and IS-formulas in calculated pivot table fields?
I’d like to tally up rows that contain a certain text string in my PivotTable of studies.
This is the formula I use in the Insert Calculated Field dialog:
=ISNUMBER(FIND("🇬🇧",internalName))...
1
vote
3
answers
134
views
How can I check (activate, select) an OptionButton with VBA?
In my excel sheet I put 2 OptionButton objects:
in my VBA macro I added:
Sub OptionButtonDebugOff_Click()
debugmode = False
End Sub
Sub OptionButtonDebugOn_Click()
debugmode = True
End Sub
...
1
vote
1
answer
147
views
Excel - Complex IF Question - Not sure if possible in excel
I have the below matrix where the Y axis consists of 'Vol' + 'Sub' and the X axis consists of 'Sub', with a rating corresponding to the level of each e.g. if Vol + Sub is 10.1% and Sub only is 4.3% ...
1
vote
3
answers
136
views
Change a column of data that contain 2 different date formats
I want to use Power Query to change a column or add a custom column that contain 2 different date formats individually to each format.
My column curently has dates in 2 formats: yyyymmdd and dd/mm/...
0
votes
2
answers
84
views
Check Active Cells from Multiple Column in Excel Online
I have an excel online sheet that I am building. I have list of projects in a sheet and another sheets contain working hours on each of these projects in each week. What I am looking for is a code ...
0
votes
1
answer
162
views
Writing a custom function with VBA to calculate dBA from linear spectral data
I want to write a custom function that works out the overall A-Weighted dB level of a linear spectrum of octave band frequencies (eg. 31.5 Hz-16kHz). The function would need to have an input of two ...
3
votes
1
answer
101
views
Dynamic Dropdown List
I have a live DB sheet in Excel, and I want to create a sheet where I can fill new rows using dropdown lists based in the DB sheet.
In other words, I have Client | Product | Requester | Piece/...
1
vote
1
answer
129
views
Excel hanging on my first Do Loop attempt
I’ve spent hours getting some Excel UserForm code honed down to:
Dim DateLoop As String
DateLoop = "RUN"
Do ' Outer loop.
Do While DateLoop = "RUN" ' Inner Loop
...
0
votes
1
answer
90
views
VBA Delete Rows with Zero balance and dates that match a cell
I have a macro that I am using to delete rows that have a zero balance and that match the period/dates listed in a cell. For example, I have several rows with dates of 9/7/25, 9/27/25 and 9/10/25 ...
0
votes
1
answer
125
views
MS Access to Excel with CopyFromRecordset
In my Microsoft Access application, I have several table views where I've added the ability for my users to export the results to an Excel spreadsheet. It works fine for all but 2 of my customers. ...
0
votes
3
answers
106
views
Counting multiple ranges based on a single criteria [closed]
I have a data set where I have my criteria in Column A which is an alpha numeric code, and my values in Columns C through H. There are duplicates in Column A and I need these to be captured and not ...
0
votes
1
answer
66
views
Mail merge with hyperlinks inside if statement (Microsoft word) [closed]
I am trying to create a mail merge with a hyperlink inside of an “if” statement (the link only appears if a certain mergefield exists), where both the link address and display text are different ...
0
votes
2
answers
71
views
Highlighting excel cells based on matching other cells that meet a separate criteria
I have a spreadsheet that identifies highlights and gives text when a set of conditions are met.
Basic data sample is (Sorry, unsure how to make it look like it does in excel with formatting and ...
0
votes
1
answer
84
views
copy data from many csv files into a single excel file using vba [closed]
I have many data files that I need to consolidate into a single file. The source data files are simple csv text files with a single column. I need to take maybe a few hundred of these csv files and ...
0
votes
2
answers
80
views
How to select a working day which excludes bank holidays in VBA in Excel?
I am trying to use the STOCKHISTORY function to get the share prices for the last 6 months starting from today; if today is 15th October, I want the share prices on 15th September, 15th August, 15th ...
1
vote
1
answer
82
views
Excel/VBA - "Place in Cell" Photos Automatically?
I have this code that reads the folder path and name, and adds the corresponding image onto a cell. I assign that macro to a button and it makes my job easier. But if you hover over the image that's ...
0
votes
1
answer
64
views
Excel: Need to look up a random value in a row next to a corresponding entry and return a result in another list
I normally try to figure these our or my problems don't have that much complexity, but trying to create a list for testing. The list will have 4 unique values that are considered the attribute and ...
3
votes
4
answers
137
views
How can I filter zeros from a dynamically generated array in Excel?
I'm trying to generate a list of all the factors of a number in MS Excel. I have the following formula:
=NOT(MOD(12,SEQUENCE(1,12)))*(SEQUENCE(1,12))
This gives me an array with factors and zeros, as ...
1
vote
1
answer
114
views
Dynamic Excel formula to group items by category into 4 columns (with optional description rows)
I’m trying to build a dynamic formula in Excel 365 (French version). I’ve been struggling for hours and I’d really appreciate some help.
Data structure
I have a sheet named Pictogrammes with around ...
1
vote
4
answers
182
views
VBA - Passing Array as a result
I've created a function that is getting unique values from a column and it works perfectly fine:
Private Function GetUniqueValues(ByVal sheet As String, ByVal column As Integer, ByVal skipHeader As ...
1
vote
1
answer
70
views
Changing Data Query Source File Property
I am attempting to change the Source property of a query in an Excel file via PowerShell. I have found the Connections properties, but am unable to locate the specific property that contains the ...
0
votes
4
answers
198
views
Split function with if statement to define string value (excel vba)
My vba excel code is using split funtion from a combo box value. It takes an ID (alias=GG) which is a value right of the 6th hyphen.
GG = Split(Sheet1.ComboBox1.Value, "-")(6)
example return ...
3
votes
2
answers
130
views
Save with original file created date AND time
I've a folder with thousands of .txt files I'm delimiting and creating xlsx files. I need to save the new xlsx files with date AND time (even if it's just the hour) into the file name.
Reason is, each ...
2
votes
2
answers
123
views
Excel function LAMBDA COUNTIF
=LET(
Business,B6,
All_nationalities,FILTER(Data[Nationality],Data[Business]=Business),
Unique_nationalities,UNIQUE(All_nationalities),
freq,BYROW(Unique_nationalities,LAMBDA(x,COUNTIF(...
1
vote
1
answer
185
views
Record the date of certain events by using Excel formula
We want to record the date of certain events by using MS Excel.
For example, we have borrowed 5 books from a library.
When we renew each of them, we should log the date, by using dropdown as a data ...
0
votes
0
answers
118
views
Downloading Barchart.com table using Excel VBA
I'm trying to download the barchart data table from https://www.barchart.com/investing-ideas/ai-stocks
using Excel VBA in similar manner as the python script in Automatic file downloading on Barchart....
-1
votes
2
answers
146
views
Copy all rows with common value in a column to new file [closed]
I need to copy all the data into a new sheet or new file based on the specified city in the dataset.
Ex.
Los Angeles has 4 rows of data,
Chicago has 2 rows of data,
Miami has 5 rows of data should be ...
1
vote
2
answers
142
views
Excel incorrectly processes formulas cross-referencing each other
I have generated an Excel file, with the following columns (cf. minimal code below):
ID (col. A): set via hardcoded values (i.e. not via Excel formula)
Manually-set resolved (col. B): a column that ...
3
votes
3
answers
101
views
Macro overwriting incorrect workbook
I created a macro to copy and paste two tabs into a new workbook, and subsequently copy the data and paste it as values to be prepared for a submission. However, when I go to use this macro, it ...
1
vote
1
answer
46
views
How to Access Active Page Filters in Excel PivotTable using C# Excel Interop (VSTO)?
I understand that when there is only one filter active, I can easily obtain its value by accessing the cell adjacent to the page filter. However, when multiple filters are applied, Excel displays this ...
1
vote
1
answer
106
views
Export sheet changing empty string ("") with BLANK()
I need some support to modify the vba code below. The code is designed to export data from the sheet "Export" to a new workbook that should then be loaded in an external online tool.
The ...
1
vote
0
answers
138
views
How to wait for “Shell” command to end before executing further VBA code?
In my Excel VBA macro, with a “Shell” command I call a PowerShell (which executes a Python script), and temporarily during the development I print out the return code:
x = Shell("POWERSHELL.exe -...
3
votes
1
answer
96
views
Create an array of filtered values (SUBTOTAL) and if there is no filter set include empty rows between the data into the array
0 | A |
--|----------|-----
1 |Product |
2 |Product_A |
3 |Product_A |
4 |Product_B |
5 | |
6 | |
7 |Product_C |
8 | |
9 |Product_D |
10|Product_D |
11|...
2
votes
3
answers
170
views
Showing VBA macro output in a VBS script
I'm running a VBA macro through a VBS Script:
scriptDir = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
Set excel = CreateObject("Excel....
1
vote
2
answers
114
views
VBA Autofilter does not return correct number of rows
When I filter any column down to two rows being visible, I run the Sub SaveAllFilters().
I then manually remove the filters to show all columns/rows. Then when I try to apply the Sub ...
0
votes
0
answers
85
views
Custom Ribbon Tab in Excel not showing
I have created a personal.xlsb and connected the macro's to a custom ribbon in Excel. This works great, but when I want to deploy the solution to my co-worker I got a problem. I can export the custom ...
1
vote
1
answer
150
views
"Insert Python" in Excel's Formula section, to read another Excel file
In Excel's Formula section, when using "Insert Python", I want to read another Excel file as data frame.
However as screenshot below, it seems wrong with the file path. I've try double ...
-2
votes
1
answer
157
views
Excel VBA copy and paste loop
The task is a series of copy and pastes from worksheet A to worksheet B and then one copy of a newly calculated cell from worksheet B back into worksheet A.
Think of the 3 values from worksheet A as ...
2
votes
1
answer
49
views
PowerPivot Measure - Average subgroup w/ Top N applied?
I am trying to calculate the difference of each "Row" value from that group's average from a group of two Top N filtered values.
I am able to successfully "pull down" the average ...
2
votes
4
answers
128
views
Excel function to extract certain values from a complex string
I need to pull the 7 digit number, 5 digit number and 9 digit (including a hyphen)
example string:
Headers
User ID: 12345, Claim No: 1234567, Invoice No: 1-12345678
Claim No: 1234567,User ID: 12345, ...
0
votes
3
answers
78
views
Excel: VLOOKUP/TEXTJOIN to get comma-separated result in cell for multiple matches in comma-separated cells in a column
I am trying to match a single value in a cell with content of a comma-separated list in a cell in multiple rows and get all matches returned in a comma-separated list.
The source data sheet format ...
0
votes
1
answer
86
views
Excel Office Script (not VBA!) to hide / show columns, depending on cell value or filtered table
I need to build an Office Script (not VBA) to help a number of users hide / show columns on a Cloud-shared worksheet, in a controlled and structured way (so, not by manually using the Excel menu Sort ...
0
votes
1
answer
73
views
Openpyxl conditional formatting if cell among list values
I would like to use openpyxl to create an Excel conditional formatting rule where cells are filled with a particular color, when the cell value matches an element among a hardcoded list of values. The ...
2
votes
1
answer
146
views
VBA code to check if user-input filename is a duplicate
VBA newbie here. What I'm trying to do: Write a macro that brings up the Save As box with a filename pre-filled in, which the end user can edit if they choose. If the file name already exists in the ...
1
vote
2
answers
88
views
excel search array for partial string match; return cell adjacent to string
I would like to search an array for a cell in the function's row and return the cell adjacent to the matching array row. The array cells contain partial matches with the function's row.
clients
...
1
vote
3
answers
252
views
Loop to check all cells in a column to send email
I want to check all cells in a column for a value to send an email.
I created the If check.
How do I make it go through a loop to check all cells in the column?
This is the VBA code I made but I can ...
1
vote
1
answer
124
views
Overflow error when calculating stock return using Do While Loop in VBA [closed]
I am new to programming and I am doing an exercise to calculate stock return using For...Next and Do While Loop. I have no problem with the For...Next part but my code for the Do While Loop part has &...