VBA stands for Visual Basic for Applications, a subset of Visual Basic used in all Microsoft Office Applications. Consider tagging your question with the application as well as [VBA]

learn more… | top users | synonyms

0
votes
0answers
2 views

Macro for cleaning all sheets in a workbook (VBA - Excel 2010)

I have a macro file with 5 sheets and I would like to add a VBA command button into the same file to clean all workbook contents with a single click. Does anyone know how to do it by using VBA on ...
0
votes
2answers
16 views

Why is using this code to replace a formula giving me an error?

In Excel I use the following to clear cell E5 and replace it with the word name. Sheets("Invoice").Range("E5") = "Name" I can also use the following to replace G11 with the VLOOKUP code I have here ...
0
votes
0answers
8 views

Create a spreadsheet that filters data and allows users to edit filtered data

I have a master datasheet with lots of information. I extract data from the master to a simple overview pertaining to only specific groups of people which takes this data and calculates other ...
0
votes
1answer
20 views

Macro to merge data on to template

I am attempting to basically do a mail merge in Excel. I would like to take employee data from one Excel worksheet and populate fields on an Wxcel template. So far I have written code to open the ...
-2
votes
0answers
20 views

Excel Search, Copy, Paste

I have an Excel spreadsheet with just two columns. I would like to create a Macro that would allow me to use a barcode scanner to search for a number in one column and then copy all of the ...
0
votes
0answers
13 views

Show Excel column filter information in cells - Not working

I am on a W7 64bit pro edition, on a Lenovo T420 With regard to Show Excel column filter information in cells, is there a reason why it is not working in Excel 2003? Thanks in advance Gilberto PS I ...
-1
votes
0answers
28 views

VBA/Excel meter codes [on hold]

Hello Someone help me out in writing the VBA code for the Meter in the excel, like 3 colors RED(<98%), AMBER(98% to 99%) & GREEN (>99%). if i key the percentage in one of the cell the meter ...
0
votes
1answer
19 views

Open multiple independant instances of Word 2007

Since MS Word 2007 there seems to be a change in how Documents are opened. In older Versions, each Document could be opened in a completely independant Word Window. Now, all seem to be opened in one ...
0
votes
0answers
14 views

XL 2003 crashing on ANY VBA code in ANY class module - code module OK

Any sub in ANY class module including ThisWorkbook, an added class module, or even the worksheet class modules all crash IMMEDIATELY upon launch of XL 2003 or upon invocation via control or button. ...
0
votes
1answer
52 views

Copy Active Cell Comment in Excel into a new word file

i do not know much about Macros, is it possible someone could help me out. I have a simple excel file with names of Clients that have a lot of comments on each name. is there a fast way other than ...
1
vote
3answers
49 views

Checking whether a label exists between two other labels in a column

I have a column (call it A) in Excel lists off different items and their properties. Every item has the word "Type" associated with it and so there is a cell with that label in column A so that in ...
1
vote
1answer
26 views

Excel VBA to add cumulative total to new sheet

I am trying to create a workbook that creates a new page and puts the cumulative total from two cells to add to the new totals entered on the new page. I've been able to create a new page, but can't ...
-1
votes
0answers
22 views

Excel 2010 macro that will search for multiple values in a very large worksheet, and then copy full rows into a new sheet when value is found? [closed]

I'm new here, so forgive me for the length and any rookie questions. I have a very large worksheet, about 100k lines, filled A-AD. Row 1 is header (I will need this in the new sheet, but can easily ...
3
votes
0answers
38 views

Excel VBA SQL Query Handles Error

I am a beginner with VBA, but try. I have SQL that I can use in Excel 2013 to get the info from the Access database and it works using the SQL directly in a connection, but now I want to run it from ...
-1
votes
1answer
29 views

Empty email content with macro

Using the thread Here I have created a macro that will open up a template in a new message window. My signature is still at the bottom though. I want to empty the email content before adding the ...
0
votes
0answers
25 views

Custom sort selection

I would like to be able to sort a selection based on the order of another range somewhere in the same workbook. While I realize I could add custom list and then sort the selection based on this, this ...
0
votes
0answers
17 views

Ideas on how to automate the export of cell values from 300 different excel workbooks

I have 300+ excel workbooks, containing some informaiton. I need to construct a dataset, containing information from each of the workbooks. To clarify, let me give you an example: -WB1.xls contains ...
0
votes
0answers
22 views

Need to modify VBA slightly but not sure how

Currently, I have some code to extract data from a webpage. It works perfectly for one of them. This is the existing code Sub GetPrice() Dim IE As New InternetExplorer IE.Navigate "THE URL ...
0
votes
0answers
28 views

Update Combobox Fields via an Access 2013 Form

Simplified version: I would like to update a table field based on a combobox: SELECT [Table].[ID], [Table].[Name] & " " & [Table].[Year], [Table].[Info1], [Table].[Info2], [Table].[Info3] ...
1
vote
1answer
26 views

Macro: Insert a new row above a cell containing a different numbers

I have an excel with two columns. Column A contains numbers and column B contains text data. Numbers are continuous like 1 2 3 with several blank cells between them as shown below. For example: 1 ...
0
votes
1answer
19 views

Hyperlinks in Cell Not Emplying Full Use of HTML

The following is on Excel 2013. I have a spreadsheet that, through a VBA macro, takes a numerical input from a cell and appends it to a hyperlink to a PDF document on a website immediately after ...
0
votes
3answers
58 views

Excel VBA or Formula to convert text to Date with Time type

I have a quite a number of data where its date/timestamp has been imported into excel as text. Excel does not really recognize it as date with time. e.g. 25.08.2011 16:17:59 (mm.dd.yyyy hh:mm:ss) ...
0
votes
1answer
34 views

Track username and date who opened an Excel sheet

I'm using VBA to display a welcome message with the username. Additionally I want to keep track of the username (taken from environment variables), date and time in one of the sheets. For example: ...
0
votes
0answers
18 views

VBA code to paste value to an indexed position from a match on different sheet

I am struggling for days to make this excel formula work from a command button. =IF(‘Machine Status’!E$28=(INDEX('Import Pool'!$A:$H,MATCH(‘Machine Status’!$B$23,'Import Pool'!$G:$G,1),2)) then cut ...
0
votes
1answer
30 views

excel copy past repeat macro

At the moment I am working on a research project for my university in excel. Now I have a certain range BF1:DJ293 which has to be copied and past for 238 times to the right. So this range has to be ...
0
votes
0answers
14 views

Auto Filter automatically when entering new data

I am new to VBA and are currently working on a little project for myself and got stuck at the following point. I have two sheets that I am working in and this is what I would like to happen. I have ...
0
votes
1answer
28 views

How to generate inverted normal random numbers in VBA?

I am trying to generate 5.000 random variables using these excel functions: normsinv(rand()). This is the code I wrote: Dim r As Integer r = 1 For r = 1 To 5001 .Cells(r + 1, 1) = ...
0
votes
1answer
29 views

Random Numbers in a Range of Cells

I want to generate random numbers in my model. Every time I run the macro my cells range "G8:H34" have to fill in with different random numbers that should be integers from 0 to 2. I have to generate ...
1
vote
1answer
33 views

Sorting every 7 rows till end of worksheet

I have a worksheet with five columns A-E and nearly 10,000 rows. I need to sort every 7 rows till the end of worksheet using data in column C. The following code does the job for the range A1:E7. Can ...
0
votes
0answers
38 views

VBA adding rows and deleting rows automatically when changing start/end year

I have 3 tables I would like to change number of rows as I update the number of years. Whether I change end year or start year where the table can flex. The problem I have encountered so far is that ...
0
votes
4answers
109 views

Combining all combinations of data from three columns in excel

I have a few columns of data that I would like to combine, and get each unique combination. Concatenating across a row or set list is easy enough, but I would rather not have to enter each possible ...
1
vote
0answers
33 views

VBA substitute for Microsoft Office RT?

I've been working on VBA-based applications for automating Excel and other MS Office applications. Now I'd like to expand to MS Office RT, but I've read that Office RT has no VBA support. Is there any ...
0
votes
1answer
30 views

How Can I Comment a Block of Text in Microsoft Office Visual Basic Editor?

Sometimes when I'm writing a macro in Excel's Visual Basic Editor (VBE), I want to comment out a block of code to test the macro without it. I know I could go to each line and type an apostrophe ('), ...
0
votes
1answer
26 views

how to make a Copy formula, Value from A3 to B3 if z3 = csl

Is it possible to have a formula that can copy text value from A3 drop down list of cars, paste the text Value into B3, once i put CSl into Z3. then i can delete A3 but still have the text Value in ...
0
votes
1answer
76 views

How to create a macro in Outlook 2010 to add the the date to the subject line

I am new to the VBA format of writing code and I have been researching how to get the current date to AUTO input into the Subject line of an email when commanded. I need to know how to complete the ...
0
votes
0answers
27 views

How do I bulk replace a hyperlink containing a File:\\ command in excel

I work with Sharepoint 2007 and Excel 2007 In SharePoint I sometimes use a hyperlink with the file command like; (file://\\group.net.dk\sites\S01625\stt\Drawings). This is useful when I want to open ...
0
votes
0answers
42 views

Trying to get VLOOKUP to get data from a table array on another workbook where the worksheet name is variable

I currently pull data in from 4 workbooks using the INDIRECT function, the formula is as follows, =INDIRECT("'[" & $AE$1 & "]" & $AA$13 &"'!" & $AI$1) $AE$1 contains the workbook ...
-1
votes
1answer
30 views

VBA not recognizing MsgBox property VbMsgBoxStyle

I'm getting the error message "Compile Error: Named argument not found," when I try to run my VBA code. VBA doesn't seem to recognize the last property VbMsgBoxStyle. Dim dump As VbMsgBoxResult dump ...
0
votes
1answer
37 views

VBA Validate input in the input box

I need an input box that will provide a value that is an enumerator. MSDN Does not mention validating the fields at all. Is there a way of doing that? Like in HTML5 the pattern in input tag? Here ...
1
vote
0answers
32 views

Link Microsoft Excel to Word document

I need to link certain numbers in my word document to an excel file that I have. For example, the Revenue for FY2014 is "20,000". I would like the 20,000 to be linked to a certain cell in an excel ...
0
votes
1answer
23 views

Macro to create a text file with values from cells and text

Im trying to create a macro in excel that creates a text file which some of the parameters are on excel cells. The output would be for example: The kid is 'cell (1,1)' old. His name is 'cell ...
0
votes
3answers
22 views

How to record in adjacent cell what my drop down selection was, as a Hard Record formula? plz

is there a excel function coding which can record in an adjacent cell what my drop down selection was From cell A3, into Cell B3, but to keep this even if i remove the drop down selection at a later ...
0
votes
1answer
38 views

Excel VBA Date format: Hyphen as separator gives wierd substitution result

Excel 2007. I want a macro to put today's date in the current cell formatted as dd-mmm-yy, e.g. 30-Oct-14. The code I have is simple : 'ActiveCell.Value = Format(Now(), "dd-mmm-yy")' For some ...
0
votes
1answer
41 views

Inserting Autotext (or Quickpart) into Word (2013) on the basis of a Boolean value from Access (2013)

Haven't found any info on this anywhere on the net (at least any that works--more on that in a moment). What I am trying to do is have, at the push of a button that I have created in an Access Form, ...
0
votes
0answers
30 views

Trying to start a file upon opening Excel 2013 using XLSTART

How do I get excel to load an certain file using xlStart. I found C:\Users\mdowney\AppData\Roaming\Microsoft\Excel\XLSTART Added the file and its not working.
1
vote
0answers
18 views

Bloomberg - Excel VBA Macro to email Bloomberg <CN> screen via <GRAB>

I am looking to develop an Excel-Bloomberg macro. The excel spreadsheet will be linked to a Bloomberg Add-In and of course, a Bloomberg Terminal. The objective of the macro is to have a list of ...
0
votes
1answer
17 views

Adding another value in Excel cell/column if another cell has particular value

I wanted to be able to create a macro to change the value in Cell B to EPTBSIET if it equaled that value in Cell E - SIETCO. I've been able to compile an IF formula but would rather have the value not ...
0
votes
2answers
50 views

How To Extract Pattern from a folder path (VBA Excel)

I'm pretty new to vba excel and trying to reorganise a very large file structure. Basically, all our equipment has a tag in the form of [A-Z][0-9]0-9][0-9][A-Z] e.g. J452G being a compressor. Every ...
0
votes
2answers
40 views

VBA code to select certain worksheets in Excel and save as new workbook?

Is it possible to use VBA in order to select certain worksheets in an Excel workbook and save as new workbook file?
-3
votes
1answer
29 views

Find and Replace in all excel files

I am no programmer. Is there a macro/vba/tool that allows me to find and replace in all opened excel files, at once? If not, an external tool that allow me to drag & drop files, because I have ...