Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [excel]

Only for questions on programming against Excel objects or files, or formula development. You may combine the Excel tag with VBA, VSTO, C#, VB.NET, PowerShell, OLE automation, and other programming related tags and questions if applicable. Do NOT use with other spreadsheet software like [google-sheets].

excel
0 votes
0 answers
13 views

Excel VBA - Read/Write to text file, keep special charters but don't change the BOM

It looks like the original file has a BOM already but my VBA breaks it. The text "" or HEX "ef bb bf" is at the start of the file when viewed in Notpad++ with the HEX add-in. ...
0 votes
1 answer
52 views

Using Excel VBA, can you publish a query that you have made changes in?

Excel VBA ADO/TFS add in supports refreshing an ADO query in a worksheet using the IDC_REFRESH constant. See (Execute action failed on CommandBarButton to update workitems) for details. I'd like to be ...
0 votes
0 answers
11 views

How can I use vba to insert a row below each row that contains "2024" in a specified column, and in that new row enter "2025" in same column?

I am downloading sales history from ERP system and want to add a row for next year's forecasting. ERP export image: ..as text: Employee.Employee Company Product Year Jan Feb Mar Apr May Jun Jul ...
0 votes
0 answers
16 views

excel vba test a value if exist from sheet1(carnet) in sheet2(stock) and return it in sheet3(liste)

i have made this code and when i test the if statement by this condition below it works `If crnt.Range("E" & i).Value <> stk.Range("A" & i).Value Then` ...but when i ...
1 vote
2 answers
2k views

Formula Of TextBox Within Chart - How Do I Refer To It Without Selecting?

I have the following code that works Sub TestMe() Dim crt As ChartObject Dim shp_Shape As Shape Dim chartX As Chart For Each crt In ActiveSheet.ChartObjects Set chartX = crt.Chart For Each ...
-2 votes
2 answers
78 views

Excel, while loop with variable loops

Good evening all, I have a table in columns "A" and "B". It is known as a BOM (Bill of Material) and column "A" is the parent of column "B" the child. Some ...
0 votes
1 answer
43 views

How to calculate times in variable cells [closed]

I am trying to create an Excel file that logs diver times. Specifically, I am logging their in/out times, total dive time, and surface intervals. If you're not a diver, the total dive time is the ...
0 votes
0 answers
16 views

Excel - How to a calculated value from a range by ratio

Assume I have this lookup table: Column A Column B 60% 10 70% 9 And the value I want to match is 65% I'm trying to find a formula that will give me the number that's in the same ratio between 9 ...
0 votes
2 answers
13k views

Is it possible to schedule the data refresh of a power query in excel to refresh data at 2 specific times every day?

I built a power query in Excel that pulls data from the newest file in a shared folder. It is an "OLE DB Query" with an SQL command type (not sure if that is relevant information but thought I would ...
2 votes
2 answers
21k views

Expression.Error: We cannot apply operator & to types Number and Number

I don't understand the root of this Type issue. I have added a custom column to combine two numbers. They are both Type123. I am unsure why the error pops up.
0 votes
1 answer
22 views

Preventing Excel Ribbon CustomUI IRibbonUI variable from 'losing state'

We have a custom UI with two added ribbons in our Workspace Environment. This CustomUI has an OnLoad event that loads the Ribbon's pointer variable into memory for access later. Unfortunately, there ...
0 votes
0 answers
14 views

Excel files stored in USB drive, seem to be altered after it got plugged on to a computer [closed]

my boss gave me a usb thumb drive to save some music in it. In the drive there was already saved some excel spreadsheets, I didn't touch them, even though my boss said that they have some kind of ...
0 votes
1 answer
18 views

How to prevent the message "File open in another application" when creating excel instance

I was running a PowerShell script perfectly fine earlier, but for some reason this message popped up that's saying the file is open in another application. I have checked task manager and the excel ...
0 votes
0 answers
24 views

VBA to determine remote desktop user

I would like to use VBA (64bit) to determine if a user is running VBA/Excel from a remote computer. For example, if PC#1 uses Chrome Remote Desktop (CRD) to remote login to PC#2, the VBA code on PC#2 ...
0 votes
1 answer
33 views

Insert a very long function using VBA

Heyo, I am trying to use VBA to insert a (very) long formula into a workpage. I keep getting an "Application defined/objeft defined" error. Hoping there's either a way to make this work or ...

15 30 50 per page
1
2 3 4 5
19225