View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Auric__ Auric__ is offline
external usenet poster
 
Posts: 538
Default To be got Alphabetic

Moideen wrote:

Not Getting..

Eg: 1.550 , Shown only : A.FF, To be Shown : A.FFS


Okay, I've found the problem (which was in part due to me misunderstanding
your problem). Use one of these:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE(FIXED
(A1,3,1),1,"A"),2,"B"),3,"C"),4,"D"),5,"F"),0,"S")

....or...

Private Sub Worksheet_Change(ByVal Target As Range)
For Each cell In Target
If cell.Column = 1 Then cell.Offset(0, 1).Value = Replace(Replace( _
Replace(Replace(Replace(Replace(Format(cell.Value, "#.000"), _
1, "A"), 2, "B"), 3, "C"), 4, "D"), 5, "F"), 0, "S")
Next
End Sub

Note that both of these will *always* give you 3 decimal places,
regardless of the source data:

1 A.SSS
1.55 A.FFS
2122.33333 BABB.CCC

Also, both will remove any commas (thousands separators) from the number.

--
She had accepted it once but now rejected it and
could not give all of her reasons for this change.