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

-1
votes
0answers
12 views

how to create excel charts having strings in both x axis and y axis [duplicate]

I have a student data with Student Name and their grade (A/B/C/D/E.). Now I want to have a graph for this data. Description: Hai, I was tried to plot a graph having two fields (NAME and Gradde like ...
0
votes
1answer
14 views

Copy from sheet2 to sheet1 based on if values match

The goal of this code is to iterate through a column in sheet1 and check to see if each value matches that of values in a row in sheet2. If the value matches, copy 5 rows of information from sheet2 ...
-1
votes
0answers
13 views

Micro Excel 2010 Highlight changes made by Macro

I have two workbooks set up, one with all the calculations and the other that summarises and 'cleans up' the appearance. I have a macro set up that copies all the values from the one workbook to the ...
0
votes
2answers
19 views

Error when value not present

I am using the code below several times over in one sub for different values not just "CPNEC". It works fine where there is a range with that value on the spreadsheet but falls over it the value does ...
-1
votes
1answer
28 views

how to create excel charts having strings in both x and y axis

I have a student data with Student Name and their grade (A/B/C/D/E.). Now I want to have a graph for this data. Kindly help me.
0
votes
2answers
25 views

How to shift unique values down a column to the same value in another column?

My friend has two columns where one has unique values and another column has those same values but also duplicated like shown below Column 1 Column 2 ABC123 ABC123 CDE456 ABC123 EFG789 ...
0
votes
0answers
11 views

My f8 key is an lcd screen and I want a tactile button to step into a program. Is there any way to change it to another key?

My f8 key on my new laptop is an lcd screen and I want a tactile button to step into a program in a VBA build eviroment. Is there any way to change it to another key? FYI, I'm writing macros for ...
0
votes
0answers
17 views

Excel 2D-lookup on a PivotTable with changing coloumns and rows

I want to do a Vlookup on a 2D pivot table but neither the coloumns and rows of the pivot are fixed and are subject to change due to ever changing data source. How can I perform a accurate vlookup on ...
0
votes
0answers
11 views

VBA Compare columns on two diff worksheets, find in 2nd and group on 2nd worksheet

Excel 2010 Hi. I have a 6,000 line spreadsheet and need to group the lines, based on identified roll up points in another spreadsheet (150 roll up points). I want to be able to see the summary ...
0
votes
0answers
19 views

Using VBA to change criteria on a query based on a table content (in Access)

I'm relatively new to VBA in Access and need help to automatize something. I have a query with my salespeople performance month by month. I use one criteria to filter the information by salesperson. ...
1
vote
2answers
21 views

String Manupulation in VBA

I have single column that needs to be split to multiple, like Text-to-columns in excel. However there is a small challenge. Conventional delimiter will not work. Consider the string below Original: ...
0
votes
1answer
32 views

How to make a named cell read-only

I would like to make a cell "Cell Name" read-only. I found this code here but don't know how to use the String value instead of the range: Private Sub Worksheet_SelectionChange(ByVal Target As ...
0
votes
0answers
10 views

Runtime error 9:Subscript Out of Range near end of code at “Worksheets(”UserForm“).Select”

The following code is for a userform, the user having three options, one being less than 70,000 square feet, one being between 70,000 and 150,000 square feet and one greater than 150,000 square feet. ...
0
votes
2answers
37 views

Combine Multiple Values into Rows with Blanks

So I researched this for awhile, but I seem to be hitting a wall. I will admit- I successfully did this once, made a tutorial for my coworkers- then I nor anyone else was able to replicate the ...
2
votes
1answer
28 views

VBA selecting range in Excel

I can set the range for all of a column such as : ActiveSheet.Range("A:A") But I'd like to set something such as ActiveSheet.Range("A10:A") but there doesn't seem to be an easy way to do this ...
0
votes
0answers
18 views

VBA: how to color rows based on value in a spesific column - Coloring wrong sheet

I've been struggling with this for a while now. I need to color rows in Excel sheet 6 based on the value in column F. Everything works fine except the code is coloring the rows in Excel sheet 1! Help? ...
-1
votes
1answer
18 views

Deleting range of cells based on criterea

I have an Excel file with several macros, used for data processing. The masterfile reads one or more .csv files and copies all data it needs into a tab (lets call it sheet1) within the masterfile. ...
0
votes
1answer
16 views

Error outputting a string to cell

I am using a vba macro to automate part of an excel spreadsheet. The following line keeps giving me a runtime error 1004# application or object defined error Sheets("Material").Last.Offset(0, ...
0
votes
0answers
16 views

How can a Macro sort dates from oldest to newest?

I'm doing account statements in a bank and I need to be able to make them fast, so I am using macros for making this process. However, there is a step that I always have to do that a macro won't let ...
0
votes
2answers
29 views

VBA Excel: How to assign .txt file content to a string type variable?

I made a little sub in excel that sends an email according to the parameters you enter: Sub Mail_LSP(mailsubject As String, consignee As String, coalcopy As String, mailbody As String) Dim mlook As ...
1
vote
0answers
16 views

Why doesn´t my Outlook rule work more then once?

I´ve recently migrated my email to an exchangeserver, with my previous email set as a forward to my current one. I´m using outlook 2010 and Samsung galaxy s5. First problem at hand: Some E-mails ...
0
votes
1answer
15 views

Deleting rows that contain a keyword in the column

I have an excel file that has a id as one of the columns, each id has multiple entries and follow a set of survey questions. I need to delete all of the rows that have that keyword (which is in a ...
0
votes
2answers
45 views

Adding together values from multiple spreadsheets (VBA)

In my Excel workbook, I have three separate spreadsheets. The spreadsheets are identical in format and represent count values for different categories (passenger cars, trucks, etc.). I need to combine ...
0
votes
0answers
17 views

Replace multiple words in Excel sheet

Sub xLator2() Dim s1 As Worksheet, s2 As Worksheet Dim N As Long, i As Long Dim from(), too() Set s1 = Sheets("Sheet1") ' contains the data Set s2 = Sheets("Sheet2") ' contains the translation ...
1
vote
1answer
52 views

Find and replace multiple words in a column in Excel 2007

Sub xLator2() Dim s1 As Worksheet, s2 As Worksheet Dim N As Long, i As Long Dim from(), too() Set s1 = Sheets("Sheet1") ' contains the data Set s2 = Sheets("Sheet2") ' contains the translation ...
0
votes
1answer
25 views

Excel: portable formula to reference data on previous (relative) worksheet

I need to create a fairly simple Excel spreadsheet (workbook). I need 12 sheets (tabs), one for each month. Each sheet references cells in the previous sheet. For example, the "May" sheet is ...
2
votes
1answer
41 views

Replace cell references with values without F9 using macro

This is an Excel macro question. Given a series of formulas such as the following: = A1 + A2 = B2 + B2 etc., ... I would like to replace each of these cell references with the values without ...
0
votes
1answer
37 views

Hide columns based on content (sum of rows)

I'm trying to hide columns based on the sum of selected rows (i.e., cells) in those columns. For example - if the sum of E9:E12 is 0, then hide column E. Additionally, and probably a little harder - ...
0
votes
1answer
9 views

RE: displaying max of direct data input or cell value from formula

With reference to : Excel - how to either have direct data input or cell value from formula I would like to inquire on a related issue. How would i edit my VBA formula if i would like to compare the ...
0
votes
1answer
23 views

Disable or delete right click menus VBA

Whenever I right click on an excel sheet two menus come up: one with cut, copy, paste, etc. and one with font size, bold, italic etc. I can customize the first one to have whatever command I want. ...
0
votes
0answers
13 views

Creating an Excel Search Box which Unhides a Row

I've never done VBA before and I'm pretty sure that's the only way to achieve what I need. I have a master password list which I don't want people to see when they are looking at my computer. ...
0
votes
0answers
33 views

Forfiles SubFolders

I am hoping I can get some help here. I saw a another post similar to my problem and I figured I would give it a try. I have a Forefiles code running in Excel using VBA. The code works great on local ...
2
votes
0answers
44 views

copy data from multiple word files to excel with vba

I know this question was already asked (Copying data from multiple word docs into one excel sheet) the thing is I can't use the answer. I'm fresh to vba, but I thought I can handle it. I was wrong. I ...
0
votes
0answers
33 views

VBA Code to update data in closed excel files within a folder by clicking a button

I have a code which works really well that updates values of closed excel files in a workbook. What I want to do is alter the code so I can create a on my worksheet where I can make y changes I ...
0
votes
1answer
12 views

Filtering out (blank) within a PivotFiled from all pivottables in a workbook that have the same pivotfields

I have a bunch (14) of pivottables in two worksheets (7 in each worksheet). I have a refresh button on the sheet that refreshes all pivottables using the following code: Sub Refresh_Pivots() Dim pt ...
-1
votes
0answers
17 views

Excel or R: Make 1 file for each line of a table, preserving the headers

I have 200 lines in an excel table that I'd like to split into 200 files (csv), with the headers maintained in each file. Is there a way I can do this using VBA in excel, or even R? Many thanks
0
votes
1answer
46 views

Expanding a cell formula resolving all its references (precedents)

In Excel I have a cell containing a formula referencing other cells, which reference other cells and so on... forming a large tree of references. I'd like to substitute recursively all the occurrences ...
0
votes
0answers
5 views

How to paste clipboard text into AlternativeText of an image - Winword 2010

Using VBA, in Winword 2010; how can you paste the text contained in the Clipboard into the AlternativeText of the current selected image within a word document? Below is the code I've done, to ...
1
vote
0answers
13 views

Convert HTML to Word and embed file hyperlinks as attachments.

I have some HTML files that I'm opening with Word and saving as docx files. I have some macros I run to break the links on the graphics so that they get embedded in the doc file, but I haven't figured ...
0
votes
1answer
26 views

Excel 2007 VBA Export range as jpg file is trucating picture

I have a workbook with many different ranges of data with 77 lines or more. I need to copy them and save as JPG files, which will be used by other application. Below is the example of code that I'm ...
3
votes
0answers
56 views

show more than 8 items in the Data Validation drop down list in Excel

I have added a simple data validation to a cell but it only displays 8 items in the dropdown. Excluding the combobox solution and probably involving some WinAPI is there a way to make the drop ...
0
votes
1answer
48 views

VBA Lookup by Multiple Criteria - Then Copy & Paste

Currently I have a 2 way database with 10+ fields and 1,000+ rows. Some fields are customer name, car model, year of model, price, date of purchase. I would like to lookup rows of data by multiple ...
1
vote
2answers
37 views

Excel 2010: Calculate full months between dates

I have dates in two columns and I would need to calculate amount of full months between two dates. I export the spreadsheet from SAP ERP in .xls format but opening with Excel 2010. DATEDIF function ...
1
vote
0answers
40 views

Transferring Data Between Workbooks Based on a Value in a Specific Cell

I have created a form in Excel that moves information entered in the form to the adjacent sheet in the same workbook as well as my agents workbook at a different file path. That piece of the puzzle is ...
0
votes
0answers
28 views

VBA Excel: Macro working well, add-in does half of the job

I created a macro that: 1.takes the value in cell "D11" then 2.trims the value acording to some criteria, then 3.opens another workbook ans searches the trimmed value then 4.copies some info to ...
0
votes
0answers
16 views

Displaying images from database in a pivot table

I've got a table with sales data on MySql server. I can connect to it from Excel and generate a pivot table just fine. One of the fields in the table contains URL to an image of a product. Is there a ...
0
votes
1answer
43 views

Obtaining Frequency of A Number for Each Sub-Heading

I have two columns, one with people and times associated with those people, and one filled with 0s and 1s. For any given person there is some associated combination of 0s and 1s. We can determine ...
0
votes
0answers
40 views

Automation of solver in Excel by VBA macro code

I'm solving a 3rd degree polynomial equation, e.g., -0.003x3 +0.195x2 -1.087x -180 = 0 in Excel. I can do this by SOLVER of Excel and can find the value of x. The problem is the constant term ...
0
votes
0answers
53 views

Split Excel worksheet into multiple worksheets based on a column with VBA (Redux)

I'm rather new to VBA and I've been working with the code generously displayed and explained by Nixda: Split Excel Worksheet... My only challenge is I've been trying desperately to find a way to ...
0
votes
1answer
32 views

Convert formulas in table to structural references

I have converted my range in excel 2010 into a table. However, the formulas which were before like that(see below) stayed the same and do not convert into structural references. ...