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
7 views

Reference a cell on a newly created worksheet with user created name

I am very new to this so apologies if its something simple but hopefully someone can help. I have an input box to add a new person to a table. This then copies a template and is renamed to the persons ...
0
votes
0answers
11 views

How to add an Excel formula to an entire column using MATLAB

I am trying to summarize an excel sheet and introduce a formula which calculates the value for entire column in excel using matlab. for example: I create this list in excel from matlab: from this ...
0
votes
0answers
9 views

How to product two textboxes that are their number format is different?

I have trying to product two Textboxes one of is percentage number format and the other is accounting number format and when I click the button their product look on the third textbox.Here is my code ...
-4
votes
0answers
26 views

How can I extract just domain name from google search? [on hold]

How can I extract just domain name from google search? example: for example my keyword for search is: cctv and google show a list of URL result. i need just domain name of the result.
0
votes
0answers
11 views

If value exist in excel overwrite, else add to new empty row

I have a user input datagridview cells. When the button is click, it will export all data into excel. However, I would like it to search a value in a specific datagridview column and compare it to a ...
0
votes
1answer
8 views

Excel VBA Vlookup return error 2042 even if using IsError

The following code is not working. I get a 2042 error for my VLOOKUP function, however whatever I do I cannot solve it. I have been using if ISERROR and it still does not catch it properly ...
0
votes
1answer
12 views

VBA: Get value from dictionary

I tried using dictionaries in VBA. Microsoft Scripting Runtime is activated and I managed to fill it with the data I want (the For Each loop shows me as much). But then I didn't get any further Sub ...
-3
votes
0answers
22 views

paste data using do while with if condition

i have a table with names and their numeric values. i want to paste them in another sheet without formatting them but with the condition that the numeric value is not zero.
0
votes
0answers
15 views

Code not working properly when filter applied

I have created a usrform in VBA that allows the user to input data, retrieve it and modify or delete it without needing to look at the worksheet. Most of it's working fine but there is one issue with ...
0
votes
0answers
19 views

Excel formula to find a number within a range of numbers

EDIT, in short: I have an excel table that looks like this: tabel Each cell contains a range of numbers. I'm looking for a function that can search for a number in the whole table and indicate me ...
0
votes
1answer
20 views

How to create a warning message in Excel when must-field is empty

I have a table where column F is Name and column H is Age. When F9 is filled, I want H9 to become automatically a must-field. If I filled in cell F9 and did not fill in cell H9, a message is ...
1
vote
0answers
13 views

Excel UserForm size related to screen scaling

Is there any way to scale UserForm according to screen scaling? This code works for screen resolution, but it does not recognize screen scaling: With Me .StartUpPosition = 1 .Width = ...
-2
votes
1answer
18 views

InStrRev function cannot takens into consideration the “ ” space whatever the [compare ] argument is

InStrRev has something wrong. In file name actually gives the position from the beginning and not as it should be. CODE path = Left(f1.path, Len(f1.path) - (InStrRev(f1.path, "\", -1, vbTextCompare) +...
0
votes
0answers
9 views

How to compare file names in a directory and return matching names in excel VBA

I'm trying to write a VBA code for a macro that merges a .pptx file and an .xlsx file in a specific way. I already worked out how to code the merging part. However I have a directory with hundreds of ...
0
votes
1answer
27 views

Reading specific column from excel file using pandas

I have a folder with full of excel files and subfolders.Subfolders also contain excel files. Using os.walk() i have been able to go through each subfolder and get the data from that excel file.My ...
0
votes
0answers
11 views

Error handling with XMLHTTP on link not existing

I use XMLHTTP to connect to a API of a webserver and retrieve some data. I connect to a http url so I can access from every position, but I want to do that when I am in office, if there is no internet ...
0
votes
1answer
19 views

How to ignore the cell if it is already highlighted with green color

I have a requirement to match the title from one workbook sheet 1 to another workbook sheet 1 .If the title matches then need to change particular cell color to green and if it is a partial match ...
0
votes
1answer
18 views

How can I merge the text with the same column names using the Excel formula?

I want to use the Excel the formula, which merge the values if the column name the same, for example: ColumnHi ColumnHi ColumnHi ColumnOa a ...
1
vote
1answer
20 views

Macro to automate the next month and year based on previous sheet

I'm working on a macro tasked to copy & paste a hidden sheet, enter month and year in a specific cell (based on entered value from previous sheet. I'm currently having issues doing this as the ...
0
votes
2answers
19 views

Transpose rows to columns on irregular and inconsistent data

I have to transpose rows to columns in excel using vba and the data is of around 500000. The problem is that the data is not regular and is consistent. Like there will be 4 rows then a blank then it ...
0
votes
2answers
19 views

How do you jump to back to a specific worksheet?

So I wrote a makro, which inserts a new Column in every worksheet except the first. It works just fine. My only problem is, that I would like it to jump back to the sheet I started at after finishing ...
0
votes
0answers
32 views

Why Apache poi returns empty excel file when running project on server?

In my project I am using apache-poi to let the user download excel representation of some data stored in database (kind of a report). When testing locally everything works fine. When running on server,...
0
votes
0answers
10 views

Can't fetch the values from an excel file

I have already uploaded an excel file into my local directory but can't fetch the values from that excel file. String realPath1 = sc1.getRealPath("serverPath.properties"); FileInputStream fis = new ...
0
votes
1answer
15 views

How to enter a number textbox between 10-50 as a percentage format in vba userforms?

I am trying to do give limitations a textbox between 10-50 and it have to be in percentage number format.However, when i tried this code below it sends message box to every number what i have entered....
0
votes
1answer
19 views

Open file which do not have standard name

Suppose, we have one folder with only one macro file and every day we are saving excel file in the same folder received via mail. However, filename every day will get changed. I mean to say what ever ...
1
vote
4answers
26 views

Excel Macro VBA shorten text

I have some VBA code working but would like to know if there is an easier way of coding this. I have a list of 100 unique values and want to assign a category to each of the values and write the ...
1
vote
0answers
15 views

Is there a way to do a random draw with filters?

I am trying to create a random draw for employee performance reviews and need to filter the employees by shift and day ex: only employees who work Monday Swing shift I have used the =INDEX($A:$A,...
0
votes
1answer
21 views

Remove duplicates and alert user with VBA

I am important data using a soap call, my problem is that under certain circumstances I may end up with duplicate data. I can easily remove this data using WS.Range("A6:O200").RemoveDuplicates ...
0
votes
1answer
51 views

Excel process cannot closing after import file C# [duplicate]

why I cannot import file Excel if I use Server.MapPath to save file Upload If I user absolute path so I can Import file Excel easier than MapPath But also I cannot close the Excel processing. string ...
0
votes
0answers
19 views

“Variable not Define” error in JsonConverter when executing in VBA

I would like to ask for your help regarding on my code, I am trying to convert Excel into Json file and I am having/encountering error variable is not define,Can someone tell me what is missing, may ...
3
votes
0answers
55 views

if cell value changes, then copy only that column from which cell value changed, to another worksheet,but against common value in both the sheets

I do have Excel sheet in which I have inserted IF formula, i.e.=IF(C23='Data Nifty'!$AD$2,"CMP"," ") use of erlier derived "CMP" as above mentioned, is done in another condition i.e. =IF(A23="CMP",...
0
votes
1answer
24 views

Counter for graphs in VBA

Im working on a code in the userform in the vba. For this, i have to plot a graph multiple times with the data i aquired online. But the graph ploted many times should be the same. So how do i call ...
0
votes
0answers
28 views

How can I apply multiple conditions to decide what values are written from an array to a target destination?

In an effort to streamline my efforts for a data transfer macro, I have moved to arrays. I have limited experience with them, let alone vba. But I was able to build it, and have it write. The last ...
0
votes
2answers
15 views

VBA to save a Sheet as CSV breaks existing module

I am trying to build a VBA sub that will copy a sheet and save it as a CSV. I am using the tried and true method of: 1) Copying the sheet 2) Opening a new workbook 3) Pasting the copied data into ...
0
votes
0answers
14 views

Copy charts from (.xls or .xlsx) using PHP

I am working on a template excel file for some projects and my goal is to populate it with PHP. I create an excel document with two sheets, one is a table with all of the information that I am going ...
1
vote
1answer
26 views

How to unlock blank cells in workbook with VBA on open

I have a workbook with multiple sheets that needs all non-blank cells to be locked and protected when opening the workbook. This will be an employee training record where multiple trainers will be ...
0
votes
1answer
21 views

Excel Active-X button cannot be clicked

I have a button that should be clickable in excel. When I try to click it, nothing happens. I have noticed that if I click and hold the mouse in the lower right hand corner, a second button appears. ...
0
votes
0answers
9 views

PivotFilters.add no longer working in my spreadsheet

This code has always worked in the past. Nothing has changed in the workbook and I have verified that all referenced data is formatted correctly. Any idea what would have "broken" this? It no ...
0
votes
0answers
26 views

Why do blank lines appear after multi-level sorting?

I have a macro that sorts by color, then by date, then again by date. If I delete a date, instead of just re-sorting, it re sorts and then leaves blank rows where the row from which a date was ...
0
votes
0answers
25 views

How to make a triple cascading combobox in VBA

I am trying to create three cascading comboboxes (the third dependent from the second, the second from the first). I have found a way to create and populate the first two, but I am struggling with the ...
0
votes
1answer
17 views

Copying a visio page and pasting it in excel as an image

I'm trying to copy all shapes in a visio page and paste it in Excel as an image. The image should be a close replica of the visio drawing. Looking for Excel vba script to do this. I'm able to open ...
0
votes
0answers
15 views

How to delete special characters in named range or using vba to create named ranges without special characters

How do I delete named ranges with special character. Or prevent my vba from creating named range with special character? My goal is to duplicate a sheet (eg Sheet A) that contains name ranges to ...
0
votes
1answer
20 views

How to Loop Multiple TextBoxes to set Transparency

I am trying to set transparency levels to 60% on multiple textboxes using VBA. I am using the following code to loop TextBox 100 - 149, when executing I encounter a runtime error The item with the ...
0
votes
0answers
18 views

How can I insert into an HTML body an embeded image object within the same excel file

I build a VBA code which is running great actually. However, I'm wondering how can I insert an image object into my email body. Currently, the HTML body is getting the image object from my desktop....
0
votes
0answers
23 views

Innertext not picking up changes to webpage

I am trying to pull data from a webpage created in ASP.NET maker. The page is basically a large table. When I make changes to the table, the changes appear on the page and in the html code. The ...
1
vote
2answers
18 views

INDEX/MATCH multiple criteria

I am making up a tab with data ordered vertical, and need to index and match with another tab where the data is ordered horizontal. I have tried to do a tutorial on this, and it seemed do-able. I ...
-1
votes
1answer
21 views

Finding duplicate data in two different columns in two different excel files vb.net

my code highlights duplicate values within the two columns in two different based on the rows. its somehow unable to find duplicate vales if the column order is changed. suggestions? Public Sub ...
0
votes
0answers
27 views

How should I create graphs in Excel using VBA?

I am making a report on Excel that will create graphs for the user based on data entered into the spreadsheet. I am quite new to VBA and, whilst I think I'm getting the hang of some basic expressions ...
0
votes
1answer
16 views

Copy Column and Paste in different sheet starting at row 15 then every 87th row after

I am trying to copy a column (Sheet 2, range("A6:A70") and paste in Sheet 1. I want the value in Sheet 2 A6 to paste in Sheet 1 A15, then the value in Sheet 2 A7 to paste 87 rows below A 15, and so on ...
0
votes
0answers
20 views

Covert excel to json using python

I am a rookie programmer and new to the community. I am trying to read data from an Excel file and convert the contents of the file into a JSON format. I know there have been questions about this sort ...

http://mssss.yulina-kosm.ru