Teach Microsoft Office
Online Video Tutorials for Microsoft Office
Microsoft Office Excel Macro

Reverse Cell Contents (Mirror)

Bookmark and Share
This macro will completely reverse the contents of any cell. This means that if you have a cell which reads "My Text" and you run this macro on that cell, it will then read "txeT yM".

This macro will not work on cells which contain formulas. It will only work on cells that contain strictly text and numbers.

Run this macro on a selection of cells in a worksheet. This means that you select any number of cells and then run this macro and it will reverse the contents of every cell which you selected.
Macro Installation Location: Module
Keywords: sort data sorting excel one column next subset adjacent data set table advanced
Reverse Cell Contents (Mirror)
Sub Reverse_Cell_Contents()

   If Not ActiveCell.HasFormula Then
        sRaw = ActiveCell.Text
        sNew = ""
        For j = 1 To Len(sRaw)
            sNew = Mid(sRaw, j, 1) + sNew
        Next j
        ActiveCell.Value = sNew
   End If
End Sub

 
Official PayPal Seal SSL Join TeachMsOffice.com on Facebook Follow TeachMsOffice.com on Twitter


Microsoft Office Tutorials | Office Tutorials - Excel Word PowerPoint | HD Tutorial Video Player Overview | About TeachMsOffice.com

TeachMsOffice.com provides HD Online Video Tutorials and Training for Microsoft Office programs such as Excel, Word, and PowerPoint. We use a specialized video player interface to teach a vast list of Microsoft Office Tutorials and we add new tutorials on a weekly or monthly basis.