Category "excel"

How do I save changes made to data within a Userform back to the same row where the data came from?

I have found code to search a table and load cell values into the form. I need to be able to make changes and save the form data back to the table to update th

Return filename with wildcard

sFile = Dir(sPath & sFile) Debug.Print sFile 2022.txt is returned if sFile (the active cell) contains 2022.txt; how can I return the same if sFile contains

Data Mismatch error while using the Update query

I am using the Update query inside VBA to Update one particular column. But I am getting the Data Mismatch in criteria expression error. Please find below the c

Excel VBA - Set timer goes faster after each loop

I am trying to create a timer that when reaching zero, it calls from the "Database" script, and then repeats the timer again from 30 seconds. Problem is, every

VBA Runtime error 6: overflow on one calculation, but other calculations work

I'm trying to run the following code, but I'm getting a runtime error 6: overflow for the last calculation that I am trying to do. The program stops when it rea

VBA UserForm Frame ScrollTop function not working from class function

This should be a simple task and I've been coding in VBA for 10+ years but I cannot seem to get this to work. I have a UserForm with a MultiPage (with 2 pages)

Batch removing the second sheet from many excel sheets in R?

I have many excel sheets that I need to remove the second sheet before importing them. All files are .xlsx type in one folder and have same format. What kind of

Polyfill for Excel HSTACK and VSTACK array functions

Microsoft has announced many new array functions (https://techcommunity.microsoft.com/t5/excel-blog/announcing-new-text-and-array-functions/ba-p/3186066), inclu

Range with Cells Function (Runtime Error - 1004 --> Application-defined or object Defined error)

Could you please help on the below code. I have 2 workbooks and i want to copy the columns from one to another with the matching header. It shows an error in th

Microsoft.ACE.OLEDB.16.0 upgrade SSIS Unexpected termination

We have SSIS package installed in SSIS catalog server. In the catalog server, Microsoft.ACE.OLEDB.12.0 is installed. The jobs were running fine without issues.

I am trying to reference a cell in a closed workbooks

I have a sheet where column B contains a list of Folders in R:\Jobs. The folder name is also the 'Job Name'. I use VBA to create a formula in Column F that look

Trying to calculate a 1hr range within the last 12hrs of a range with VBA

So I am trying to calculate a test temp for 1hr from the last 12 hours of data. Sometimes this data can be several days some times it can be only 24hrs. The sta

Excel case-sensitive COUNTIF with wildcards: native function?

I'm trying to find a native Excel function (or combination thereof) which will behave precisely in the manner of COUNTIF (i.e will handle wildcards), but is cas

Excel VBA Auto-Save IF, THEN, ElSE

I'm trying to make an Excel VBA macro to automate my saves. So if it is 2022 or 2023 and it is either the month of January, February, march, etc. The file will

Differentiate between "1" and "11"

I have 20 cases. For every row in my sheet, I have a cell that assigns related case numbers to it. A row could have multiple case numbers assigned to it in that

How align content in every cell to center?

I'm trying to center the table content using df.style.set_properties(**{'text-align': 'center'}). But I couldn't do it. Is there any other way? Here is the full

Pass parameter from Excel to SQL in PowerQuery

I want to set local variables or pass parameters from Excel to SQL. I've found similar questions, but all referred to old versions of Excel and/or the answers s

Using a multiple arrays in order to find the lowest "Ranking" in an character defined ranking system

Wordy title but I was interviewed on this question, couldn't derive the answer and really would love to better understand array usage in excel. Question: You ha

How can you access hidden published ms-project .mpp files

I was writing a simple script in VBA for batch updating project info posted on Project Web App. I've stumbled on a problem which seems unsolvable to me though,

variable pivot data range (i.e no. of rows and columns gets change)

iam gettin an error while running below code, i want to apply pivot table to dynamic data range ( data gets change everytime i.e rows and columns) i want macro