Tagged Questions
0
votes
1answer
23 views
Excel macro runs in personal.xls but not in any other workbook
I have placed the following macro in my c:\program files (x86)\microsoft office\office11\xlstart\personal.xls:
Option Explicit
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As ...
0
votes
0answers
10 views
VB UI builder, RAD, CASE Wizard for creating macro for Excel 2010?
I wonder if it is available a: rad, case, UI, framework, application wizard that using VBA as its engine may easy the process to create a macro excel 2010; here the link: ...
0
votes
2answers
23 views
excel. how to sum certain criteria per group on new row?
I have a raw data set right now that is set up in columns like so:
Group1 Cost 1 Amount
Group1 Cost 2 Amount
Group1 Cost 3 Amount
Group1 Cost 4 Amount
Group2 Cost 1 Amount
Group2 Cost 2 ...
0
votes
2answers
18 views
How to run macro from specific workbook w/ Win32::OLE
(Using Win32:OLE w/ Perl)
Is there a way to specify which workbook an Excel macro is run from if multiple workbooks are already open?
I am using the following code, but it sometimes fails if more ...
0
votes
2answers
21 views
How to use a defined name in an array in my code?
I have a sheet with multiple macros in it and the macros have to filter a list by certain values and this is a common theme throughout my code and is repeated multiple times. What I want to do is to ...
0
votes
2answers
31 views
How to I change this Excel macro (VBA) to run on any sheet?
I have an excel with data arranged in tables for several schools. Each school is on a separate worksheet. The following code (recorded macro) will produce a chart for the referenced sheet (2002 - ...
1
vote
1answer
23 views
Call Macro from Hyperlink using multiple workbooks without re-opening Macro Sheet
I have 2 Workbooks:
Workbook With Macros
Workbook to write to.
I have 2 subs. One is to insert a hyperlink in the 'workbook to write to' and the other Sub will execute when the hyperlink ...
1
vote
1answer
32 views
Excel - Writing Macros that will write on the next line
I apologize in advance if my question is too simplistic but I'm rather new to coding.
I'm trying to gather an information from a table and have the code list it out on separate lines.
The problem ...
-2
votes
0answers
11 views
Import flow from Access to Excel to Outlook Calendar
I know zero about VBA but know that the following can be done. I have seen the rear-end of one portion of this issue here: Importing data from Access into Excel
But I need to know how to get to that ...
0
votes
1answer
37 views
Is this code wrong or I'm not using it correctly?
Good day chaps,
I was reviewing this piece of code
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Column = 1 And Target.Offset(1, 0) = "" Then
...
1
vote
2answers
56 views
Excel VBA: Resetting spreadsheet count
I have a excel VBA macro that dynamically generates and deletes spreadsheets based on user input. However, when I open the VBA IDE, it seems that although I am naming my spreadsheets in the subs that ...
0
votes
0answers
16 views
UDF can't find object or library when e-mailed
I have a UDF that I am using in a workbook that gets e-mailed to another user(s). When they try to open it they get a can't find object or library error. They are using a mac and I am not if that ...
0
votes
1answer
17 views
VBA Excel: Macro-created graph with dynamic range
I'm trying to create a macro where a graph is created with a dynamic range for the columns. Here is what I have so far.
Private Sub CommandButton2_Click()
With Sheets("Sheet1")
Charts.Add
...
0
votes
0answers
16 views
Create a PivotTable in Excel Using VBA to reference a Table with a dynamic name
First off, I will admit I am very unfamiliar with VBA. What I am looking to do is have a macro run that will create a pivot table based on the first table that is found on the active sheet. I want ...
-1
votes
1answer
80 views
VBA - Format Name
I am hoping someone can help me in my dilemma. Due to a system software limitation, I need to have all my code in one Macro.
1.) take Column Q which is a name in the format "last, first" and break it ...
0
votes
2answers
42 views
VBA - Saving all worksheets as separate files with a file name based on a cell
I've found code to save all the worksheets, and I've found code to save the file with a filename based on a cell, but I can't seem to get both to work at the same time. Below is my entire macro - but ...
0
votes
1answer
35 views
Find, Select and Copy multiples random cells VBA Macro
i'm having troubles with a Macro that i can't figure it out how to do it, i need a Macro that can scan trough a workbook, Find 3 values, "Data: ", "N°" and "Rodovia:", make a offset of 1 column from ...
0
votes
1answer
15 views
VBA/Excel: Tracing precedents to another sheet not working
I recently started working with a friend's excel project, making macros. I was mostly doing this through the "Record Macro" function, as I am not knowledgeable in Visual Basic to code it myself, and ...
-1
votes
2answers
39 views
Excel Macro to Find Duplicate in Sheet A and Delete Duplicate in Sheet B
This problem involves three Sheets (A, B, C)
Sheet A contains a data table and in Column A has a list of Names
Sheet B contains a data table (Similar not the same as B) and in Column A has a list of ...
0
votes
0answers
33 views
Find and select all on another sheet in VBA
Brand new vba programmer here! I am currently trying to write a VBA macro that copies the value from one cell in a column, searches for the value on a different sheet, selects all of the found values ...
0
votes
0answers
21 views
Excel Macro for inserting a row which has a cell with a specific value from one worksheet to another
With a command button that has been assigned to the macro below: in the Worksheet "Updated List" I am trying to search for all rows which have a cell in column 18 with a value of "Awaiting Response", ...
-1
votes
1answer
20 views
Need a Macro to run on a specific sheet not the Active one
I have This Macro and it needs to run on the sheet "Customer List", instead of the active sheet. This is a part of a series of macros so i cant just click onto sheet. Thanks.
Sub Check()
Dim dat ...
0
votes
0answers
24 views
How to change current drive to a network drive
I am trying to create macro that would let the user choose a file form a dialog box. My code is as follows:
Dim FileName As String
ChDrive "T:"
ChDir "T:\"
REPFileName = ...
0
votes
1answer
53 views
How can I run one VBA macro on all the (closed) Excel files in a folder?
Excel 2010
Once I opened the file with the raw measurement by myself, I have a macro which performs some actions on the raw data, i.e. sorts it, deletes some stuff, copies some stuff into a new ...
-1
votes
0answers
44 views
Trying to make a VBA macro to highlight column if starts with “August”
As the title says, I have a sales report and I want to execute a macro that highlights about 10 rows in a column if the column starts with "August" or 201408. This is what I have so far but it doesn't ...
-3
votes
0answers
21 views
comparing two sheets in excel
I have two sheets "DCW" and "Domain", the sheet "DCW" has 3000 rows and the sheet "Domain" has
"5000"rows both sheets have same number of columns, now i have to compare all the rows present in the ...
0
votes
2answers
26 views
PasteSpecial causing macro to fail.. why?
The below Macro opens an external workbook, unhides a particular sheet and reads a couple of text values into variables, creates a new sheet in the current workbook based on those variable values, ...
-1
votes
2answers
35 views
excel function or macro delete numbering in front of text
I searched but couldn't find any answer.Need your help tol solve the issues. so here is the problem:
I have a spreadsheet with
Cell A4 : 1.1 ABC
Cell A5: 1.10 BCD 200 ABC ...
-2
votes
0answers
35 views
How to handle Custom Window Form from Excel using C#
Trying to read data from Excel using C#. The data changes on the sheet using a Macro in Excel
xlApp.Run("#Macro Name");
This macro displays a User form when there is an error and it requires user ...
0
votes
1answer
33 views
Excel VBA: copying raw data into specific cells of a target sheet
I am a beginner with VBA so any kind of tip might be helpful to me.
I have two worksheets within the same workbook, namely sheet1 ("rawdata") and sheet2 ("Overview).
Every morning, I am copying ...
0
votes
1answer
58 views
Excel VBA - Merge specific columns from multiple files to one sheet
I have hundreds of excel files that I want to combine into one file. The problem is that these files contain hundreds of columns of extra data that I do not need. Further complicating things is that ...
0
votes
1answer
38 views
VBA - changing link source macro
I have one workbook(I will call it "master" ) with multiple sheets, each is linked to different workbooks in same folder. Every month I make new folder and copy the content of old folder to the new ...
0
votes
0answers
37 views
Excel 2010 sort macro won't run in 2013
I have a spreadsheet I wrote in 2007, and it works fine in 2010, but when I updated to 2013 I get the following error:
Run time error 1004 - application defined or object defined error.
I've Googled ...
0
votes
2answers
18 views
Getting the text format of a cell via a Macro
I'm trying to get the value of a particular cell and then paste it into my worksheet.
This value is a date, May 2014 but is coming out as May-14 in Excel.
How can I get the exact cell contents ...
0
votes
2answers
35 views
How do I loop through an Autofilter using VBA in excel?
Here is an example of the two sheets I am working with in excel:
Sheet A (Columns A-P):
Loc_ID Loc_Name First Last ... ... ...
123456 ABXC - Sales John Smith
...
0
votes
1answer
24 views
Protect Excel Spreadsheet with a macro when a condition is satisfied
I have a workbook with a spreadsheet that has SOME read-only (protected) columns.
I would like to have a macro that will run when the user ticks a box on that sheet, this macro will protect the rest ...
0
votes
1answer
16 views
Extracting sheets to seprate files / variable sheet names / loop
I have a Spreadsheet with around 60 sheets, every week they are the same + sometimes there is a new sheet.
I am trying to make macro that would export sheets to a separate file specified in Excel ...
0
votes
1answer
29 views
Macro to use a name from the clipboard to create a new tab
I have a report which is run each month and want to create a master workbook that creates a new tab in it for each month the report is run.
Luckily, the report has the month the report is run, so ...
-7
votes
0answers
29 views
Combine multiple worksheets into 1 worksheet in current sheet [closed]
I need to create a macro that will open various worksheets stored in 1 defined location and copy the 'template' worksheet to the current worksheet. There are about 5 worksheets that need to be copied ...
1
vote
2answers
35 views
Excel delete formula but keep values witha lot of rows
I'm working with a macro excel. I'm trying to delete the formula but keep the values of the cells as it makes filtering/sorting so slow. I already tried the following:
Range("A2:E70000").Select
...
0
votes
3answers
33 views
Assign a unique number to every unique product number in excel
I have two sheets. Sheet1 has a list of products and Sheet2 has a list of products and their location. Since the product can be in multiple locations, there are a good amount of duplicates in Sheet2.
...
0
votes
1answer
53 views
VBA: loop to copy certain columns from main sheet, create a new sheet, and paste
I have a sheet with a specific number columns. I need to copy columns A and another column starting with column B, create a new sheet and paste those columns there. I then want to loop it so that it ...
1
vote
1answer
47 views
Unable to save an unshared version of Excel workbook using VBA
I am trying to save a version of a shared excel file every time the file is saved. I want the file to be unshared and have no VBA macros. The code I am currently using is as follows:
Private Sub ...
0
votes
2answers
29 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 ...
3
votes
2answers
55 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 ...
0
votes
2answers
25 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:
...
0
votes
0answers
11 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 ...
0
votes
2answers
25 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 ...
2
votes
2answers
52 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
20 views
Excel VBA: website per array value that also creates worksheets
I start with an array of values/range on 1st Excel worksheet, each of them to be linked to a webpage. I then create an Excel worksheet named for each array value. Next I copy 3 tables from 3 different ...