VBA (Visual Basic for Applications) is the dominant programming language for Microsoft Office Applications [Word, Excel, Access...].
1
vote
1answer
20 views
multiple criteria for sumifs
I have two sheets: one is input and the other is master.
A snapshot of my input sheet is shown below:
Workers Name WEEK working hrs
a11 w1 40
a22 w5 30
...
-2
votes
0answers
20 views
Saving a excel file to a server using vb script
How to save a file using vb script?.I am updating a xlsheet and have written code in the same file.I need save it into a server using the code.
0
votes
1answer
24 views
How to select next item in Data Validation list using VBA
I have a Data Validation list with dates in it. When you change the date it effects what data is shown in the rest of the worksheet.
I would like to to create 2 command buttons,
"Next" - when ...
0
votes
3answers
47 views
Excel, for loop issue
I am trying to set up a simple for loop in Excel VBA that starts at a specified row, and iterates till the end of the document? I cant seem to find out how to do this through google. Any help would be ...
0
votes
1answer
29 views
how do I add a date to the bottom of a list of dates in excel automatically on a daily basis
I have a list of sequential dates (1/01/2012, 2/01/2012, 3/01/2012 etc) in a column in Excel. I want Excel to check the current date and add that date to the bottom of the range if it isn't there ...
0
votes
1answer
35 views
Excel/vba find character, replace and make two characters after superscipt
What I want is to find "#" char, remove it and make 2 characters after it superscript.
I`ve got this code:
pos = InStr(mycell.Value, "#")
If pos > 0 Then
mycell.Replace What:="#", ...
3
votes
2answers
23 views
copy multiple columns from one sheet to another
I have a time sheet for my workers who log their time using the sheet having below order
Categories Washing Cleaning Office Duties Baking Cooking
Date Hours Hours Hours ...
0
votes
1answer
42 views
VBA Code to rename & save
I work in a sales office and currently we use hard copies of all sales quotes and file them alphabetically. I have made an excel version of our quote paperwork to hopefully make everything more ...
1
vote
2answers
72 views
Workbook_BeforeClose across Application
I have Workbook_BeforeClose in 'This Workbook' of my addin, and when I open several workbooks in the same excel instance and try to close each one of them, Workbook_BeforeClose does not get called for ...
-1
votes
0answers
45 views
VBA Excel - Get suggestions for misspelled
I have a huge amount of words in txt file. Many of these words are misspelled and I want to check them by Microsoft checker via Excel macro. So I need to save all suggestions to another file or sheet.
...
0
votes
0answers
54 views
Excel macro that automatically highlights which values in a range are not ignored in formula/calculation with conditions
I need a excel macro that automatically highlights which values in a range are not ignored in a sumproduct formula with conditions or an if formula; for example in range A1:C1 if only values in cells ...
2
votes
1answer
16 views
Send data using msxml2.xmlhttp.3.0 to web to select Datepicker in EXCEL VBA
The following is the HTML of part of a web page.
"input name="ctl00$ctl00$AllContent$ContentMain$ucMktStatCtl$txtDate" type="text"
id="ctl00_ctl00_AllContent_ContentMain_ucMktStatCtl_txtDate"
...
0
votes
1answer
56 views
Get filenames FSO with comparision of filenames to sort first by specific namestructure. EXPERIENCED ADVISE REQUIRED
In the code below I could wrote a code to display filenames from a folder. The problem is now that I should display them in the correct Row. For now they are displayed in random sequence and that is ...
0
votes
0answers
18 views
How to Filter a column having greater value than the previous column using vba in Excel?
I have created a worksheet. I have a master sheet in which I pasted links of different worksheet. So I need to filter a column. But the condition is value should be greater than the previous column by ...
0
votes
0answers
28 views
Excel Web Data Import
I want to import News from a specific website for a given two dates to excel worksheet.
When I input Dates to B5 to B6 cells and Click on a CommandButton, Excel Might import all news from that page ...
-1
votes
0answers
42 views
Replace cell contents with multiple cells
Is there any way to replace a cell with multiple cells and have them relate to other multiple cell substitutions?
Worksheet A:
With a substitution logic in Worksheet B where the items in column A ...
0
votes
1answer
25 views
Excel Worksheet Change VBA to update formula range in a worksheet for changing input data
I have found this answer on SO that is close to what I want to do, but my knowledge of VBA is too basic to modify for my specific situation.
Automatically copy formulas as data expands
The ...
1
vote
1answer
19 views
Is it possible to change the backcolor of a activex checkbox to match the background color of the excel worksheet?
I am trying to get my ActiveX checkbox to match the same color on my excel worksheet. It would be better if the backcolor would be clear. Is there a way to accomplish this?
2
votes
2answers
37 views
#Ref error when delete one of the sheets
I have sheets from 1 to 50 and a summary sheet that has formulas based on sheet 1 to sheet 50 (very long formula!). However, whenever I run the macro, the macro will delete one of the 50 sheets and ...
0
votes
1answer
27 views
excel paste special function in vba not pasting cell widths
I'm running a macro to copy from one sheet and past to another however, it is not pasting the cell width. If I do this manually it works i.e. copy the column and paste special > all. the vba code ...
2
votes
1answer
39 views
Excel VBA: How do you combine two columns into a first-level sort?
I am trying to put a whole worksheet in time order, but I have two time columns that control this. I would like to code a routine that will use both time columns together to create the first-level of ...
0
votes
1answer
36 views
Excel VBA- Storing Values to Display Later
What I am looking for is to store values for a graph. We have two relevant columns of data: A has the Name, B has the Amount. What I need to do is sum the Amounts that have the same Name, pull the top ...
-1
votes
1answer
48 views
Macro to change values of the cell range to values only
A1 has list that includes the 12 months of the year
B2 to M2 row are months – Jan to Dec
B3 to B7 categorizes that are scored each month
I want to program a button to do the following
When I click ...
0
votes
1answer
36 views
Reading a workbooks without opening it with ADO
After this question: get value/charts in another workbooks without opening it
I have coded this:
Sub test()
Dim oConn As New ADODB.Connection
Dim rst As New ADODB.Recordset
oConn.Provider = ...
1
vote
1answer
63 views
converting excel sumifs formula to vba code
I'm trying to do a SUMIFS calculation in VBA. It works fine when I enter it on the spreadsheet, but when I try to convert it to VBA, it doesn't seem to work.
Sheets("Master").Range("B2:B" & ...
0
votes
1answer
29 views
Fetch all rows that meet criteria and display in new sheet
I am trying to automate excel so that it allows me to show all records from another tab where a certain condition is met.
my source table is(Analysis tab):
I have name all my ranges according to ...
1
vote
2answers
29 views
Excel named range with relative reference is not calculating
I have a named range called "cellabove" in my workbook that always references the cell above the cell it is used in. The RefersToR1C1 property of the name is "=!R[-1]C". This allows it to be applied ...
-1
votes
0answers
18 views
Excel Web Query To Import Data [closed]
I want to import data from the following site:
http://www.dsebd.org/news_archive.php
VBA will ask for two dates, I will input two dates. If any news found between these two dates, then all news to be ...
1
vote
2answers
36 views
Staging function and printing results to cells VBA
Essentially I have an array A = Array(1, 2, 3, 4, 5) what I want to do is, with the use of Rnd(), circle around this loop depending on the value of the random numbers.
Basically start at 0 Mod 5 get ...
-2
votes
2answers
45 views
order of cells in loop “for each cell” [closed]
I'm wondering if there is a rule to know in wich order the loop will be done ?
Is there a way to change it ?
Let's say I have multiple ranges on multiple sheets on multiple workbooks.