Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [vba]

Visual Basic for Applications; a subset of Visual Basic used in all Microsoft Office applications. Consider using this tag together with the tag for the specific application in question. Good questions on VBA generally contain some code and asks for solution of specific issues. Questions asking ...

0
votes
0answers
6 views

VBA POWERSHELL EXEC Runtime error : system can not find the specified file

i am trying to run a few powershellscript from vba excel , it was working fine . But now am getting error of system can not find the file . Sub Button1_Click() strCommand = "Powershell -File ""C:\...
0
votes
0answers
6 views

How to make a MACRO remove all page break in even pages in the document in word? [on hold]

I know how to delete all page breaks in word using VBA. I am asking about how to delete page breaks in even pages or in odd pages and leave the others. thanks
0
votes
2answers
27 views

I need to compare one cell (A1) with Group of Cells (C1:L10) if any one the cell is equal with A1 then It automatically increment the M1 cell

Actually what I am going to do is. " I need to compare one cell (A1) with Group of Cells (C1:L10) if any one the cell is equal with A1 then It automatically increment the M1 cell "
0
votes
1answer
11 views

Unexpected Results in Referencing another worksheet indirectly

I'm not getting the expected reference result in the following Scenario Can someone please explain this. Create a workbook with 2 x WorkSheets , Sheet1 & Sheet2 Populate Sheet2 Col A1 Down ...
2
votes
1answer
38 views

Copying a range using Combo Box criteria

I'm trying to copy a range that meets two criteria from two combo boxes on a user form. ComboBox1 contains criteria 1, the Branch. ComboBox2 contains criteria 2, the Quarter. Column A needs to match ...
-1
votes
0answers
15 views

Powerpoint VBA combine pptx files into one on SharePoint 2013 [on hold]

I used the code from an earlier post in March 2016 and it worked on my computer hard drive, but when I copied the ppt files to a share point folder I get an error on this line: sTemp = Dir$(sDirectory ...
0
votes
0answers
24 views

VBA - Excel Stops Responding - Table Applied to Whole Sheet?

I have a button that calls many separate macros. Everything works as expected, but with 1 exception. I need to input a formula in row 2 of four separate columns and have the formulas drag down to the ...
0
votes
1answer
23 views

Add todays date when opening saved email template

I want to add a message and the date when ever I open an email template I have saved. I could only manage to get to the below bit of code: Private Sub adddate() .Item.Subject = "Prep Status ...
-1
votes
0answers
24 views

comparing a cell (A1) with multiple cells and make C1 as vale +1 [closed]

I would like to compare one cell A1 with group of cell (10x10 Table) and make B1 cell must auto increment. let me know hot to do this with Excel VBA. Thanks In Advance!!!!
1
vote
1answer
32 views

Is the 64kb size limit to modules corrupting macros for excel 365?

I'm having random macro corruptions where I can't open the workbook. I would have to disable all macro without notifications then open the workbook and recompile the macros, save close. Then enabled ...
2
votes
1answer
26 views

Delete all rows not containing xxxx

I found and modified the below code to remove all rows that don't contain "NHO_Global" in column F, but it deletes everything (it does leave the header row, though). What did I do wrong and how can I ...
0
votes
0answers
20 views

See who last changed category color on outlook email

Here is the situation. Someone at work in a shared inbox keeps changing the category on incoming email to a specific color. For this shared inbox those colors represent the employee who has picked up ...
-2
votes
1answer
26 views

Splitting data in the same category to a new workbook [on hold]

I need to split data for each country into a new workbook with the headers as well. as the countries have different number of rows, how can I split according to the country. Also, sometimes there are ...
0
votes
1answer
24 views

Extract Unique Substring from Range of Excel

I have cell values with names that are fairly close to each other. I would like to extract a common sub-string. Here is an example. 1100_250_Jump_12HR_100MD_S_run1 1100_250_Jump_12HR_100MD_S_run2 ...
0
votes
1answer
30 views

Removing rows in an excel worksheet if duplicate is found in another worksheet

I have two worksheets: "compiled" and "firstpickup". What I'm looking to do is delete rows in the sheet "firstpickup" if the value in column A can also be found in column A of "compiled". "compiled" ...
0
votes
0answers
14 views

Import just one cell of this table [closed]

I have find the solution to extract table of the website, But i am stuck to draw one cell instead whole table. Help me. Here is the code. Public Sub GetTable() Dim sResponse As String, html As ...
0
votes
1answer
35 views

MS Excel VBA to Export to PDF Terminates Suddenly and forces computer to reboot

I have some VBA code (see below) that basically prints named ranges in an excel file to PDF. I have command buttons for each macro and It works fine, but when i'm printing them sequentially you (...
0
votes
1answer
61 views

Change a macro that only works if the range starts with an A1 or T1 etc. cell

I have a macro that works but I would like to change the cell range from Set SearchRange = Range("E1:E12") to Set SearchRange = Range("A21:A32") I have made the change in the code but it won’t ...
0
votes
0answers
19 views

Lock Cells Based on Conditionally Formatted Interior Color

I am working on a project that requires locked cells based on how the cells are conditionally formatted. In this instance the conditionally formatted cells have interior color 15. This is the rule ...
0
votes
1answer
18 views

Data extraction from hyperlinked workbooks

I have hundreds of different workbooks to work with and extract certain data from them and summarize these data in a separate workbook. This overview workbook contains hyperlinks to the single ...
0
votes
2answers
47 views

VBA Error: Out of stack space

I have a very simple macro in an Excel sheet, to allows users to recalculate. I have no other macros/code in the workbook, and only this work book open Sub Calculate() Calculate End Sub This is ...
0
votes
1answer
28 views

VBA - Create and save to folder according to date

I need to do a couple of things that seem to be easy, but I'm having a hard time figuring out how to implement. I need to create a folder using today's date. That part's fine. Then I need to save a ...
0
votes
1answer
49 views

Excel dynamic search vba code

With this VBA macro for Excel I get instant search filter when I type the whole word, but I want it as follows: when I type O for opel, that I get opel already showing. This is the code: Sub ...
0
votes
1answer
26 views

How to Filter Data Based off Cell Value

I am trying to filter my data based off of a cell value. My data will be a large range for 12 months. So far I am able to filter only one month, I cannot figure out how to filter all 12 months based ...
0
votes
0answers
36 views

Importing txt-values from FTP

I'm trying to get text in a .txt from an FTP which i want into excel, this is what i got from our supplier support so far: Make a file named GetFromFTP.bat with this in it. echo off c: cd\import ftp ...
3
votes
1answer
280 views

MS Access - Grouped query based on MAX field

I am trying to build a SQL Query that takes the following data: +-------------+--------+---------+---------+--------+ | Primary Key | ID | Version | Class | Fruit? | +-------------+--------+----...
0
votes
0answers
21 views

VBA - Assigning Macro to Form Control Button

I wrote the below code in VBA to delete full rows if, in column U of Sheet21 (actually named "ROG Registration") if "Self Cancelled" or "Waitlisted" appear. When I'm on the ROG Registration tab with ...
0
votes
0answers
24 views

Excel VBA: Condition to skip in a counter if criteria is met

I have a piece of code and I would like to improve it by adding a criteria to my counters. The current code works like this: I have a target book where I insert the other workbooks where I want to ...
0
votes
0answers
20 views

display the message box and sound simultaneously - VBA

In the code below, the song is played first, after which the message is displayed. How to display the Message Box and Sound Play simultaneously in the code below? Private Declare PtrSafe Function ...
1
vote
0answers
54 views

How do I create a dynamic range using calculated cell references?

I'm struggling since I'm not the best with working out the most efficient way to do these things. Check the following: "First row with data: 10". Calculated by a formula that looks for the first ...
0
votes
0answers
28 views

VBA - Filling sequence from 1 to N

I'm not sure the title is clear, but essentially what I need is to automate the assignation of sites. The number of rows is usually around 60, but could go up to 200. The assignation of site number ...
0
votes
1answer
48 views

Find value from drop down on table and compare columns then list differences

I have tried coding this myself with no luck whatsoever (I am a novice). We have a worksheet that contains lists of users, their job titles and roles assigned to them within certain systems. What ...
0
votes
1answer
51 views

14 digit Hex to decimal in Excel

I have 14 digit Hexadecimal numbers in Excel which I want to convert to a decimal number. For example in C2 the number is 0438E96A095180 and that has to be 1188475064373632 in decimal. I have tried ...
0
votes
0answers
20 views

How to fix vba cannot find installable isam error

I have a connection string that uploads a range of cells to my sharepoint list. Today someone was unable to use this feature and received an error when running the macro. The error was Cannot Find ...
0
votes
1answer
47 views

Excel VBA index match a csv import

How can I use an index match function in VBA to find values in a CSV file then import those values to the matched index in a cell in Excel? Say I have a CSV file which contains the following comma ...
0
votes
1answer
72 views

VBA code needed to clear contents of cell AQ when value of cell D changes; Microsoft Excel for Office 365 MSO 32-bit

I'll preface this by saying that programming is not my strong suit but I would appreciate any help. I have used the below formula in an attempt to clear the contents of cell AQ when the value of cell ...
0
votes
1answer
47 views

Counting how often two different values appear with the same value in the neighbouring cell

I have an excel spreadsheet with one column for ingredients and one column for recipes. (see on the left in the picture below). I would like to create a matrix with all ingredients (as seen in the ...
0
votes
0answers
26 views

Excel 2016: VBA: Sort Grand Total by Largest to Smallest in Pivot Table

I managed to generate a Pivot table using VBA, but now not sure how to sort the "Grand Total" column on the right from Largest to Smallest using VBA that the pivot table generates. A little googling ...
0
votes
1answer
46 views

Excel 2016: VBA: Formula throws syntax error in a Macro

I have Excel data with column F that has date/time in the format: 11/13/2018 9:33:00 PM Now, I need to get that date displayed in column H as per the formula =TEXT(F2,("MMM-dd")) (I currently do this ...
0
votes
1answer
55 views

Transpose Stacked Data in One Column to Rows based on Variable Criteria and Unique Identifiers

Using Excel 2013 and I'm struggling to write a formula that allows me to transpose the amounts stacked in column E based on the deduction code in column F using various criteria on the first row/...
0
votes
1answer
30 views

How to filter according to a cell value using VBA?

I have two sheets in a workbook. I am using the following VBA code to filter the data: Sub apply_autofilter_across_worksheets() 'Updateby Extendoffice 20160623 Dim xWs As Worksheet On Error ...
1
vote
0answers
44 views

Filter charts on a dashboard to display charts that are on other worksheets in the same workbook [closed]

How to Filter charts on a dashboard to display charts that are on other worksheets in the same workbook? So I know you can create the charts behind each other and move them forwards and backwards. ...
0
votes
2answers
37 views

Repeating a list of cells in excel X number of times

I have a list of names in excel, For example Lizzy William Kate Charles I would like to use some VBA code (or other method to repeat this 12 times). I will be doing this over and over again and ...
0
votes
1answer
21 views

Splitting Workbook using filter and creating new file in column name

Suppose I have Workbook(Report.xlsx) and in that workbook I have different worksheet. In every sheet I have a column name B_Code. Using filter in B_Code I want a separate workbook with every sheet in ...
1
vote
2answers
82 views

SUM in word table with Variable cells

I have a table in the Word program like the following: By opening this table file, I have to increase or decrease the number of rows. So I can not use the formula for the sum of the seasons (Because ...
0
votes
0answers
41 views

Splitting Workbook using filter

Suppose I have Workbook(Report.xlsx) and in that workbook I have different worksheet. In every sheet I have a column name B_Code. Using filter in B_Code I want a separate workbook with every sheet in ...
0
votes
0answers
37 views

Number of points per square in a grid

I have a scatter plot as the example below, and I was wondering whether there is a way to summarize all the points in a square of the grid with the number of points in each square? For example, the ...
0
votes
1answer
64 views

Excel - MyFitnessPal - Combine row data from Break/Lunch/Dinner/Snacks

I'd like to combine the nutrition data from multiple meals during a single day onto a single row. Current Sheet: Desired Result: My knowledge of Excel is limited, and non-existent in terms of VBA.
1
vote
1answer
28 views

How to include a double quotes mark into RegEx exclusion group in Excel UDF

With help of this Is there an Excel formula to identify special characters in a cell? VBA code and excel UDF, I am checking special characters in my csv file. Using this formula: =RegExCheck([@...
-1
votes
1answer
71 views

Excel VBA - Returning a list of values not found in one column

I want to get Excel VBA to return, in a messagebox prompt, all items which are in column A of worksheet Mastersheet but are not in column A of worksheet DeliverySheet. Having a lot of trouble ...