Twitter using Microsoft Excel

You can do this using twitter api is relatively simple. Well some one has done one better and went ahead and built an excel sheet using which you can post messages to your twitter account. Interested? Read on

Link deleted because of suspected virus

Automatic TRIM Patented

U.S Patent 7,475,086 granted to IBM: Method of automatically removing leading and trailing space characters from data being entered into a database system.

A computer Implemented method of automatically removing space characters from data being entered into a database system are provided. When a user creates a table in a database system into which data having leading and/or trailing character spaces may be entered, the user may specifically instruct the database system to remove any character spaces before entering the data into the table.

Consequently, when a piece of data is being entered into the table, the database system will determine whether the piece of data includes leading and/or trailing character spaces. If so, the database system will automatically remove the character spaces from the piece of data before it is entered into the table. Hence, the use of TRIM functions when retrieving data from the database system will be obviated.

It took three people from Texas to come up with that idea, and they thought it was so brilliant that it deserved to be patented.

Does this mean that the following VBA procedure violates the patent?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
On Error Resume Next
For Each cell In Target
If Not cell.HasFormula Then cell = Trim(Target)
Next cell
End Sub

Finding merged cells using VBA

Here is another way to find merged cells thanks to Allen Wyatt
You can use a macro to find the various merged cells in the worksheet. Here are some options for you try.

Sub FindMerged1()
Dim c As Range
For Each c In ActiveSheet.UsedRange
If c.MergeCells Then
MsgBox c.Address & ” is merged”
End If
Next
End Sub

This particular macro steps through all the cells in the UsedRange and if the cell is part of a merged cell, a message box is displayed. Note that the pertinent property being checked is the MergeCells property. This is set to True if the cell is merged with another cell.

Of course, a macro such as this can take quite a long time to run if the worksheet has lots of cells and even longer if a good number of those cells are merged. Your macro would run faster if it didn’t stop at each merged cell and display a dialog box. The following version takes a different approach, filling each merged cell with a yellow color:
Sub FindMerged2()
Dim c As Range
For Each c In ActiveSheet.UsedRange
If c.MergeCells Then
cell.Interior.ColorIndex = 36
End If
Next
End Sub

A variation on this approach could be to create a user-defined function that simply returns True or False if the cell is merged:
Function FindMerged3(rCell As Range)
FindMerged3 = rCell.MergeCells
End Function

With this simple function you could then use conditional formatting to somehow highlight cells if they are merged. (If the function returns True, then conditional formatting applies whatever formatting you specify to the cell.)

Finally, if you want a list of cells that are merged in the worksheet, you can simply have your macro put together the list instead of coloring the cells:
Sub FindMerged4()
Dim c As Range
Dim sMsg As String

sMsg = “”
For Each c In ActiveSheet.UsedRange
If c.MergeCells Then
If sMsg = “” Then
sMsg = “Merged worksheet cells:” & vbCr
End If
sMsg = sMsg & c.Address & vbCr
End If
Next
If sMsg = “” Then
sMsg = “No merged worksheet cells.”
End If

MsgBox sMsg
End Sub
This variation displays a single message box at the end of the macro, indicating the addresses of any merged cells located in the worksheet.

Next Page »