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.

Filter by
Sorted by
Tagged with
0
votes
0answers
5 views

How do I make a variable Range for Graphing in Excel

I have a range of daily values in Excel that I would like to create macros that can change the graph range to "Last Year", "Current Year", "Previous 6 Months", or "last month" I've looked around and ...
0
votes
0answers
6 views

VBA Macro timer as a function() instead of a sub() - losing the first variable

I'm attempting to clean up some recorded macros, and would like to test if my optimizations are actually speeding this up. I want to add a macro timer to test, but ideally I'd add it as a set of two ...
-2
votes
0answers
17 views

Is there a way to tell if Excel is still working or frozen?

I told Excel to copy down about 20 columns to 600,000 rows. Shortly after, it went to "Not responding," and it's been there for over three hours. I've seen it be "Not responding" before and then ...
0
votes
1answer
21 views

Mass email through outlook with a customizable body with signature included

I need to create a program that can mass email with a customizable body. The reason for this is that I need to send out a URL link to each recipient for a questionnaire they must fill out. This is ...
0
votes
1answer
18 views

How to recycle an Excel Pivot Chart?

I'm trying to reuse an Excel Pivot Chart to make similar charts from others Pivot Tables. Suppose I make a Pivot Chart A from a Pivot Table A and customize its colours and formats. After that, ...
2
votes
0answers
17 views

Save Pandas dataframe with numeric column as text in Excel

I am trying to export a Pandas dataframe to Excel where all columns are of text format. By default, the pandas.to_excel() function lets Excel decide the data type. Exporting a column with [1,2,'w'] ...
0
votes
0answers
23 views

Populate then Clear RTD Formulas

I'm trying to take a snapshot of 600+ different options quotes using my brokerage's RTD API, but they limit me to 100 requests at any one time. I have a Range of cells that the RTD formulas are ...
1
vote
1answer
20 views

Looping through ListBox to enter values into sheet array

I would like to find the cells (or Rows) in Column B, Sheet1, who have matching values placed into ListBox2. Then, I'd like to change the value of a cell 4 columns over (using an Offset command). I ...
0
votes
1answer
21 views

Vlookup in vba to find values between two worksheets

I'm trying to grab the values from a different worksheet and match them to the their sister data in my main sheet in column A but I'm having issues with getting the right results, I was thinking of ...
-1
votes
1answer
19 views

EXCEL listing out all numbers in a range?

Excel version 1907 Given the first column, i would like a function to produce the 2nd column 004-005 | (004|005) 006-007 | (006|007) 009 | (009) 010-046 | (010|011|012|013|014|015...045|046) ...
-1
votes
1answer
32 views

Do until i = the number of numbered cells in a specific sheet

I'm trying to execute a macro several times. I want to execute it based on the number of cells containing a number within a specific column on a specific sheet. I tried to write a do until loop, but ...
0
votes
1answer
21 views

How to Use an If Statement with a DataFrame from Excel file?

I'm playing with some data from an Excel file. I imported the file, made it into a dataframe, and now want to iterate over a column named 'Category' for certain keywords, fine them, and retun another ...
0
votes
1answer
14 views

Labeling last data points across multiple graphs and series

I'm currently trying to add a data label to only the last point of each series in each graph on a worksheet. I'm currently adapting one of the solutions proposed here: "https://superuser.com/questions/...
0
votes
0answers
8 views

Problems reading the results into the Excel file

I am working with OPL CPLEX 12.9.0 and my Problem is the following: I know the code how to implement data from excel into the model and how to export the results to excel. When exporting, all values ...
3
votes
2answers
32 views

Working with jagged arrays, printing sub-array to sheet, vba

Background: Was trying to come up with efficient ways to handle a large amount of tables on a single sheet and came across Jagged Arrays (herein "Jars"). To simply understand some basics of Jars, ...
1
vote
1answer
31 views

Dictionary to Dataframe Error: “If using all scalar values, you must pass an index”

Currently, I am using a for loop to read csv files from a folder. After reading the csv file, I am storing the data into one row of a dictionary. When I print the data types using "print(list_of_dfs....
0
votes
2answers
36 views

how to format 100 non-consecutive columns in a single shot in Excel

I'm using Excel from Office 365. I have a big spreadsheet with over 300 columns. Every third column is a percentage. For smaller files (10 columns), I highlight every third column and click the "...
0
votes
1answer
29 views

Laravel Excel file is not downloading to screen

I'm creating a Laravel project using the Maatwebsite Excel package. I have the following line in my Controller when user lands on this url: use Maatwebsite\Excel\Facades\Excel; public function ...
0
votes
1answer
20 views

Sending out bulk email with signature in Excel VBA

I am creating a vba code in excel for a bulk email with a signature. My code seems to work when I use .Display, but comes into error when I use .Send When I run my code with .Send I get a error box ...
2
votes
0answers
22 views

How to populate a 2-D array with member variables of a custom object and a specific format

I have been tasked with taking a massive list of IPs and comparing said list to all the the IPs in the many workgroups on our network. I have to format my data into an excel spreadsheet and, using ...
0
votes
0answers
20 views

Count Once Based on Criteria and Another Column [duplicate]

I am trying to create a formula that will count the number of "Overdue" people instead of "Overdue" cells. Each person has the multiple rows with their name in it. The criteria to determine if it's "...
0
votes
2answers
22 views

Use Power Query to grab top row of CSV files in a folder. Place in Excel

I would like to grab the first rows of all CSV files in a folder. I have read that power query would probably be best. I have gone to Excel > Data > Get Data > From Folder > OK. That has ...
0
votes
1answer
39 views

VBA Stop For/Next Statement at Certain Criteria

Image Edit: to help clarify, I'd like to be able to populate B2:B6 through VBA so I can copy paste section A2:B6 down. My problem is that next month I will lose the August section and only have Sep ...
0
votes
0answers
32 views

How to fix “The value isn't a single character string” in power query

I'm trying to make my power query macro to work with looping data so I need to replace filepaths and references with variables. Cell 37,1 has the location of the excel so the macro can run on ...
-5
votes
1answer
42 views

Auto Number Cells (1,2,3,etc) if the adjacent cell is not blank

I am new to VBA Excel and wondering if you can help. I have tried typing something similar to this =IF(C10,(ROW(A10)-ROW(A$9)),"") and it works. However, the downside to this is you have to enter ...
0
votes
0answers
4 views

How to remove individual count under subtotal in Excel pivot table on macos Excel 2016

I have a count of names. I get the subtotal which I want to keep, but would like to hide the "1" that is the individual count of the item. I already looked at: How to disable to remove individual ...
1
vote
1answer
32 views

How can I find and replace text in word using VBA?

I am using VBA to open a document in word. Once the document is open goal is to search for "InsuranceCompanyName" in the document and replace it with the company's name. I have tried wordDoc.Find....
0
votes
1answer
27 views

sheets stored in an array and paste them as values to new workbook, maintaining sheets' names and order

I'm trying to write this little macro to copy several sheets stored in an array and paste them as values to new workbook, maintaining sheets' names and order. I've found some solutions but not exactly ...
0
votes
1answer
31 views

How do I define a range as a variable to use as an argument of an excel worksheet function?

I'm trying to use the excel worksheet Forecast() function in my vba code. The Forecast() function requires two ranges as arguments. I want to use a changing range as the input to this function, so I ...
-2
votes
0answers
25 views

Concatenating rows according to colour codes [on hold]

I have a original pdf file with individual level information. When converting data from pdf into excel, some rows concerning the same individual were mistakenly broken into two rows (e.g. rows 13 &...
0
votes
0answers
22 views

Recursion with an array Error User-defined type not defined [on hold]

I'm trying to write in an Array to an existing recursion macro, and I continue to get a compile error because User - defined type not defined I broke out the array as a separate function because I ...
0
votes
0answers
19 views

Excel is made unreadable after writing new excel file

I am trying to take data from one excel file (a) to another (b). The two files are different templates, when I copy the data from (b) to (a), I then save (a) to a new file name (c) so that I can use (...
0
votes
0answers
33 views

I am creating a loop which goes through my data to then save it into an array to be used later for filtering purposes

I am automating a report, and the hierarchy is always subject to change. Since people who will be using this macro have no coding skills I have been creating a new report. But recently I got stuck on ...
0
votes
3answers
37 views

Highlighting row in one color and blank cell in other color

I am able to highlight blank cells in yellow but cannot figure out how to also highlight the entire row. The end goal is to have the row highlighted yellow and the blank cell show as red. Not sure if ...
1
vote
2answers
29 views

Search Button using VBA

This code suppose to be looking for keywords from another sheet. It works fine, but I have to type the exact work from other sheets. How can I improve it to make it only search for key words. For ...
1
vote
0answers
36 views

What is the right VBA to run this Python script on a Mac?

I've done a good amount of looking on Stack Overflow but no answer seems to answer my exact issue. I am trying to have a VBA script run on a mac that runs a Python script in the same folder but for ...
1
vote
0answers
12 views

How to show the chat icon for Excel desktop application?

According to Microsoft Help: Enhance collaboration with Chat in Microsoft Office. I would expect to see the chat icon for Excel Desktop application, but I don't: I am using Microsoft Office 3654 ...
2
votes
1answer
67 views

How can I use VBA macros to open a word document and then fill in information in the document?

I have an excel sheet that has information for faxing in rows. I need to loop through the rows of that sheet, and grab the correct document on each row (that is a template). Once open I need to find ...
2
votes
0answers
25 views

Excel 2016 VBA FilePicker - Code to add Folders to Quick Access Group on Navigation Pane

I can't find a way to add links of folders (network ones) to the "Quick Access" group in the Navigation Pane of Excel 2016's File or Folder Picker. I create a File or Folder Picker in VBA, then I ...
0
votes
0answers
20 views

VBA - Results of distVincenty() into Variable

I am writing some code to calculate geological distances. Therefore I use the public function distVincenty() you can find here.... https://www.contextures.com/excellatitudelongitude.html It works ...
0
votes
2answers
48 views

How to add multiple rows in a DataFrame

I have one excel sheet which having 5 different column. As you can see in this excel in Testcase column there are multiple similar values with version in the end like (TC_008_035-01, here 01 is the ...
1
vote
2answers
17 views

how to rename sheet name different from file name

I have some vba to create a new workbook with a sheet name of "SheetName", data is then transferred to the new sheet and savedas with a file name and saved as CSV format The file name is copying over ...
0
votes
0answers
25 views

How to referance closed workbook's range to data validation

How can I add a validation list by VBA code that will refer to another CLOSED workbook range? I cannot do this Formula1:="=INDEX('C:\...)" ? I can manage with: With ThisWorkbook.Sheets("sertifika")...
0
votes
0answers
40 views

Which line code compare strings between column? [on hold]

I have a table consisting of 12 columns, only to compare 6 columns with another 6. But from my understanding, the code finds the unique value between first and the last column, however it works ...
0
votes
0answers
21 views

VBA Replace From Excel to Word

I am using VBA codeI picked up online to essentially input a couple of sections and have Excel then edit a Word template, replacing <oaccount> for the inputted account number and <date> ...
-1
votes
0answers
27 views

What is wrong in considering an Excel table as a normal worksheet i.e. column and rows grid in VBA?

I am trying to write some Subs that operate on Excel tables. I don't need to modify the tables, only read or copy data from it. The vba syntax for tables differs from the normal worksheet and cell ...
0
votes
2answers
18 views

Date Formatting errors with tabs

i pull a date off a worksheet and paste it several places and use it to name a new tab. Dim weD As Long 'Paste timesheet Worksheets("calc").Range("B4").PasteSpecial 'Set week ending date variable ...
0
votes
0answers
18 views

Can't execute coloring script of bars in graph excel vba

I've code thats coloring bars in a graph based on some condition. However this code wont run if a value is zero. Tried to include "On error resume next" but then it's neglects all bars after this zero ...
0
votes
1answer
19 views

Excel : using VLOOKUP to aggregate several values

I am doing quotations in Excel for my company and I am trying to find a way to do 2 things: aggregate several quantities of the same product based on its reference number return several values for ...
0
votes
0answers
15 views

Finding minimal value in excel

I have 5 lists in an excel file: A2:A448,B2:B448,...,E2:E448 The lists contain positive numbers. I would like to be able to insert two numbers, let's say in cells I4,J4 Then, I want to find the row ...