View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default reverse cursor/text direction within cell

Copy/paste the UDF to a general module.

Public Function RevStr(rng As Range)
RevStr = StrReverse(rng.text)
End Function

Copy/paste the event code to the worksheet module.

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:A10"
Dim cell As Range
On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.Value = RevStr(Target)
End With
End If
ws_exit:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On Sat, 23 Aug 2008 13:26:49 -0700 (PDT), wrote:

Hi,

I'm trying to enter text within a cell from right to left instead of
the default left to right. For example, if I type "jason" I normally
see "jason" in the cell. What I would like to see is "nosaj" instead
of "jason". I'm not looking for a reverse text macro since I want the
direction to be changed as I type it in. Does anyone know if there is
a way to change the default settings to permit this?

Thanks,
Jason