|
|
|
|
|
|
Excel
|
Function To Reverse a String In a Cell
|
|
Ease of Use
|
Easy
|
Version tested with
|
2002
|
Submitted by:
|
Jacob Hilderbrand
|
Description:
|
This function will reverse the supplied text.
|
Discussion:
|
VBA has a built in function to reverse a string, but this cannot be done from a cell by default. This function will allow you to easily reverse any string.
|
Code:
|
instructions for use
|
Option Explicit
Public Function ReverseString(Text As String)
ReverseString = StrReverse(Text)
End Function
|
How to use:
|
- Open Excel.
- Alt + F11 to open the VBE.
- Insert | Module.
- Paste the code there.
- Close the VBE (Alt + Q or press the X in the top-right corner).
|
Test the code:
|
- In a cell type = reversestring(D1) where D1 can be a cell address, or the value/text you want to reverse.
|
Sample File:
|
No Attachment
|
Approved by mdmackillop
|
This entry has been viewed 180 times.
|
|