General discussion

Locked

Math functions Excel 2000

By vlad7 ·
Is there math function in MS Excel that can convert for example: 1234 in one cell to 4321 in the same cell.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Math functions Excel 2000

by R. A. Caluste In reply to Math functions Excel 2000

no direct formula but try this:

A1 = 1234
B1 = MID(A1,4,1) & MID(A1,3,1) & MID(A1,2,1) & MID(A1,1,1)
The result is B1 = 4321

hope this helps.

Collapse -

Math functions Excel 2000

by vlad7 In reply to Math functions Excel 2000

Poster rated this answer

Collapse -

Math functions Excel 2000

by DKlippert In reply to Math functions Excel 2000

For 2000 and above:

This function ? MyStrReverse():

Function MyStrReverse(s As String) As String
Dim i As Long, rslt As String
For i = Len(s) To 1 Step -1
rslt = rslt & Mid(s, i, 1)
Next i
MyStrReverse = rslt

End Function
Combined with an on event action:
(Right click the tab and choose View code, Paste this code in the Visual Basic Editor):

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveCell.Value = MyStrReverse(ActiveCell)
End Sub

You have to reselect the cell to see the change.

Collapse -

Math functions Excel 2000

by vlad7 In reply to Math functions Excel 2000

Poster rated this answer

Collapse -

Math functions Excel 2000

by vlad7 In reply to Math functions Excel 2000

This question was closed by the author

Back to Software Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums