Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Visual Basic for Applications (VBA) is an event-driven programming language first introduced by Microsoft in 1993 to give Excel 5.0 a more robust object-oriented language for writing macros and automating the use of Excel. It is now used for the entire Office suite and over 200 non-Office hosts.
9
votes
2
answers
2k
views
Extracting Country Names from Cell Values
This fairly clunky looking VBA script successfully pulls names of countries from an Array, but could it be made shorter? …
5
votes
1
answer
96
views
Rearrange data without using Cut and Insert
I'm fairly new to VBA, and this was basically a brute-force solution to a problem I was encountering. I wanted to take data that appeared in two columns, and pull it together into one. …
0
votes
Re-arranging data on a worksheet based on contents of Column A
Thanks, Raystafarian. I've adapted you're script to work with my data. I opted back to using a While loop, as I only want i to increase when Cells(i,1) is a number.
Sub FixAbstracts()
Dim lastRow …
4
votes
2
answers
62
views
Re-arranging data on a worksheet based on contents of Column A
The following Macro sorts through a worksheet, copying and removing lines based on what appears in column A. If ("A" & i) is not a number, it triggers and moves the data to the appropriate place. The …
5
votes
1
answer
1k
views
Mailmerge from Excel to premade template in Word
I'm new to using VBA in word or Access, so any feedback in these areas is very welcome
Sub AccessTransfer()
Dim strPath As String
Dim objAccess As Access.Application
Dim strExcelPath As String
Dim lastRow … LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
Windows("AH_MacroMailMergeTemplate").Activate
ActiveDocument.Close
End Sub
I'm also new to using VBA …
2
votes
2
answers
92
views
Re-arranging an matrix of numbers to a numeric list
If I have an array of numbers like this:
1 3 4 6 7
1 2
2 4 5 9
5 7
1 2 3 5
Is there a quick way to take all of the unique numbers and arrange them into a single column, like this?
1
…
3
votes
2
answers
67
views
Re-arranging a list into columns
I'm new to VBA, so that may explain why this code is quite inefficient. …
3
votes
2
answers
174
views
Copying lists into columns of a table
Edit: I found a potential solution. Changing all of the Dim as Long to Dim as Integer allows the scripts to run smoother. However, there is a potential that the number of rows in some instances will e …