Search Results for "Vba+create+new+sheet"

  

Create New Excel Worksheet With VBA

The Excel VBA macro below will create a new Excel Worksheet called ‘RawData’ or we can use msgbox to ask for the Worksheet name if needed. If there is already a Worksheet called RawData, user will be ask whether they want to use the old Worksheet and cancel new Worksheet creation, or delete the old [...]

How to get an Acronym using Excel VBA?

The purpose of the following example of Excel VBA macro is to get the acronym or an abbreviation of each of the first letter of any given words. Function Acronym(Words As Variant) As String Dim aWord() As String, ix As Integer aWord = Split(Words.Value, ” “) For ix = 0 To UBound(aWord) Acronym = Acronym [...]

Excel VBA Add Set of Worksheets Automatically

There is a time when we must create a set of Excel Worksheets templates on a regular basis in our work. For example, a set of Excel Worksheet for each month of the year or may be based on the type of work we should done in certain time base. Here a simple example of [...]

VBA Delete Excel Rows Based on Certain Date

Let say I have a bunch of formatted data in my Excel sheet, and in Column A I have a dates. Then I wanna filter all the data base on certain date, for example 1 Jan 2009, and delete all others data before that date. The algorithm is like this: I’ll create a loop from [...]

How To Find the Last Row That Contain Data in Excel?

UPDATE June 13, 2008: Another alternative way to find the last row with data : Function LastRow() As Long Dim ix As Long ix = ActiveSheet.UsedRange.Row – 1 + ActiveSheet.UsedRange.Rows.Count LastRow = ix End Function I did a simple test, and the function will return the correct last row position even when the data was [...]

How to create Excel function/formula?

This is the reason why the power of Excel when combined with VBA is almost limitless. When we can’t found any Excel function that suite our need, we can built it easily using Excel VBA. If Excel macro or SUB procedure is easily created using Record Macro button, and usually build to simplify a complex [...]

Sum Unique/Distinct Values in Excel

Usually in the sequential database system, we can SUM only unique values in table column by adding all the values from SELECT DISTINCT query result only. Based on the same principle, we can also create a simple VBA function in Microsoft Excel by adding the values only available in a collection of unique values we [...]