Tagged Questions
0
votes
1answer
8 views
How to read the value of a specific cell from MS Excel with ADO query?
I am trying to extract data from specific cell from MS Excel worksheet.
Select [A1] from [Sheet1$]
does not work.
How to read the value of a specific cell from MS Excel with ADO query ?
this is ...
0
votes
0answers
10 views
Transpose a table with a column containing row headings
I have a dataset that looks like this:
ID Heading Value
1 Currency: USD
1 AXA: 6.65
1 ACIS: 1.39
1 Brokerage: 1.7
1 Fee: 0.26
1 Total: 10
2 Currency: ...
0
votes
1answer
24 views
Need help improving my VBA loop
I have an Excel Worksheet consisting of two columns, one of which is filled with strings and the other is emtpy. I would like to use VBA to assign the value of the cells in the empty column based on ...
1
vote
2answers
23 views
Excel error when using path name as parameter from command line
I am trying to launch a specific Excel document from the command line and pass in a variable in the form of a file path. On starting the Excel sheet runs a macro. This file path may contain spaces ...
0
votes
2answers
20 views
Excel Macro: Copy and paste worksheet into another worksheet
I've been able to make an exact copy of a worksheet and add it to the workbook with:
Sub Test()
Dim ws1 As Worksheet
Set ws1 = ThisWorkbook.Worksheets("Detailed List")
ws1.Copy ...
1
vote
2answers
14 views
changing size of 2D array with vba
I always have trouble with Arrays which is why I usually avoid them but this time I'm trying to get my head round them
I'm trying to change the size of my Global Array inside vba
I have declared it ...
2
votes
0answers
22 views
VBA-Excel Copy Data to Excel From Site - New Cell Creation & HTML issues
I will outline my task. I have an Excel Sheet and I wish to write code to instruct IE to navigate to a URL specified in a cell, copy information from web page and paste to Excel. Go to next URL listed ...
3
votes
2answers
23 views
Using excel VBA, how do you copy multiple rows of the same value into new sheet?
Background Information
Here are two Sheets I am working with:
Sheet A (Columns A-P): -- Loc_ID and its information
Loc_ID Loc_Name Emp_ID First Last
123456 ABCX - Sales ...
1
vote
1answer
17 views
Howto convert excel formula to work in VBA?
I have found this terrific tip:
http://vlookupweek.wordpress.com/2012/03/27/richard-schollar-vlookup-left
However, the formula
=VLOOKUP(F2,CHOOSE({1,2},$C$2:$C$7,$A$2:$A$7),2,False)
works if ...
0
votes
1answer
20 views
Easy way to open unknown number of excel files
Good day everyone!
I know how to let user to choose limited number of excel books by userform (textbox + button), but now I'm stuck with such a problem.
I don't know how many files have to be opened ...
0
votes
0answers
20 views
vba error 424: Object required
Excel 2010, vba, Win 7.
I am using an on change event to run some code to update some other sheets. Works fine in every instance except one.
Quick description of what I'm doing: copying column 2 (or ...
0
votes
2answers
17 views
Excel-Vba: select first cell with no value based on the code below
With the macro below, I managed to select all of the cells in column B with a value. But now I need to change that code so that it selects the cell just underneath the cells with a value.
Example:
...
1
vote
1answer
19 views
Code for a command button
I have created a pricing sheet template using VBA which will be copied and pasted into various other workbooks contained differing numbers of worksheets. I have been asked to include a 'hidden' notes ...
0
votes
0answers
9 views
Paste within QueryTables destination
I am using the below macro to query the URL contained in multiple cells and paste them into another worksheet:
Sub Web_Query()
Dim wsWQ As Worksheet
Dim rCell As Range
Set wsWQ = Sheet2
For ...
2
votes
1answer
13 views
Excel VBA GetOpenFileName error on MultiSelect:=True
Im getting error type mismatch, please help im new to vba macro not sure what im doing. I just want the code to be able to select multiple files on search
Sub Main()
On Error GoTo Error:
'Open ...
0
votes
2answers
16 views
VBA complex vlookup between worksheets to get average of relative cells
I have a workbook with 2 worksheets. On Sheet1 is a list of names in ColC, and on Sheet2 in column C is the same list of names, but spaced out with data in Column D relating to each name almost as a ...
-1
votes
1answer
15 views
Visual Basic - How to select cells from a certain column or return error
I have a function made that sends an email using Outlook if I click a button. It currently takes data from an cell then opens outlook then checks the text from that cell in the address book and sends ...
0
votes
2answers
11 views
View the Visual Basic Code (VBA) when the workbook is closed on launch of the same workbook
By mistake I wrote code that will close the workbook when it is opened.
Because of this I am unable to see the code in order to fix it. How do I edit the code?
0
votes
1answer
11 views
Excel VBA - selecting the range from first row to the last row
I have a problem with VBA code. I have a sheet with a lot of data around the cells I want. I need to select data in column F, but the position of the first and last cells between the range is to be ...
0
votes
0answers
12 views
multiple adjacent dynamic ranges excel
I have a table with 4 titles of months, and each month is the merging of as many columns as days the month has,for each day there is a code that i have to compare, C being the code, like this
june ...
0
votes
0answers
15 views
How to refresh lotus notes with vba code?
I have a vba code which downloads the attachments from lotus notes and mark the emails as read. But the problem is that the UI is not able to refresh itself. And it shows unread in UI even if the file ...
1
vote
0answers
25 views
ScreenUpdating doesn't update screen in Excel 2013
I've got a massive bit of code running that takes 30+ mins to run and I have it set so that screen updates set to false while most of the code runs but every now and again I turn it to true and ...
2
votes
2answers
36 views
Creating a unique entry for each line item in Excel
I need help in creating a macro in Excel wherein it grabs a certain cell and copies the entire row x number of times depending on the cell's contents.
To make it clear, let's say I have 2 rows:
| ...
0
votes
0answers
33 views
Excel Macro for Leading Zeros with varying conditions
I'm working on a macro to automate the process of preparing a large number (several thousand) excel workbooks into a standard format for importing into a database.
One issue is adding leading zeros ...
-2
votes
1answer
25 views
VBA programming, Sorting Algorithm with Filters/Advanced Filters
I would to optimize asset allocation of a portfolio. I a database and would like to find the best asset doing multiple fitlers until we find the right one. I would like to do this for several maturity ...
0
votes
0answers
26 views
Automatically Update My MERGE MACRO
Okay I want to start by saying I am not at all experienced in Macro, so I will try to keep up with everyones terms, but please....screen shots and simple descriptions work best for me.
I have an ...
0
votes
0answers
11 views
Synch SharePoint list with Excel with cells preloaded with formulas
I'm using an add-in to synch Excel to a SP List.
It's working well, but I have to be able to have preloaded cells on the local excel file using the VLOOKUP function. So i.e. if a person type in a ...
0
votes
0answers
14 views
Excel VBA and AutoDesk Vault
We currently keep all our files in an autodesk vault.
I am trying to create a spread sheet that will allow me to search our master bill of materials spreadsheet and return a part I want.
I can do ...
0
votes
2answers
29 views
Excel Drop Down Box with Formula
Hi I have an excel with a drop down box whose list has 3 cells. One of these cells contain a formula. The problem is this formula is dependent on data in another cell and when this data changes the ...
0
votes
1answer
79 views
VBA Syntax/Code Check
I have been asked to make an Excel Macro to determine points based on three words and then color the boxes depending on the range of points so that what can be worked on is quickly determined. I am ...
-2
votes
1answer
32 views
Formula error then message box
I have a spread sheet and in column N1:N7, N8:N1, N17:N24, N26:N33, N28:N35 and N36:43 has vlookup formula which bring the result from sheet1, is this possible that if error (Vlookup not find the ...
0
votes
1answer
18 views
Regex Replace not working (error 445)
First of all i'm using office 2010
I have the vba script:
Function RegExpReplace(ByVal WhichString As String, _
ByVal Pattern As String, _
ByVal ReplaceWith ...
0
votes
2answers
29 views
SOLVED: Compile Error: Argument Not Optional
I have the following function:
Public Function getModuleAndEsnRange(fromSheetName As String, toSheetName As String, modulesColumn As Integer, firstModuleRow As Integer, esnsRow As Integer, ...
1
vote
4answers
36 views
VBA: fill a column with a repeating list of values from another column
In column B of Sheet1 I have a list of divisions that coincide with ship dates. I need the divisions to be copied from Sheet1(columnB) to Sheet2(columnC). The divisions go from row 3 to 17 and once ...
1
vote
1answer
25 views
Application Defined error on Simple range
I am trying to debug this code for quite some time already does anyone know what is the problem in it?
Code:
Sub Find_Field_List()
Dim Last_Field As Integer
Dim Field_List() As Variant
Last_Field = ...
0
votes
1answer
26 views
Sorting Data Based On the Last column
So I have 6 columns (Columns A:F). Column A consist of dates while in between that B-E containing data based off of the dates. Column F contains the categories where it's either (L, RI, or R). I've ...
0
votes
0answers
34 views
Creating Excel Macro to import a range of cells from a single ID
I have a master data sheet with a significant amount of component lists for various products, what I am trying to do is to find a way ( which I assume will be through vba macro) to type the ID for the ...
0
votes
0answers
20 views
Pasting Two Columns of Sorted Values
Is there a way to sort a sheet by a column, copy the first five rows and paste it into a new sheet. Then sort the same sheet by another column and do the same thing while keeping the values for each ...
0
votes
1answer
33 views
Open .csv file with Excel VBA
I'm having a problem with this piece of my code in VBA and I can't figure out why it isn't working! I've tried another code to see if it was the loop that has the issue but the issue is specifically ...
-1
votes
0answers
29 views
Is it possible to Copy Format from cell directly above? [on hold]
Good Morning Everyone,
My name is Tom and what I'm trying to do might seem to simple to ask for it using a code but its quite a necessity for the job I'm doing, basically what I need is a code that I ...
-1
votes
0answers
16 views
Outlook email body to Excel spreadsheet LOTS OF EMAILS 50,000 +
Ok i am not very experienced in VBA and need some help with the following. I have roughly 64,000 emails that i need to pull the PO Numbers from and put them into an excel spreadsheet so i can then ...
0
votes
2answers
29 views
VBA Excel adding values to dictionary
Alright, maybe I've just been looking at this for too long but I keep getting an expected expression error, which I believe is just a syntax issue but I'm not entirely sure. I'm looping through one ...
1
vote
2answers
34 views
Print dates in proper format
I have an excel workbook with many dates.
On the worksheet they are in a format of "mm/dd/yy hh:mm"
What I see in the white box above the sheet is in the format of "dd/mm/yy hh:mm"
I need to print ...
0
votes
1answer
16 views
Excel Macro: Print the value of a specific row with variable columns
I'm trying to print out a certain row based on a column that can be anything, and I was trying to use something like this:
'Gets me the Title(Top of Column) of whatever cell was changed
If ...
1
vote
1answer
22 views
VBA to get Computers VPN State
I'm trying to build into my code a way of seeing if the computer can reach the SQL server that it accesses.
The issue is that I can't just get the network state as to reach the SQL server the ...
-3
votes
2answers
28 views
I have been trying coding a VBA code inorder to extract a data from one sheet and preparing 4 new sheets out of it
I have been trying coding a VBA code by which I wanted to make 4 new sheets out of one calculated sheet.
Sub Pincodes_shippergenerator()
Dim path1 As String
path1 = "C:\users\" & ...
1
vote
1answer
20 views
Adding adjacent ranges to existing range
I have a rather uncommon issue
I'm trying to create a named range with several areas in it.
Using that I will use the [area] method in index to retrieve my data
What I will do is to have a named ...
0
votes
1answer
29 views
VBA - Relative vs Absolute References to XLAM files
my colleague developed an application contained in an xslm file, which has to be accessible to me as well. The file connects to a lot of xlam libraries which are saved locally on his machine due to ...
0
votes
2answers
44 views
Find and select first blank cell in column B with Excel vba
The below code works fine to find the first empty cell in a given column (here column B). But what I need is a code to find the first blank cell in that column.
Sub macro1()
Dim sourceCol As ...
0
votes
4answers
37 views
VBA Excel variables value after closing the excel file
I have an user form which selects a directory path. That path is stored in a variable. The problem is that every time I start the macro, I have to rechoose the path for the directory. How should be ...