Tag Info

New answers tagged

0

Without understanding all of your code, you can search for a file like this - Private Sub getname() Dim myfile As String myfile = InputBox("Please enter file name") With Application.FileSearch .LookIn = "C:\SFD" .filename = myfile & ".xlsx" If Not .Execute > 0 Then MsgBox ("File does not exist") Exit Sub ...


0

This type of operation is generally done with the Open File Dialog. I would suggest wrapping the code you need into a function like this: ' This will display the open file dialog and return either ' the selected file or an empty string if the user cancels. Function SelectFile(Optional sCurFile As String = "") As String Dim oDlg As FileDialog Set ...


0

I would resolve this with the Power Query Add-In. First build a simple Query to get the input text value from a table on the Excel sheet (e.g. Mango). Note this approach allows multiple values to be listed. Then start another Query from a simple SQL Query e.g. SELECT * FROM MyTable. Then add a Merge step to connect to the first Query using Product, and ...


0

You can filter the table using this formula in Column G =ISERROR(MATCH(B1;$E$1:$E$7;0)) supposed you have no column captions, otherwise adjust the range


2

I'd throw perl at this problem. http://search.cpan.org/~ambs/Text-BibTeX-0.70/lib/Text/BibTeX.pm should help. Something like: use Text::BibTeX; $bibfile = new Text::BibTeX::File "foo.bib"; $newfile = new Text::BibTeX::File ">newfoo.bib"; while ($entry = new Text::BibTeX::Entry $bibfile) { next unless $entry->parse_ok; if ($has_year = ...


1

NOTE: This solution is for the original set of requirements. It would need to be updated to work with the current version. And also, the perl based answer is much cleaner anyway :-) If you don't mind creating some temporary files, this could be a starting point: Copy that into a file and set the executable flag (chmod +x file) #!/bin/bash INFILE=$1 # ...


2

The usual way to do this is using AutoCorrect as described at the bottom of this page: http://office.microsoft.com/en-us/word-help/autocorrect-spelling-and-insert-text-and-symbols-HA010354277.aspx Essentially you would define a text equivalent for which Word would automatically substitute a symbol or set of symbols. For example: To add an autocorrect entry ...


0

This averages everything but the header with the header in Cell "B1" Dim GG as Long GG = Application.WorksheetFunction.Average(ActiveSheet.Range("B2", Range("B2").End(xlDown)))


0

Name Macro "AutoOpen" and it will run automatically everytime you open a document... :)


1

I just figured it out myself. Go to macro tab, within the macro tab there is a macro dropdown box. Click the arrow and choose one of them, then just delete any that you have. It shows that none are there but you just have to go in and select one.


0

Instead of feeding each property to the calculation sheet individually (and then writing the calculation results back to the data sheet), you may want to consider building the calculation in VBA, using UDFs. Then you can use these user-defined-functions in every row in the data sheet. Also, are you sure that you require a calculation sheet to arrive at the ...


0

The macro can only group the numbers in column 2-5, if the column name (Mr Bean), is situated beneath each other. How would the macro look like if it had to perform the same task, but Mr Bean is situated in random order: Mr Bean Mr X Mr Y Mr Bean


0

The easiest way I can think to do this is to create a table with your data. The table name is located by choosing any cell in the table then click the design tab in the ribbon. The table name will be in the upper left corner. Then use a formula to refer to the table and the column header. =COUNTIF(Table2[Smartphones], 0) As you add columns and ...


0

I believe the default is option-F8 to open the macro window. You can set it to F5 if you would like via Tools->Customize Keyboard… menu. Note that F5 is currently set to the "Go To" dialog box.


1

There are a few ways to do this, but the easiest is to use Application.Run(). As an example, I have a workbook named "SC Fun.xlsm" in order to run my getData() subroutine in that workbook, from another workbook, I can write: Sub runAnotherWokbooksMacro() Application.Run "'SC Fun.xlsm'!getData" End Sub


0

I had a similar problem with a Excel Macro tool written in the USA and I wanted to use it with in Germany. The tool seemed to get locked in a loop after starting so it didn't come to an end. I could finally solve this issue with changing the windows default for date, time, and number format, into US-standard like described here . So probably the VBA code ...



Top 50 recent answers are included