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…
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…
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…
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…
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…
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…
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…