VBA (Visual Basic for Applications) is the dominant programming language for Microsoft Office Applications [Word, Excel, Access...].
0
votes
0answers
3 views
Connecting to TOAD Using VBA Excel
I have a problem at hand which requires me to write a VBA code in Excel to connect to an Oracle database, execute a few queries and then store the result in an Excel spreadsheet. I connect to the ...
0
votes
1answer
14 views
Goal Seek Macro with Goal as a Formula
I'm grasping at straws here, so any help would be great (ie. I have no idea what I'm doing with VBA).
I'm trying to solve a circular reference problem in Excel by creating a goal seek macro - ...
-2
votes
1answer
29 views
Override a Function
The following "aMacro" returns the error "Ambiguous name Detected" I understand why. Anybody know a way to override the first definition and and only use the definition inside of the function so ...
0
votes
1answer
10 views
VBA Code - Data Labels in Chart with three decimal points
I am struggling with a part of VBA code that I have written to put customized data labels in excel charts.
Sub LabelPnt() 'change
Dim nm As Variant
Dim rate As Variant
Dim i As Integer
Dim r As ...
2
votes
1answer
17 views
Excel VBA - QueryTable AfterRefresh function not being called after Refresh completes
I am developing an Excel (2010+) Application using VBA and have run into an issue where the AfterRefresh event function is not being invoked once the query finishes executing.
I have not been able ...
0
votes
1answer
16 views
FindNext of vba not working
This is very basic question and don't scream at me coz i am not a vba expert.
So here we go, I created below vba function
Public Function GetDuplicateCount(value As String) As Integer
Dim ...
0
votes
1answer
20 views
Need faster loop
The objective is to copy and past n-1 cells for large n in the fastest time
This loop works, but runtime is long for large n:
For i = 1 to n
Range("A" & i).Copy Destination:=Range("A" & i + ...
0
votes
2answers
17 views
How to call python script on excel vba?
trying to call a python script on Vba and I am a newb. I tried converting the main script to an exe using py2exe and then calling it from VBA (shell) but the main script calls other scripts therefore ...
0
votes
1answer
24 views
Copy to New Worksheet when row is blank
PROBLEM
I need a macro that can copy from sheet1 to sheet[i] when i come across a blank line.
SAMPLE DATA
asdfasdf 1234
asdf 1234
gasdf 1234
asdf 1234
asdf 1234
fdas 1234
ds 1234
1234d 1234
...
0
votes
1answer
14 views
VBA Autofilter With Multiple Criteria Using Variables
EDIT: To fix the issue, I changed Dim Placed As Range to As Long. I then changed
Set Placed = Rows("3:3").Find("Placed", Range("A3"), searchdirection:=xlToRight)
to
Placed = ...
-1
votes
1answer
11 views
Merge workbooks in a folder and rename sheets to previous filenames
slightly struggling with the following.. would be amazing if anyone could help!!
I have a folders each containing different excel files consistently named "Provider A Product X Month Year", and each ...
0
votes
1answer
29 views
Find a name matching in two columns and return “OK” in another column
I want an Excel macro to, by row, find FALSE values in column P, a name or word that matches in columns C and G and overwrite in column P with OK if it finds a match (otherwise, the values in column P ...
0
votes
0answers
13 views
How to upload information to a Sharepoint List, using Excel VBA?
I have a Excel book with a connection the a Sharepoint List, I can updte the Existing data, and refrest and clear the data, but I can not ADD new information to the list, the code I am using is the ...
0
votes
1answer
32 views
Add cells to range of columns only
I am attempting to write a macro (new to VBA/writing code) that will add a value to an existing list (Col B). The value is defined by an InputBox then added in the list in alphabetical order. I am ...
0
votes
0answers
19 views
Excel VBA Trim function compile error: but using LTrim and RTrim works
I am having trouble understanding why the trim function will not work, when the RTrim and LTrim functions will work in the same code.
BACKGROUND:
The code uses text-based data split from a single ...