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.

learn more… | top users | synonyms

1
vote
1answer
8 views

How do I use Excel 2011 Personal Macro Workbook?

I realized I asked about excel 2010, but that only covers Windows OS. How can I use the Personal Macro Workbook in Excel 2011 on OSX?
0
votes
1answer
19 views

Excel 2010 VBA to remove duplicates and then sumif base on the unique data

My work requires data comparison from 2 different sources (sheet 1 is source 1 and sheet 2 is source 2). Both sheets contain duplicate values (the Delivery Order) Because I need to do this kind of ...
1
vote
2answers
17 views

Move each Cell after column A on new line

I would like to export some data into MySQL, however before that I would like to format the data. I am not sure how to explain it, so I made some screenshots. How could I turn this: Into this? 1 ...
-4
votes
0answers
14 views

extract data in excel [on hold]

I have to extract records to other sheet by key field from a data base in excel sheet using Excel VBA. The code has to go over all records and when the key is Change he takes the next key and extract ...
1
vote
3answers
28 views

Excel VBA: Count # of Delimiters

I have the following code: Sub CopyTest() Dim skuRow As Integer Dim curSku As String Dim numSkus As Integer Dim impType As String Dim copyRows As Integer Dim supAcc As ...
0
votes
1answer
25 views

Check which (multiple) cells in column A contain substrings specified in column B?

In column A I have M&A deal descriptions that mention company names. In column B I have company names, for each of which I want to see where it is mentioned in column A. What I'm having trouble ...
2
votes
0answers
22 views

Unlock Excel VBA “Find” window location [on hold]

When editing VBA code the FIND window (Ctrl F) appears at the bottom of the screen. It can be manually re-positioned but upon re-opening it appears at the bottom again. It used to open in the last ...
3
votes
1answer
18 views

Freeze multiple columns in excel using macro

Under the Freeze panes, Excel currently offers Freeze panes, Freeze first row and Freeze first column options. I was looking for an option where I can freeze the first N-columns. I did a record macro ...
1
vote
1answer
17 views

Copy an excel file with Macros and New Tabs in the ribbon to another computer

I'm working with Microsoft Excel 2013. I'm using couple of macros I did and I made a new tab in the ribbon menu which shows the macros I did so that I can click on the this created tab then click on ...
0
votes
1answer
27 views

Automated Goal Seek - Excel

I have been using goal seek successfully to back into a known number. This works great with a handful of lines - now I need it for 100s (probably 1000s) of lines. Any help would be greatly ...
0
votes
2answers
52 views

How to lookup a value and return multiple unique values to a single cell - comma separated

I am attempting to lookup a unique identifier (Product Number) which is held in several different stock locations. For example: __A__ __B__ __C__ 1 Item # Warehouse ...
0
votes
1answer
20 views

Getting “Application Defined or Object Defined” error '1004"

So I was trying to copy data from different sheet and paste on current and I am getting this error: "Application Defined or Object Defined" error '1004" Can someone help me with this ? Option ...
1
vote
1answer
15 views

How do I dynamically control animations in PowerPoint 2010?

I'm playing around with PowerPoint creating a trivia game. When the user clicks on a tile on the main slide it advances to another slide with the question. When the user clicks the return button, they ...
1
vote
1answer
41 views

Excel 2010 VBA to Hyperlink Active Cell to itself, so it would lead to it's exact location from when that cell is pasted and sent in Outlook e-mail

Objective: Excel 2010 - VBA to Hyperlink Active Cell to itself, so it would lead to it's exact location on spreadsheet from when that cell is pasted and sent in Outlook e-mail. I need to keep the ...
0
votes
1answer
19 views

Search two columns in Microsoft excel 2013 and set the value of a third column with a specific value

I want to search a specific text which is the firstname_lastname e.g John_Smith in worksheetA. WorksheetA has a column firstname and another column lastname. So after knowing which row has the ...
0
votes
1answer
24 views

How do you prevent corruption of shared Excel files?

I have 10 or so Shared Macro Enabled Excel files that about 30-50 users modify multiple times each day. Over time the files get bogged down and bloated from excel thinking users are still using them ...
3
votes
1answer
76 views

Extract number from complex string if it falls in a given range

I need an Excel formula (or VBA macro) that will allow me to extract a value from a string. The string is a sequence of words, separated by spaces, in a single cell. I want the word (representing a ...
5
votes
2answers
34 views

How can I add / upload bulk entries to Excel 2010 Autocorrect?

I currently have about 200 entries of autocorrect but it's painful to add one by one manually to "autocorrect" (File > Options > Proofing > AutoCorrect Options > AutoCorrect tab). These entries are ...
1
vote
0answers
18 views

Outlook 2010 - setting a rule for an incoming mail (read or unread)

I need a little advice on Outlook 2010. There is this situation: - one webmail account which is used by a several people (using web browser or phone to access it) - one computer with MS Outlook 2010 ...
0
votes
1answer
21 views

How to find number ranges (with text input) in Excel

In column A, I have some numbers, formatted as text due to leading zeros: +------+ | A | +------+ | 0001 | | 0002 | | 0003 | | 0012 | | 0013 | | 0015 | | 0017 | | 0019 | | 0020 | +------+ Using ...
0
votes
2answers
30 views

VBA macro to interchange columns

Please could you help me in VBA macro to interchange columns for example There are 4 columns Supplier1, Supplier2, Supplier Score1, Supplier Score2 I want to change columns as below Supplier1, ...
1
vote
1answer
35 views

VBA - Create an array of all table names in workbook

My end goal here is to have a button, that when pressed creates a new sheet with a table on it.. that new table should be added to the PivotTable Wizard list. The error being called is error ...
0
votes
1answer
12 views

Export multiple (specific) worksheets to CSV files in a specified directory

I'm new to VBA. I'm trying to do the following but the code isn't quite working as expected. Export/Copy particular sheets in the workbook (any sheet name that contains "Upload") to a particular ...
-1
votes
2answers
35 views

Conditionally Remove Duplicates

So I have column A and column C. Both columns have duplicates. However I only want to delete based on the fact that there are duplicates if combined column A and column C have the same values. ...
0
votes
1answer
21 views

How to copy range from an unactive workbook

I'm simply trying to copy and paste between workbooks in VBA without first activating each workbook that I want to perform actions on. My code stores the active workbook and sheet in variables before ...
0
votes
1answer
20 views

Programs accessing hidden files and folders

I want to write an excel macro that deletes/creates files and folders. This brought me to ask myself the following question: How are hidden files/folders seen by programs and are they modifiable? ...
0
votes
0answers
12 views

Data links not refreshing properly in VBA Access 2013 when I change the name of the program folder

I have an Access 2013 database separated into two files - data and code. In the code file, I have an autoexec routine to run the following function. Function Reconnect() On Error GoTo ReconnectErr ...
1
vote
0answers
40 views

“Microsoft Excel is waiting for another application to complete an OLE action” interrupting VBA code

I've got an Excel workbook that is running some VBA code, which I use every day. During execution, it keeps hanging on a dialog box saying "Microsoft Excel is waiting for another application to ...
-1
votes
0answers
42 views

How do I filter a Combobox via VBA the way the Filter box works?

I'd like to use VBA to sort/filter a Combobox on a Userform so that it works the same way a Heading Filter pull down works on the worksheet. For example, I would like the items to filter as the user ...
-3
votes
1answer
34 views

Developer are you missing your outlook meeting appointment often because notification goes in the background?

As I developer, I was frustrated that my boss and co worker put a label on my head that I was always late to a meeting. But like every late goers I have my own excuse. When you are heavily typing on ...
0
votes
1answer
28 views

Debugging a macro that saves column data to another sheet

I am new with VB so I run into troubles often.. Here's the problem that I have. I have developed the following macro: Sub copycolumns() Dim lastrow As Long, erow As Long lastrow = ...
0
votes
1answer
48 views

(Subscript out of range) Error 9

Below is a modified version of a code (i found on Stack Exchange) that I am currently using - Option Explicit Sub Main() Columns("E:E").NumberFormat = "@" Dim i As Long, c As Long, r As ...
-1
votes
1answer
87 views

Exporting Excel sheet to CSV - but exclude first 10 rows

[![Sheets in yellow I wish to ignore when I do the export, the Ws.rows command deletes the first 10 row but the vba script still exports all the sheets as CSV which I don't want, all the sheets have ...
0
votes
5answers
88 views

Can I run this Macro faster? [duplicate]

I am using this macro for over 1000 entries. The code itself works the way I want it to. Option Explicit Sub DoTheThing() Dim keepValueCol As String keepValueCol = "H" Dim row As Integer row = ...
0
votes
1answer
53 views

Splitting text in cells into separate rows

I came across this code a while back, it works perfectly, but I would like to make a few modifications to it to reflect what I want. I have tinkered with this code for a while and so far I was unable ...
0
votes
0answers
12 views

How can I specify “Start Time” and “End Time” in Out of Office Reply Message using VBA?

I already have a function that returns the status of the Out Of Office. And I can tell when it is enabled and when it's not. Also I have a macro that enables it and disables it. Now I need to be ...
0
votes
0answers
71 views

Excel worksheet and data manipulation

I want to take data on a spreadsheet and copy a subset of it to two different spreadsheets, then manipulate that automatically. I have a worksheet that has a large volume of data that is already ...
0
votes
1answer
32 views

VBA macro “range.value” causing error [closed]

I have this code Sub ifcitythencity() If InStr(1, (range("A2").Value), "San Francisco") > 0 Then range.Value("B2") = "San Francisco" End Sub But when I run the debugger, I get the error ...
0
votes
1answer
55 views

How to automate data scraping from multiple pages of site where the URL doesn't change

I'm trying to amass a table in excel by extracting the data on a webpage. The site contains 27 pages with data that I would like to lump into one single table in Excel. However, the URL doesn't change ...
-3
votes
0answers
32 views

VBA Delete duplicate rows in column B (date) if column C is blank

I have a list of dates in column B, I may have same dates mulitple times as I'm inserting data from another sheet so I'd like some VBA to delete the duplicate date from COL B if COL C is Blank. Hope ...
0
votes
0answers
74 views

Excel 2010/2013 - VBA - How to run event before print preview

I have been spending a great deal of time trying to solve this issue and searched many forums but I have not yet found a solution. Maybe someone here can find an answer... I want to run some code ...
3
votes
2answers
23 views

Limit Excel Macro Usage to Certain Users

I want my Excel macros to activate for certain users recognized by Windows Excel. How do I do that?
0
votes
1answer
21 views

How to open a particular form from another worksheet

I have two Excel files (A&B) which have more than two forms and I need to open a particular form from file B by clicking a button from file A. As of now I'm opening file B by clicking a button ...
0
votes
1answer
28 views

Access Autofilter listing with VBA

How can I access the unique listing of values in the column that the autofilter displays with VBA? I already know how to turn the autofilters on and off with VBA. I can access filters that the user ...
1
vote
1answer
60 views

Chart Series name referencing cell address Excel 2010 VBA

I am using Excel 2010. I have a XY scatter chart built and formatted the way I like. I reuse this chart many times, so I just copy and paste the chart into a new worksheet containing the new data ...
0
votes
1answer
61 views

Excel: transforming an indexed sheet with many columns to two columns

I have an excel sheet with rows like this: Fruit | Apple | Banana | Grape | Peach Vegetable | Cabbage| Lettuce| Carrot| and would like a two column output duplicating the index (first column): ...
2
votes
2answers
32 views

How to search for text from back to front

Backstory: I am copying and pasting search results from a website into word. the pasted text looks something like the image below: Goal: I only want two lines from each set of search results ...
0
votes
1answer
36 views

VBA - auto-populate date when data entered in cell

I have a tracking spreadsheet where I'd like the date a cell is completed to auto-populate in the next column. I found the following code which works for the first (I:I), but I'd like to add the same ...
0
votes
1answer
41 views

Excel 2010 Macro to Find & Replace

I have multiple work sheets in one work book. The work sheets i'm concerned with are WD, Hit, Sam, Sea, and Max. Each page uses the same exact template, so everything should match up... Here's the ...
0
votes
1answer
57 views

Is it possible to have Excel's Solver reference cells in multiple sheets using VBA?

I have seen this question posted on other forums, but I don't believe it has come up here. I would like the button I assign to a Solver macro to be located in a different sheet than Solver's target ...