Category Archives: Excel

No Thumbnail

Word VBA, Save Table as JPEG

In this article I will explain how you save a word table as a JPEG using VBA for word. Unless if you are willing to using windows API functions, I have yet to find a direct method for doing this in VBA for word. The

No Thumbnail

Word VBA, Date Format

When writing dates to a word document you could specify a specific format. For example consider the code below: Sub main() Range.Text = Date End Sub It prints the current date to the document: We can change the way the date is output using the code

Excel 2010 Show Developer Ribbon

In this article I will explain how to bring the developer Ribbon in Excel 2010 – Step 1: Click on the “Files” button on the top left of the screen – Step 2: Click on the Options button: – Step 3: On the window that opens

No Thumbnail

Excel Change Formula Calculation to Manual

In this article I will explain how you can prevent Excel from automatically updating formulas. This is specially useful when working with large workbooks with a large amount of formulas. You can force excel to update the formulas only when specified. – Changing Formula Calculation to Manual:

No Thumbnail

Excel VBA, Working With Sheets

In this article I will explain how to work with the worksheet object. One the most important thing to know when working with worksheets is understanding the difference between the items below: Sheet Object’s Variable Name Sheet Name Sheet Index I will also explain how

No Thumbnail

Excel VBA, Save Range/Cells as JPEG

In this article I will explain how you can use VBA for Excel to save a range of cells as a JPEG image. Basically what we do is the following: Create an empty chart in some sheet which is not used. Copy the cells with

No Thumbnail

Excel Speed, IF (Formula vs VBA)

I have conducted several tests to see the fastest way to implement an If function in Excel. In these tests I have compared the native excel IF() function, with several methods of using the “if” statement in VBA. Each test basically executes the following algorithm

No Thumbnail

Excel VBA, XlRgbColor

The enum XlRgbColor contains a list of color codes. Although this list is limited but often it is enough to get the job done. If you require more specific colors please see Excel VBA, Color Code. In the example below the color code associated with some of

No Thumbnail

Excel Custom Formatting, 0, # and ? characters

In this article I will explain the characters “0”, “#” and “?” used in custom formats. – “0” Character: The “0” is a placeholder for digits. On the left hand side of the decimal: If  there aren’t enough digits to fill the placeholders, zeros will be added

No Thumbnail

Excel VBA Remove Range Fill Color

The following line of code removes the fill color of the range A1:B2: Range(“A1:B2”).Interior.Color = xlNone The following line of code does the same: Range(Cells(1, 1), Cells(2, 2)).Interior.Color = xlNone Before: After: See also: Excel VBA, Cell Fill Color Excel VBA, Formatting Cells and Ranges using