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].

0 votes
0 answers
5 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 ...
deals mcloof's user avatar
0 votes
0 answers
6 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 but when i change the operator to equal as showen in the if statement in the for loop it doesnt work i can ...
anas boussib's user avatar
0 votes
1 answer
18 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 ...
CJ Robis's user avatar
0 votes
0 answers
13 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 ...
user10659329's user avatar
0 votes
0 answers
19 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 ...
Paul Fraser's user avatar
0 votes
1 answer
11 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 ...
t0mas's user avatar
  • 1
-2 votes
0 answers
18 views

Excel Formula to Calculate the nth date value based on subset of data [closed]

I have scoured the internet but to no avail. My problem is this: I have a table like the one in the image with date values for planned and actual dates (I tried to create it using the markdown format ...
stayschemin's user avatar
1 vote
1 answer
32 views

nested "if and" statements in excel

I have the below table and have an 2 "IF AND" statement there: May I ask, if I would like to combine the "IF AND" statement together, how should I go about it? What I am trying to ...
Bubbles's user avatar
  • 577
0 votes
0 answers
17 views

Excel - Find all duplicate entries in Column A (and its Row), copy each dupe entry so they're grouped together, to new Spreadsheet

My apologies for this and this is because I need a solution relatively quick, and I have very little Experience in Excel Functions, VBS, etc. meaning, I won't hit a goal I need very soon. My goal Move ...
Waltermelon's user avatar
0 votes
0 answers
15 views

Accessing a sheet from a different workbook [duplicate]

I have 2 workbooks, one hidden and one the user can see. The hidden workbook contains all the code (including the line below) Note: codeName is the code name of a sheet in the active (non-hidden) ...
jsgv's user avatar
  • 21
0 votes
0 answers
9 views

Office Script to Copy Rows From One Worksheet To Another

I have a shared excel workbook on SharePoint that is being used by a few users. This sheet tracks reach outs to counties across the United States. When a reach out turns into a lead it then gets ...
ThisCluelessGuy's user avatar
0 votes
0 answers
27 views

Average of Conditionally Formatted cells by color

I have a dataset (below) in excel that is conditionally formatted using the excel pre-set GREEN-YELLOW-RED color scale. What I want to do is find the average based by color of cell...and the whole ...
em4019's user avatar
  • 43
0 votes
1 answer
42 views

Passing an array of objects from C# to VBA Excel

I have a C# console application and Dll. I registered the dll as COM via interop. I used the COM Visible property, GUID etc Set Assembly Information, Build information to register it to COM I ...
Dee's user avatar
  • 1
0 votes
2 answers
32 views

VBA Hlookup multiple rows

I'am trying to use HLookup with vba, but when i try the vba code i can't apply it to multiple rows, it can only be used for single rows "J2", i need HLookup vba code for many rows "J2&...
Caya's user avatar
  • 13
0 votes
0 answers
30 views

VBA Different cells accourding to the ComboBox Value

tPrivate Sub CSave_Click() On Error GoTo ErrorHandler ' Variable Definition Dim lr1 As Long, lr2 As Long, lr3 As Long, lr4 As Long, lr5 As Long, lr6 As Long ' Last Row ...
Onur's user avatar
  • 1
0 votes
1 answer
27 views

Excel VBA skip empty cells

I have a code to select a specified range and paste it into an e-mail. I would like it to skip copying blank cells within the range and paste only the cells that contain data. The specified range ...
kyle245's user avatar
0 votes
2 answers
29 views

Sum values based on XLOOKUP

the table below shows a list of employees and number of hours they have worked in that week. I am trying to come up with formula that would return the total number of hours worked per employee per ...
Alytas's user avatar
  • 49
0 votes
0 answers
22 views

excelWB.write(fileOut); gives IllegalArgumentException

I am trying to use an excel to write the into new file using Apache POI. This is the method code, import org.apache.poi.xssf.usermodel.XSSFRow; import org.apache.poi.xssf.usermodel.XSSFSheet; import ...
Lyrk's user avatar
  • 1,988
0 votes
0 answers
62 views

Copy File Names to Destination File

Hope all good with everyone. I am trying to copy/paste file name to my destination workbook's column A. Below is copying data from all workbooks from a folder and pastes them to my masterfile. ...
metalscuba's user avatar
0 votes
1 answer
13 views

PHPSpreadsheet, how do I set different layout for each series in a composite graph?

I am trying to create charts in excel using the PHP library PHPSpreadSheet. But when I generate a composite graph with multiple types of graphs together, I get overlapping data labels. Stacked bar + ...
Ankit Singh's user avatar
0 votes
0 answers
44 views

Why data that are being written to excel are not starting from the 'A' column?

I'm using pandas to copy data from one excel to another and the data are being copied just not at the right place. I have this function that reads the data: def updated_file(self, progress_bar): ...
Jugert Mucoimaj's user avatar
0 votes
0 answers
18 views

excel found a problem with one or more formula references in this worksheet in a new workbook after only inserting one table

I created a new excel workbook and inserted one table. When I fill in a cell in the row below the table then due to autoexpansion the table is expanded with one row. Exacty how it supposed toe work. ...
Bart Groot's user avatar
0 votes
0 answers
24 views

DoEvents whilst a Time Delay Macro is running

I have a Macro in an excel sheet that selects a value in a slicer, I had a pivot which was converted to OLAP. When selecting a value in the slicer there is a short period of time where all the cells ...
MBrann's user avatar
  • 235
-1 votes
0 answers
18 views

How to save data from SAP in Excel file with VBA code [closed]

Could you please help me with a VBA macro command to save the content of a generated report to my computer with a specified name? Thank you! This is what I have until now: Sub RunSAPScript() '...
Dinita Mircea's user avatar
0 votes
1 answer
25 views

EXCEL Sumproduct COUNT 2 AND condition every nth COLUMN, counting blank and not blank

Good Day to all! as my title suggest I am having a problem with the sumproduct formula to get the result that for the following condition Check and Count every 4th column range for NOT blank ...
JeremyLongs's user avatar
0 votes
0 answers
22 views

Export Excel table to ppt

I am editing a macro to export the selected table into a ppt slide. However, I am struggling with the code (it makes my laptop app crashes) and I was wondering if anyone had a better way of proceeding....
Kede51's user avatar
  • 1
0 votes
0 answers
23 views

Compile Error when opening an Excel spreadsheet from Access

I have various routines within an Access database system that open Excel, open a workbook, make changes before saving it, closing it and quitting. Basically, I use this code: Dim objExcel As Excel....
Ian Bateman's user avatar
0 votes
2 answers
32 views

Progress bar in vba

I'm working with a macro that takes a long time to execute (>1 min) and I want to improve it by adding a progressbar. I've followed multiple tutorials that all say to create a userform, add an ...
Brocas Sylvain's user avatar
-1 votes
2 answers
26 views

Excel VBA - Loop through row and copy paste to another sheet if condition meet

I have 2 sheets - "Current" and "Email". I want to have a script that reads that row by row on Column A - D. If Column D = "", then Copy corresponding Column B value ...
Raymond's user avatar
  • 25
-1 votes
0 answers
19 views

vba – Copying cells to another sheet when a condition is met with search function [closed]

I simply cannot solve this one, even if I customize similar codes from this web. When I choose a value from my drop-down menu in cell G of the worksheet "Úkoly", I need to search for the ...
stacker's user avatar
0 votes
0 answers
25 views

Calculations with the MS excel tool using the functions and formulas in a single cell

How do we calculate Coefficient C if R/W=0.64 and H/W=1.8? using functions in a single cell/step. Detailed query: If We have a table with some rows and columns, How do we calculate the respective ...
Nirottam Singh's user avatar
0 votes
0 answers
10 views

How to create multiple pivot tables with their own charts on the same sheet using a macro?

I am new to VBA so I apologize if this is a rookie mistake. I am attempting to create several pivot tables on the same sheet with each one having their own chart. The goal is to do this every month as ...
Cheesemaster's user avatar
0 votes
0 answers
13 views

Unable to Export Data In Hindi (Unicode) Excel using PHP and MySqli

Unable to Export Data In Hindi (Unicode) Excel using PHP and MySqli Below is the code im using to export data from the database & its working fine but when i try to export hindi entries excel ...
Sudhanshu Pandey's user avatar
-2 votes
1 answer
45 views

Excel VBA code to Sum the debit up values when credit happen

I'm having excel sheet with debit transaction and Credit transaction in specific dates, I want VBA code to sum the previous debit transaction when Credit transaction occur and reconcile the amount if ...
Ahmed EL HAWARY's user avatar
0 votes
0 answers
12 views

how to create a dependent drop-down list linked to a multi selection source cell

I have dependent drop-down lists in sheet 1, P1 (the source cell) and Q1 (the dependent cell). I used the following equation in data validation source for Q cell which worked great. =INDIRECT(VLOOKUP(...
Ahmed Magdy Tpozada's user avatar
0 votes
1 answer
34 views

Excel Formula for Today's Month Being Greater Than Lookup Value Month & Provide Message

I have created a budget sheet in Excel to track Debt Snowball payments. I have a formula that successfully works to lookup the month from a list of months (column F) that a final payment is made for a ...
LittleMissT's user avatar
0 votes
0 answers
35 views

Running the VBA code gives me an "Invalid path or URL"

I have a snippet of VBA code that I've been working with where I want to press a button in Excel that will open an Outlook template. But for some reason, when I press the button, I get an error for &...
xplicitator's user avatar
0 votes
1 answer
21 views

vba excel to read outlook and send pre scribed e mail based on subject line

excel says that it is not connected and shows me error on the line where "myInbox" is set to the outlook inbox. at first my studies led me to these references and ol commands. Then online ...
Bradley Branagan's user avatar
1 vote
0 answers
32 views

Values Are of Wrong Data Type in Formula in VBA Excel

I'm trying to multiply a variant array of coefficients by an independent variable stored in an excel sheet through a function in VBA to return the dependent value. The array has one integer in the ...
Rihan Sajid's user avatar
0 votes
0 answers
15 views

Using VBA to automate generation of multiple worddocs populated with data from excel sheet

I am using the following start to my VBA project, but when I run it I get a 1004 error and it highlights the below. The error seems to be the path, but I know not what the issue is. Sub ...
RavZerk's user avatar
0 votes
0 answers
9 views

Copying data from repeated cells in multiple excel files in a folder to a new file as a table not entering the loops

There's a few iterations/versions of code from StackOverflow that I have tried to copy certain repeated cells from multiple excel files in a folder into one new file. From adding MsgBox into different ...
kca062's user avatar
  • 63
-2 votes
2 answers
72 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 ...
Alan Tingey's user avatar
-2 votes
0 answers
23 views

How to create a macro that updates a table?

I have a table called TablaEntradas in the Entradas tab where all the fields of the userform frmEntradas are stored. I have another table called Salidas in the Salidas tab where all the fields of the ...
Chris's user avatar
  • 1
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 ...
Richard Tommy Myers's user avatar
-2 votes
1 answer
17 views

Excel: Calculate Time Range in Days Between Two Dates if Specific Conditions are Met [closed]

I'm trying to calculate the # of days between orders from users. So, the formula needs to reference Column D to confirm the order was from the same email and if so, then calculate the days between the ...
Sean Voorhies's user avatar
0 votes
0 answers
27 views

Uploading file to ASP.NET Core Web API using VBA

I'm struggling to upload a CSV file from local drive to a Web API. Sub Upload() Dim objHTTP As New MSXML2.ServerXMLHTTP60 Dim url As String Dim filename, resp As String Dim boundary, ...
Mark's user avatar
  • 2,412
0 votes
1 answer
35 views

Get value from different excel sheets with criteria

i want to get value from another excel sheets based on some criteria. at first look at the picture. here in the gray highlighted cell i want to get the value from other sheet and it'll be dynamic and ...
Meeyan's user avatar
  • 111
0 votes
1 answer
39 views

How to Calculate Times in Variable Cells

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 ...
PiGuy88's user avatar
  • 147
-1 votes
0 answers
49 views

Cells gets only a zero

I wrote a function in Excel VBA and use cells(x,y) to get the values. The problem is the table cells I copied into the excel sheet will only be read as zero. But the cells I wrote the values in by ...
vukstudent's user avatar
0 votes
1 answer
38 views

What excel formula can I use to compare 2 columns and pick the cell that does not have #n/a in it?

A B C **1** ID 1 ID 2 Expected Output **2** 0011Q00001xC8a7QAC #N/A 0011Q00001xC8a7QAC **3** 0011Q00001xC8aTQAS #N/A 0011Q00001xC8aTQAS **4** #N/A 0011Q00001xxxFFFQr 0011Q00001xxxFFFQr **5** #N/A ...
user26501860's user avatar

15 30 50 per page
1
2 3 4 5