VBA (Visual Basic for Applications) is the dominant programming language for Microsoft Office Applications [Word, Excel, Access...].

learn more… | top users | synonyms

0
votes
1answer
12 views

multiple use of substitute function but it should combine the results in one column and cell

please check the picture link to understand the query ** I want to combine the multiple raw into one text string , I can use substitute function to change one word in a text string but how can i use ...
0
votes
1answer
12 views

Copying cell data from one worksheet to another

I have attempted to create an Excel VBA function that will copy the data in cells from worksheet 1 and paste them into worksheet 2. Ideally, I'm checking cells AF6, AF7... all the way to whatever the ...
0
votes
0answers
12 views

Restrict the data in powerpivot based on the user who is using file in excel 2010

I wanted to create a powerpivot report. In which i wanted to show only the data the user authorized to view based on his windows credentials. For example consider the following table ID Code ...
1
vote
1answer
23 views

Copy and Paste Issue

This code works two or three times, and then I get a "PasteSpecial method of Range class failed" error. I know I get that error when nothing is copied, but considering it's copied right above, I don't ...
-4
votes
0answers
25 views

Rationalization Model in Excel

Hey guys I have to make a Retailer Rationalization model where the algorithm will be something like this A Form which will have certain parameters like Volume/Spokes etc. Data will be entered into ...
5
votes
1answer
33 views

Why doesn't Option Explicit catch ReDim <undeclared>?

Does anyone know why this doesn't throw a Variable not defined error when I compile it? 'Class1.cls' Option Explicit Public Sub foo() ReDim fubar(1 To 2, 1 To 1) End Sub Am I misunderstanding ...
1
vote
2answers
53 views

For Each loop not going through all the data

I have a simple macro that goes through a series of sheets, gathering names based on a data inputted, then puts it all in a nicely formatted Word document. I have most of it figured out, but one bug ...
0
votes
0answers
38 views

VBA How can I make a code to create tables from a set of data

I have a worksheet which comes in every week with the same format that I need to summarise information for, for a number of Business units. The format is as follows: The worksheet is populated from ...
0
votes
3answers
31 views

How to make match() work with date in excel vba?

I'm having problem making the match() work in excel VBA. The code is: x = Application.Match("Sep 2008", Range("F1:F1"), 0) The value in cell F1 is 9/1/2008. Even if I changed Sep 2008 to 9/1/2008, ...
0
votes
1answer
37 views

How to find the earliest MMMYY from a date array?

Does anyone know how might I find the earliest MMMYY from an array of the following form (see column K). Note: the date are not sorted in ascending order. Code: Sub outputfile() 'Capture the ...
0
votes
2answers
27 views

Macro to copy and paste 5 last columns problems

I've just written a macro to find the last 5 columns with data and then copy and paste this preceeding the last column. I built this macro in a dummy document so not to corrupt my current file and ...
0
votes
1answer
19 views

Excel VBA Run-time error '13' Type mismatch

I am trying to copy values from one work book to current work book but i get the error: Run-time error '13' Type mismatch I tried a lot but not get a solution any one please help me out Sub ...
2
votes
1answer
31 views

Error 1004 - This selection is not valid on Range.Insert

I am getting a runtime error 1004 - this selection is not valid error, when attempting to run a VBA amcro in excel. I have looked around for solutions, and all the ones I have tried have so far been ...
0
votes
1answer
22 views

In Excel-VBA .how to save a xml file in the existing sheet without saving it any drives

Please check below code... Here I dont want converted xml code to save in any drive, Instead I want to put the contents of converted file into the next sheet of existing excel. Sub GenerateXML() ' ' ...
2
votes
2answers
53 views

Does Excel's Worksheet Comparison Operator Give Inconsistent Results?

Consider the following. Place =400000000000000/3 in a cell, say "A1". Excel displays 133333333333333.0000. The precision is zero digits to the right of the decimal point because, apparently, Excel's ...
0
votes
3answers
48 views

Call sub not working the same as running macro by itself

I have a sub which works fine when run as a stand alone macro but if I call it Call selectFolderUpdateData it does not exacte this part selectedfolder = GetFolder("C:\Users\Tim\Desktop\SampleCo ...
-1
votes
1answer
21 views

print the sheets from the list if I check [closed]

I need the excel VBA I make a list of excel sheets in a workbook.column A:is the name of the activesheets(with hyperlink to every sheet);column B:I made the checkboxs.What I need is "when I check the ...
3
votes
2answers
36 views

Copying a discontinuous range from one sheet to another

VBA rookie here (and first-time poster) with what is probably a pretty basic question. However, I haven't found an answer anywhere on the internet (or in the reference books I have) so I'm pretty ...
-2
votes
0answers
34 views

VBA-Excel Store userform data in separate workbook [closed]

I have created a userform and currently have the data being stored in a worksheet in the same workbook as the form. Is it possible to have the data stored as a new row in an entirely different ...
2
votes
2answers
47 views

Excel function or VBA script to combine ranges

I have 2 columns each with a varying amount of rows. In this instance I want to merge (scalar multiple? multiple matrices?) the item in A1 with the range(B1:B50) and then repeat for each item in ...
1
vote
1answer
30 views

Conditional formatting on entire sheet via Macro

Need your help. In my Spreadsheet there is a macro that when activated test to see if a cell color in the entire set of data is pink. If one is found then the fist cell is marked pink, alerting me to ...
1
vote
1answer
22 views

Weird Excel bug when deleting sheet with named ranges?

I have an excel workbook that includes 2 worskheets, wkshtA and wkshtB. They both have local named ranges (the scope of each named range is just the parent sheet). Some cells in wksht B reference ...
1
vote
2answers
21 views

How to access a query with a dependant range of cells

this function opens a connection to a an sql database, collects data and bring it back and copies it into cell O6 and onward. I have come into two problems. My first is i want to select a range of ...
2
votes
2answers
37 views

VBA - open excel, find and replace, delete row, save as csv

I am trying to write a program in VBA so that I can remotely manipulate an excel file from SAS (a statistical programming software). I want the program to accomplish the following: open the ...
1
vote
1answer
19 views

Trying to save sheet 2 of a workbook on the desktop as CSV

This function, when clicked on should ideally copy all of worksheet 2 to another workbook and save that sheet as a csv file. its not working... and i don't know how to tell it where to save the file ...
0
votes
0answers
17 views

Is it possible to convert and excel/vba dashboard to a html/javascript dashboard

I've created a dashboard that relies upon excel and vba. After creating the dashboard, I learned of a requirement to publish the dashboard on our internal SharePoint site. Apparently, SharePoint ...
0
votes
3answers
35 views

automated solution for manual copy-paste-transpose?

I have an excel spreadsheet that has data pulled from a different data source. The problem I have is that the data is 'repeated': (Site is column A and Owner is Column B): Site ...
-2
votes
0answers
22 views

date rangy with sum quantity macro [closed]

Hi friends i have one doubt i have date range like 1-7,8-14 and so on,and i want sum of quantity month wise and grand total also,i do`t know how to create macro,please send me the code! Output Date ...
-2
votes
0answers
31 views

Adding Macro that fetches data from multiple sheets and populate in another sheet after comparison

I am new at Stackoverflow so please forgive me if you see anything wrong in my posting. Basically i am web programmer but i am just new to Excel-VBA but stuck on writing a Macro in Excel-vba .. Here ...
1
vote
0answers
26 views

VBA to merge multiple pivot tables for multiple workbooks to create a master pivot table

I've found a code that I've (mostly) successfully modified for my use, but am getting an error on the grouping function. I have a folder that has (at present) 3 workbooks in them. Each workbook is ...

1 2 3 4 5 266
15 30 50 per page