Search Results for "Excel+vba+hide+column"

  

Get Position of Last Column Containing Data with Excel VBA

If you read my latest update on how we can get position of last row containing data, then most probably you already have a glimpse on how we perform the same task with last column containing data in Excel. The VBA code is the exact replica of the code to get the last row, only [...]

Convert Excel Column Number into Column Name

Update: Sorter version of the VBA function: Function Number2Char(c As Integer) As String Number2Char = Split(Cells(1, c).Address, “$”)(1) End Function Courtesy of The Plaid Cow. OR Function Number2Char(ByVal vNumber) Dim addr As String If vNumber 256 Then Exit Function addr = Range(“A1″).Offset(0, vNumber – 1).Address Number2Char = Replace(Replace(addr, “$”, “”), Range(addr).Row, “”) End Function Courtesy [...]

How To Hide an Excel Worksheet

Some time we want to hide a certain Excel Worksheet from view, and it’s a common practice to use select the Worksheet, go to menu Format > Sheet > Hide. Using the method explained above is right, but unfortunately, others people can easily unhide the Worksheet using the same method, only this time, instead of [...]

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 [...]

Excel Extract Cell Comments

Excel VBA/Macro example below will extract comment from every cells with comment, and put the summary in the cell selected by user using Excel input box (read more about how to get cell reference using input box here). Sub CreateCommentsSummary() Dim rgComments As Range, rgCell As Range, rgOutput As Range, iRow As Integer, iCol As [...]

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 [...]