Check If Excel Workbook is Already Open or Not

Posted on the October 28th, 2008 under Cells and Range by Poer @ Excel VBA/Macro

In my case, I work a lot with transferring data from current Excel Workbook to another Excel Workbook, and to be able to do that, of course I need to make sure whether the destination Workbook is already open or not.

The following excel vba function assigned to check whether a workbook we need is open or not.

Using Workbook [...] Continue Reading…

How To Find Row Position of a Particular Text

Posted on the October 27th, 2008 under Cells and Range by Poer @ Excel VBA/Macro

Sometimes in Excel, we need to find the row position of a particular text, maybe to be able to paste certain of data right below the corresponding text or else.

Very useful if we have an Excel Worksheet Template that we use a lot, with fix header on it.

‘ Input param: Text we want to look for
‘ Optional input [...] Continue Reading…

Select All Cells With Formula In It

Posted on the October 25th, 2008 under Cells and Range by Poer @ Excel VBA/Macro

Let say we want to distinguish between ordinary cells and cells with formula in it, so we give a special background color to the cells with formula.

For doing it manually is time consuming, especially on Excel Worksheet with large of cells with formula in it (usually a very complex worksheet).

The following vba macro code will do the trick for [...] Continue Reading…

Move Cursor To One Cell Below Last Row With Data

Posted on the October 15th, 2008 under Excel VBA Function by Poer @ Excel VBA/Macro

Ever want to paste some data into new empty cell after the last cell with data in certain column? Then take a look at this simple macro.

‘first, select cell in the first row of that column, like A1, K1, etc
Range(“A1″).Select

‘move to the last cell with data
[...] Continue Reading…

Finding Cell with Minimum/Maximum Value in Active Worksheet

Posted on the October 4th, 2008 under Excel VBA Function, Workbook and Worksheet by Poer @ Excel VBA/Macro

Let say we want to find position of cell containing the minimum/maximum value in current/active Excel worksheet, and then after we found the cell, we will change the cell format to make it stand out before other cells.

The logic is simple, we just need to use Excel MIN function to find the minimum/maximum value on the worksheet, and then [...] Continue Reading…

Automatically Protect/UnProtect All Worksheets

Posted on the September 26th, 2008 under Workbook and Worksheet by Poer @ Excel VBA/Macro

Tonight I want to automatically protect and unprotect all Microsoft Excel Worksheets in my Workbook with password, instead of doing it manually, I put these following Excel VBA macro code in my Workbook.

Public Sub ProtectAllSheets()

Dim objSheet As Worksheet

‘Protecting all worksheets with password
For Each [...] Continue Reading…

How To Hide an Excel Worksheet

Posted on the September 24th, 2008 under Workbook and Worksheet by Poer @ Excel VBA/Macro

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 selecting Hide, they simply need [...] Continue Reading…