Newest 'excel' Questions - Stack Overflow

Questions tagged [excel]

Only for questions on programming against Excel objects or files, or complex 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. General help regarding MS Excel for single worksheet functions is available at Super User.

0
votes
0answers
6 views

Set the starting and ending rows of a range in Excel 2010 based on multiple criteria

I'm making a price calculator for my print shop, because it takes a long time to quote jobs if you don't know all of our materials and prices. I've uploaded a screenshot of the calculator here. It's ...
-1
votes
0answers
9 views

How do I display the row of the cell that is selected in sheet A in a scripted “Display Row” on sheet B?

I am searching and searching for days now and I cant find any help and answer to this. I want to create a "Highlight Row" I want it to always show to the User the row of the cell he has selected. ...
0
votes
0answers
15 views

C# Excel - Only read / select Cells with values/data

How can I read an excel file and select ONLY those CELLS that have data - not formatting, not spaces , just text or numbers. I know I can read the spreadsheet like this: How can I do a 'select' on ...
0
votes
0answers
13 views

Create a web form I can paste excel rows/columns into

How do I create a web form that accepts input that would be copied and pasted from Excel? Basically, I have a table on my website I use for managing my project every now and then it makes sense to ...
1
vote
1answer
20 views

How to copy range to another workbook?

I have some tables from Excel that will be updated every month or so, what I am trying to do is to copy and paste those ranges from a "master workbook" to some several sheets. The way this works is I ...
-1
votes
1answer
14 views

Need formula to determine # of membership visits remaining based on past check-ins

I need an excel formula to give me X. X = # of remaining visits. For example, membership level includes 8 visits a month. When the user has 2 visits left, I want to send them an email. Data I'm ...
1
vote
1answer
17 views

Code Not Concatenating Rows in For Each/IF Statment

I'm trying to concatenate rows that meet a certain condition. When I run the code, the first cell is populated correctly; however, each cell after that is the same as the first cell. The first cell ...
1
vote
0answers
12 views

Data Validation Won't Save

I have a sub that adds data validation to a worksheet. It appears to work: Public Sub AddDataValidation(ByRef rng As Range, ParamArray options() As Variant) With rng.Validation .Delete ...
1
vote
1answer
25 views

How to copy cell content from one workbook to another?

I am trying to copy the content of a specific cell from one workbook(MRP) to the other(Schedule Template 2). Both have different addresses and it should only copy it when it finds the word Schedule in ...
1
vote
0answers
11 views

My vba code is designed return a value from a stored procedure (in SQL) using an output parameter, but I am unable to get a value to return

I am having trouble returning a value from an SQL table into a variable within vba. I am using dynamic SQL with a stored procedure that takes in 4 input parameters and one output parameter. After ...
0
votes
1answer
21 views

Sorting Data in Multiple Columns

I'm trying to sort data in multiple columns(9, to be exact). Essentially I need to sort them by an individual # (The sort number), while keeping the rest of the information in the remaining columns ...
0
votes
0answers
4 views

Is there R syntax for transferring model coefficients and standard errors from sem output to excel for all subjects

I am not sure how to export sem model standardized effects and standard errors for all subjects from an R data set to an excel data set for further analyses. I know how to export data from R to ...
1
vote
0answers
17 views

Retrieve Specifc Text from Email

I am looking to read my Outlook inbox for all emails received today that have "Cancel Alert" in the subject. In the body of the these emails there are two rows of data with 6 columns. Fairly simple ...
0
votes
1answer
9 views

Rank ordering dates (and repeating the command for each ID/person)

I have a series of dates for each case (person) in a dataset. I am trying to rank order these dates (with duplicates) for each person. My question is a direct application of this thread: How to ...
-4
votes
0answers
17 views

How to move an Excel macro to LibreOffice [on hold]

I'm looking to move or recode the following vba code in LibreOffice, all it is basically doing is copying cell contents to another worksheet. I'm running it in Linux Mint. I'm using Calc5. I've put ...
0
votes
1answer
15 views

Can't detect if the excel file is open without prompting user to save file / cancel

Using Iron Python I need to first determine if the excel file is already open and then if it is open, access it. if its not open then open it. problem: in my try statement when I try to open the ...
0
votes
2answers
29 views

Issues with moving Sheets between Workbooks

I'm working on a macro that will move a sheet from a selected Excel sheet into a document with a macro already loaded. I'm having issues with actually getting the sheet to move over, I keep receiving ...
0
votes
0answers
8 views

How to Consolidate a folder on Excel 2019?

I need to Consolidate a folder that contains 26 workbooks with 31 sheets each one, in one workbook, i watch tutorials and more but anything actually working, the sheets on all workbooks have the same ...
-1
votes
0answers
23 views

Find a string between two words in every row of a specific column in excel with python

I want to extract the info between two specific words in each row of a column in excel. Here is my code. However I do not manage to get to work the .findall function for every row. Example: I want ...
1
vote
2answers
27 views

VBA: Usage of parentheses for a method

What's the right way to call method when it comes to using or omitting parentheses? If I understand the results of my google search correctly: you have to use parentheses when assigning the return ...
1
vote
1answer
19 views

How to end close a macro when the target value is not found in a search

I have a macro that is finding and targeting the entirety of a column if it matches a specific header(in this case the header is in the second row and it is later being used for find and replace ...
0
votes
3answers
32 views

Author used Excel like typewriter - need to combine cells vertically with VBA for export

Someone created a text document in excel like it was on a typewriter, so they wrote to the end of their screen and then hit enter. I now need that document readable on other screens. I'd like to put ...
-1
votes
1answer
27 views

Code to compare to columns, find differences, and paste them in a new column [on hold]

I'm just trying to compare columns A & D, if there is any value in A that is not in D then I want to copy that value and the adjacent cell, Column B, and paste them in Columns G & H. For ...
0
votes
0answers
22 views

How do I find a cell that has a modified value from a different cell?

I'm trying to take a cell that has some value in it (e.g. B10 is 100), then subtract 5 from that value. (100-5 = 95) Then I want to pull up the cell that has the value (95), and return the cell that ...
-2
votes
0answers
15 views

VBA Code to find blank cells in a row and copy data in same row and move up [on hold]

I am writing a code to go to the last row of column L in a dataset. If the cell is blank then I want to it go up one cell and over to the right 3 cells, copy and paste the data from cells n:p then ...
3
votes
0answers
63 views

VBA: Workaround To Emulate AddressOf Operator In A Class Module

I need to use a number of Windows API functions in a Class that I am developing. Several of these functions require the use of the AddressOf, but as per Microsoft Documentation, its use in a class ...
-1
votes
0answers
9 views

merge excel files into with file names being the sheet names

I want to merge multiple excel files into one excel workbook. Each workbook/file has only one sheet. I want each sheet in the merged file, to be the name after the file it comes from. I do not ...
-1
votes
1answer
29 views

how to create a function that works same as microsoft excel sumproduct

I am trying to re-create excel sumproduct function in javascript but I am not fully able to do so as I do not exactly know how does it work for both multiplying sums of arrays and also providing ...
0
votes
0answers
34 views

Using .NET HashTable Return Type in VBA

I have created a .NET library in VB.NET and there is a function that returns an object of HashTable. I have been searching for how to access the elements in the HashTable object in Excel VBA but can'...
1
vote
1answer
17 views

How to find the nth last non-empty cell in a row, on another worksheet

I need to find the third last non-empty cell in a row, on another worksheet, and return its value in the current cell. I am able to obtain the second last non-empty value, but not the third last. I ...
0
votes
0answers
25 views

Powershell insert values from csv to an existing xslx

I have to read .csv files and insert those values inside an existing .xlsx Files. Unfortunately my Powershell skills are very low. I've used Google and created a verision which workes for me. The ...
0
votes
3answers
41 views

How to remove all duplicates from a column in excel using VBA only leaving rows that have no duplicate?

I'm trying to delete all duplicate values from a column of numbers in Excel. I want the remaining column to only contain unique values from the original table. I have tried using the ...
0
votes
1answer
31 views

Datetime.strftime() not modifying properly?

I'm trying to change the datetime objects in a list-of-lists to strings using strftime, but the conversion to string is acting confusingly. Specifically, I'm trying to format it as %H:%M I've parsed ...
2
votes
2answers
31 views

Pull two columns from Excel and append key value pairs to dictionary

My apologies if similar questions have been asked -- I dug through quite a few, but they did not match my specific issue. Basically, I have an Excel spreadsheet with 2 columns; Name and Email. I'm ...
0
votes
1answer
18 views

Trying to Download Images w/ Excel/VB, getting Compile Error: Sub or Function Not Defined (re: URLDownload)ToFile)

I'm trying to use an Excel Macro to download images from URLs into a folder. I got the below code from a successful answer to this question. Sub DownloadLinks() Dim ws As Worksheet Dim LastRow As ...
0
votes
1answer
9 views

Sorting Dates in Pivot Table Issues

I have a field called "Calendar Date" which has values that spans across 2 years. It is formatted as a Date with the "mm/dd/yyyy" format and the formula used to generate this is derived from =text(...
0
votes
2answers
24 views

Group by and sumproduct in Excel

I want to group by the values in one column based on another and then use the sumproduct (all in one formula, without additional column). Here is my example table. Unfortunately I don't know how to ...
0
votes
0answers
14 views

Edit PowerQuery connection with VBA in Excel 2016

I have an Excel workbook with a few pivot tables that take data from a csv file. I link the csv file by Data -> Get and transform -> New query -> From file -> CSV file, then locating the file which is ...
0
votes
0answers
16 views

how to sort date in a file such that the data in a linked file remains linked to the sorted data Excel VBA

I am trying to get data that is in file1 sorted into date order, and the data that is in the file which is linked to file 1 "moves" with it. testfile1 has 3 columns. Column A contains random order ...
0
votes
0answers
8 views

How can I create VBA for changing Excel PowerQuery source directory based on a designated cell value?

I have a database where there is the option to choose between workgroups and the roster of their personnel. My intention to use a drop menu to select which group (e.g. range name [TCReportingFor]). ...
-5
votes
0answers
37 views

Incorrect syntax near the keyword 'AS' at the beginning of my customer retention analysis script [on hold]

January_pool AS ( SELECT DISTINCT employee_num FROM [KFPAYROLL].[dbo].[tbl_loan] WHERE month(disbursed_date)=1 AND year(disbursed_date)=2019 AND Product = 'SAMA PAYROLL') SELECT Year(...
0
votes
1answer
26 views

Find and replace value in column with unique identifier in multiple sheets

Background: I have a file with two sheets (let's call them Sheet1 and Sheet2). In Sheet1, I have column A with unique identifiers and column B with some text. Sample data from Sheet1: A | B 1 | ...
0
votes
1answer
27 views

How do I not get Run-time error '13': Type mismatch while iterating rows?

I'm trying to go through a column and increment each value by one until it's empty but I get a run time error: Run-time error '13': Type mismatch Please help. Private Sub CommandButton1_Click() ...
0
votes
2answers
15 views

I want to save a selection as a new workbook but if the workbook already exists i want to save as a new worksheet within the existing workbook instead

I'm still fairly new to this. I want to be able to do the following: select a copy range paste selection in a new workbook save workbook in a folder with year value found in range H5 (if folder does ...
0
votes
0answers
8 views

Activex properties control in VBA

I want to manage Activex properties of many Activex controls on a worksheet (for instance image1.picture or other similar properties) through excel VBA code using OLEobjects or Shapes or any other ...
1
vote
4answers
32 views

VBA Syntax for Large Selection

I have a table which I regularly add data to on a daily basis. Sometimes a new data row is needed so I insert a new row. I then use VLOOKUPS on my table to insert the data for my columns. However, ...
-1
votes
0answers
14 views

Export to Excel with PHP

I'm loading a view in Codeigniter that I want to export into Excel. But after loading the table, I'm running a JS function that updates each last column of every row. Thing is that the last column ...
0
votes
1answer
15 views

Excel: CountIf RangeA is n units larger than Range B

I want to count the number of times values in RangeA exceed the values in RangeB by n units; only comparing values in the same row. =SUMPRODUCT(--(RangeA < RangeB)) works as a start, but I want ...
-2
votes
0answers
10 views

Need to extract specific info from multiple emails and send it to an excel file

I have 450+ emails I need to pull the first line of text and then 2 more additional lines of text and send that information to an excel sheet. I have no background in powershell and I am out of my ...
0
votes
1answer
10 views

Disabling specific userforms based on corresponding cells

I have a group of cells, A1:A5, that each have a corresponding combobox user form, combobox1-5. If any of these cells are empty, I need to disable their combobox. I'm sure I could do it with something ...