Excel-VBA (Visual Basic for Applications for Microsoft Excel) is the dominant programming language for Microsoft Office Excel. It is an event-driven and object-oriented programming language for writing macros for Microsoft Office applications like Excel.

learn more… | top users | synonyms (1)

0
votes
0answers
14 views

How to add a Timestamp to the end of a preselected row

So I'm working in VB and I've hit a seemingly simple issue... I can't for the life of me figure out how to add a timestamp. So The current code takes the row from the current worksheet we'll say from ...
0
votes
1answer
6 views

Naming a chart with a cell value from the active sheet

I've got several sheets in a workbook. Each sheet contains test results with identical formatting. I would like to create a macro that creates a chart in each sheet that plots data from only that ...
0
votes
2answers
7 views

Fill in next blank cell in row - VBA Beginner

There is a column of values with blank cells in between: 20 Blank 30 10 Blank I want to copy this column into a new column in ascending order with the blank cells removed. Then I need to count how ...
0
votes
0answers
7 views

How to use a button in VBA Excel to copy a row, and paste to a new sheet?

So I have tried searching other questions, I have found similar ones for pasting to the next row on a new sheet, but I can never get them to work. What I am making is an inventory tracking sheet. "...
0
votes
1answer
8 views

Use VBA to list all URL address of a web page

I used the below code for loading the web site http://www.flashscore.com/soccer/england/premier-league/results/. After I found and click on the "Show more matches" link, all the football matches are ...
0
votes
3answers
25 views

counting multiple instances of a number in a range

I have a range of numbers and I need to identify if the first number of each cell is repeated anywhere in the corresponding row. For example, in row 2 below, column 2 and column 3 both start with a ...
-1
votes
1answer
19 views

How can I load more results on a web page using VBA?

I want to use VBA for load more results in the below link: http://www.flashscore.com/soccer/england/premier-league/results/ First load of the page shows me only half of the total results, but I want ...
0
votes
1answer
16 views

Excel VBA - Multiple buttons pointing to same event

I am currently working on some excel document to automate it as much as possible. For this I have to add the same button (let's call it an Erase All button for example) in each of the sheets. Till ...
1
vote
1answer
17 views

Getting a loop to stop printing in VBA

I'm quite new to VBA and very rusty from java and C++ years ago, so any help is appreciated. At an overview I am trying to make this program find a number and interpret the month into a sheet number ...
0
votes
1answer
38 views

How do you generate custom rows in excel without VB?

I am trying to auto generate manual orders for import. Can this be done in excel without VB? I am gathering subscription orders on sheet 1, and since it is a physical product being shipped I need to ...
-1
votes
0answers
8 views

Exporting multiple test set in a separate excel sheet from ALM to excel using vba

I have completed coding for exporting all test set which is present in test lab folder in single excel sheet. But I want to export each test set in separate excel sheet. Please help me on this. ...
0
votes
0answers
23 views

Highlight specific rows in table according to condition

I am trying make this macro works. It supposed to highlight rows in a table according to the condition. When I try to offset the selected range, so only the cells within the table get highlighted. But ...
2
votes
2answers
26 views

VBA Error: This key is already associated with an element of this collection

I use the code below to make a collection from a range in excel that is then used to populate a list box on a userform. Code has been working fine for months in two separate macros but suddenly both ...
0
votes
0answers
28 views

How to include multiple columns in a select case statement

I have made a select case statement that I use in a combobox. Please refer below for code. However in the example provided I am only able to use one column at a time I have tried a couple of things ...
0
votes
2answers
12 views

Excel - jump to a specific column according to today's date using VBA

I try to adjust the cursor to the matching date column of an excel worksheet. It seems to me that all the 'Find' or 'Match' functions not working correctly. I´m using Excel 2007. The Date values ...
-1
votes
1answer
33 views

VBA not formatting tables as intended

Hello all I have inherited this VBA which is currently returning me two errors: 1) Run-time error '91': Object variable or With block variable not set 2) Run-time error '1004': Method 'Offset' of ...
1
vote
2answers
36 views

Fast Way to Normalize Data with VBA (Excel)

I'm currently trying to normalize data with VBA in Excel. Therefore, my workbook imports several csv files and wrote them in different worksheets all of them are built like this. First row: Header ...
-3
votes
0answers
13 views

I want to copy the contents which have some values from multiple worksheets on same excel and paste it in to outlook [on hold]

I want to copy the contents from multiple worksheets on same excel and paste it in to outlook in seperate sheet order (see the image) copy the coloums and rows which have contains any values not ...
2
votes
0answers
31 views

How can I dynamically add YES or NO CheckBoxes to a UserForm?

I’m loading a Useform, dynamically, in the following way. Sub UserForm_Initialize() With Worksheets("SetupQuestions") Lrow = Worksheets("SetupQuestions").Cells(Rows.Count, 1).End(xlUp)....
0
votes
0answers
24 views

Why doesn't this delete every row?

I've found a workaround code for what I am trying to do by filtering and deleting but to better my lack of knowledge in VBA I would like to understand why this macro isn't working as I intend it to. ...
0
votes
1answer
21 views

Searching for partial text in vba

I have the below VBA code that searches for the exact text in a colum: Filter3InSummary = Array(Array("AE43", "TT", "I:I", "<>Duplicate TT", _ "G:G", "&...
0
votes
1answer
20 views

Excel VBA Putting text from a file into a worksheet

What I want is: To have the data inside the notepad, copied into the worksheet (starting on range A1). What I tried: Sub Test() Dim testfile, textline testfile = Application.GetOpenFilename() Open ...
1
vote
1answer
26 views

vba start stop timers?

I want to start and stop two timers in my excel worksheet. This is what i have: When worksheet is opened, this module is triggered: Sub SetOpenTimer() OpenTimer = Now + TimeValue("00:00:10") ...
0
votes
0answers
24 views

VBA Run-Time Error 1004: Range(“ ”).Formula Code

When executing the below code, I receive the Run-Time Error 1004 "Application-defined or object-defined error". I'm not sure what is causing the error. I use the below Range.Formula code often and ...
-1
votes
1answer
15 views

VBA Excel find a select specific cell with vba

Sorry, I am not the best at VBA and i already tried to find the solution in the internet. I have for every project (more than 200) an excel sheet that changes depending on the duration (the duration ...
0
votes
1answer
30 views

Combinatorics - Two sets in Excel Spreadsheet

Hard to explain this, but I will give it a go as I am stuck. I am using NodeXL to look at the relationships in a dataset. Essentially I have some Topics and then Subtopics of those Topics, and I need ...
0
votes
1answer
37 views

function run on the immediate window but not on cell sheet

Can somebody help me to understand where is the problem, I want simply the value from each carrier from end of any month. The loop method is not a problem, this is my function: Function Tmese (c As ...
0
votes
0answers
19 views

How to categorise a column in excel based on another column that contains value in string separated by semicolons

I have the following spreadsheet on the image (please click on link below for image): Raw data and categorised data Suppose I have the raw data Name B4:B11 and Interests C4:C11. My question is I ...
0
votes
0answers
20 views

Reactivate AutoFilter with specific filtering options [duplicate]

For an Excel macro to work properly I need to show all currently filtered entries, which I do with: ActiveSheet.ShowAllData After the code has run I would like to reenable the precise filtering ...
2
votes
1answer
26 views

Extract data from website as separate fields

I am trying to use excel to scrap some information from a website. This is what shows on source: <tr class="even"> <td align="right">1</td> <td><a href="/kld/en/1....
-1
votes
1answer
30 views

Excel search for text values in given column [on hold]

I want to be able to search for a given text string in column C and then copy all rows containing those values, to be pasted into a different work sheet. The last part I can do myself but not the ...
0
votes
3answers
26 views

Streamlining a Select Case

I am still rather new to VBA but after a bit of research i have manged to build the below select case. I would like to hide/unhide the number of rows specified in a cell. I currently have a select ...
-1
votes
0answers
19 views

VBA, Excel and the Internet Explorer 11 download confirmation

Environment: Windows 10, Office 365, Internet Explorer 11 Plan: I'm writing an Excel makro to automatical download some files from a webpage. Steps so far: I navigate to the webpage. This webpage ...
0
votes
0answers
37 views

Excel crashes without errors or indication why when running simple VBA code?

Excel has started crashing without any explanation and the code has worked previously so I am not exactly sure why it is constantly crashing now. It isn't even that much code or very complex. I am ...
-3
votes
1answer
57 views

Learning VBA Variables

I hope you are all well and had a great holiday season. I was wondering if anyone can help me. I would like to know how to add a new variable to the code below that I am using for a holiday request ...
2
votes
0answers
34 views

ListBox populate based on ComboBox - different data structure

Into tab "setting" I have sheets list generated automatically: Column format: sheets with format A looks the same, contains only diffrent values and all with format B looks also the same, contains ...
-2
votes
0answers
17 views

Pasting data as per Search/Find Criteria

I'm trying to enter data based on a search criteria. Search criteria is Today's date and then paste data (which has been copied from a different sheet) into the next cell after the date. Here is my ...
0
votes
0answers
33 views

Converting excel formulas to their number value VBA

Worksheets("Risk Plan").Range("U2:U800").FormulaR1C1 = "=IFERROR(IF(RC[-1]<=0,"" "",(RC[-1]/RC[-2])*100),"" "")" Worksheets("Risk Plan").Range("V2:V800").FormulaR1C1 = "=IF(RC[-1]<>"" "",(IF(...
0
votes
1answer
19 views

Vba days in week in another week

Currently I have this: Now() - Weekday(Now(), vbMonday) + 1 The problem is, if I use a different week, the same date still shows. I have a dropdownlist that shows me the days from the week I ...
0
votes
0answers
24 views

VBA Password recovery for 64 bit OS - without external software [duplicate]

How can I reset password of excel VBA automation which have been forgotten by me? And also I am working on 64 bit OS. And please make note that I don't have permissions to download any application ...
0
votes
1answer
15 views

Compile Error When Creating a Submit Button in VBA/Excel 2016

I am trying to create a submit button in Excel 2016 using a macro with the below code Sub Submitbutton14_Click() Dim x As Outlook.Application Dim y As Outlook.MailItem Set x = CreateObject("Outlook....
0
votes
2answers
34 views

Connect Sap Through Excel VBA

Can someone help me to guide if we connect to SAP using excel vba. I have no direct sap installed on my machine and using SAP window through below link. https://nedc-ctx.applications.services.axa-...
0
votes
0answers
41 views

Array manipulation with multiple Workbooks

I have a macro that gets information from source workbooks, uses a vlookup to find the correct items and pastes it to a final workbook with all information. Each source workbook represent one day, ...
0
votes
1answer
24 views

Autoclose Excel Workbook with warning popup

I have a situation where multiple users will need to access a workbook (want to avoid using the 'Share Workbook' option due to all the problems). I've determined that a possible solution to this is to ...
1
vote
3answers
33 views

Override VBA's Now() function

Is there a way to override Now() in VBA for testing purposes? Something like this here - What's a good way to overwrite DateTime.Now during testing?, but for VBA. Thus, I would need Now() to ...
0
votes
0answers
12 views

Excel VBA Attach File to Outlook By knowing the Prefix of File

I am trying to create a Macro to send attachment to customer. Basically, the user needs to input the customer name to get the e-mail address and the file number as a reference to look for the correct ...
1
vote
1answer
17 views

Excel VBA. Add 1 year to existing cell

Been stuck for a while. I hope someone can help me with my current issue, and point me to why I'm having error Object Required 424 error Here is the sheet I'm working on, and here is my current ...
0
votes
2answers
57 views

VBA Speeding up Code

Coming back from the holidays I find myself quite motivated to speed up the VBA Code I wrote last year. The basic data is a list of measures the company did or wants to do. My job was to create a ...
0
votes
1answer
29 views

Reset of Public variable to zero when it goes to Other Sub routine in same module

I have a public variable num which is a sheet number, Input is given via inputbox from a sub routine named segment2(), When program runs through other sub named segment2splitting() in same module , ...
0
votes
0answers
10 views

Insert loaded image picture to active cell

I have problem to insert loaded image from image control excel vba to designated cells. Here I would like to use 2 different buttons which is: 1. To open file and upload to image control, and 1 other ...