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
288,218
questions
0
votes
0
answers
8
views
How not to duplicate a complex expression in an if condition and the result expression in Excel [duplicate]
Frequently I want to check a complex condition and if valid, use the result as the result statement such as:
=IF(RC2+R1C>1.33,RC2+R1C,"")
Here, in a simple example, the RC2+R1C is ...
0
votes
1
answer
32
views
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. ...
1
vote
1
answer
20
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
20
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
0
answers
17
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 ...
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
0
answers
25
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
19
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 ...
-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 ...
1
vote
1
answer
34
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 ...
-1
votes
0
answers
23
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 ...
0
votes
0
answers
16
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) ...
0
votes
0
answers
12
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 ...
0
votes
0
answers
30
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 ...