Tag Archive: vba for


Uppercase/Lowercase conversion in Excel through VBA

Well, there is no easy way to ‘change case’ in excel. So i wrote few small VBA snippets to perform case conversion. To perform uppercase conversion on the selected cells Sub UpperCase() Dim Cell As Object For Each Cell In SelectionCell.Value = StrConv(Cell.Value, vbUpperCase) Next End Sub To perform lowercase conversion on the selected cells …

Continue reading »


How to use the VBA find and replace function

I like the single line function yet powerful command with VBA to perform find and replace functionality. It’s used for String (text) find and replacement Here is the syntax to use it, <result string> = Replace (<string to process>, <find what>, <replace with>) Here is a sample, Dim sampleText As String Dim resultString As String …

Continue reading »