Changing Microsoft Excel Status Bar

Maybe for some reason we want to change our Microsoft Excel Status Bar, then this simple vba function will do the work for us.
The end result will look like this:
Ok, to do it, put this following code in ThisWorkbook code
Private Sub Workbook_Open()
‘when workbook opened, change the status bar
[...]

Tags: , , ,


How To Open Excel File Using Macro

Imagine this condition; We are in the middle of doing something using Excel VBA macro, then we want the macro to automatically show the File Open dialog box to make us (user) able to choose another Excel file to be opened by Excel.
Got the picture? Below is vba procedure that do exactly like that, show [...]

Tags: , , , , , , , , , , , , ,


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


Remove Non-AlphaNumeric Characters from String

The function below will allow us to remove a non alphanumeric character from an input string.
Be careful though, lengther the string, more time needed to evaluate each string on the sentence.
To bad that I don’t have any idea on how to use Regular Expression in Excel VBA, if we can use regex to replace [...]

Tags: ,


Automatically Run an Excel Macro

Auto run macro excel… Do you want to run an excel macros automatically when the file is open or close?
Microsoft Excel provide us the opportunity to run a macro automatically every time we open or close the excel workbook file, using the event Workbook_Open and Workbook_BeforeClose.
In the Microsoft Visual Basic Editor page, in the ThisWorkbook module, we simply [...]

Tags: , , ,


Getting Cell Reference With Input Box

We can get an input from user using Input Box, but we also can use the Input Box to get the address of cell reference in Microsoft Excel.
Using simple Excel VBA procedure below we can ask user to select range of cells (as copy input) and where they want it paste.
Sub CopyPaste()
Dim InputCells As Excel.Range
Dim [...]

Tags: , , , , , , ,


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

Tags: , , , , , , ,


Auto Expanding VLOOKUP Table Array

Ok, this time I want to talk about how to create a vlookup table array that automatically expanding in accordance with the numbers of available data.
As we know, the basic form of Excel VLOOKUP to look for A1 value in range B1:C15 column no 2 is like this:
=VLOOKUP(A1,B1:C15,2)
With parameters such as the value we looking [...]

Tags: , , , , , , , , ,


How to ceiling a decimal number in Excel?

Ceiling, or changing a specific decimal number into become its upper number, for example if we ceiling 3.25 we will got 4, or if we ceiling 2.75 then we will got 3 as a result.
To get a result like that in Microsoft Excel, we can simply use this very simple but neat Excel VBA function
Function [...]

Tags: , , , , ,


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

Tags: , , , , , , ,


Number of Cells/Rows/Columns With Formula

A few weeks ago I received this question from someone called LS:
Hi
I want to write a macro that counts the following
- Number of cells with formula
- Number of Rows with formula
- Number of Columns with formula
Please let me know if there is a way of doing it in Excel VBA
To find out the number of [...]

Tags: , , , , , , , , , ,


Schedules to Refresh Data Automatically using VBA Macro

I once asked by Joshuacht about how to make a macro running every 15 minutes. Let say because every 15 minutes we have to refresh or reload the data in the Workbook.
Below is a sample of how we can do this in Microsoft Excel *just an outline*.
The logic is simple, when we open the [...]

Tags: , , , , , ,