A Microsoft Excel forum. ExcelBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » ExcelBanter forum » Excel Newsgroups » Excel Programming
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

To be got Alphabetic



 
 
Thread Tools Display Modes
  #11  
Old July 4th 12, 04:07 AM posted to microsoft.public.excel.programming
Auric__
external usenet poster
 
Posts: 304
Default To be got Alphabetic

Moideen wrote:

> We Need Always 3 Digits.This function only comming 2 Digits, Pls Advice
> me on this matter.
>
> Eg: 1.550 , Shown only : A.FF, To be Shown : A.FFS
>
> =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE
> (A1,1,"A"),2,"B"),3,"C"),4,"D"),5,"F"),0,"S")


Works for me. Shrug. Try switching to the VBA solution:

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(cell.Value, 1, "A"), 2, "B"), _
3, "C"), 4, "D"), 5, "F"), 0, "S")
Next
End Sub

--
Where is your savior now?
Ads
  #12  
Old July 4th 12, 01:40 PM
Moideen Moideen is offline
Member
 
First recorded activity by ExcelBanter: Mar 2012
Posts: 30
Default

Quote:
Originally Posted by Auric__ View Post
Moideen wrote:

> We Need Always 3 Digits.This function only comming 2 Digits, Pls Advice
> me on this matter.
>
> Eg: 1.550 , Shown only : A.FF, To be Shown : A.FFS
>
> =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE
> (A1,1,"A"),2,"B"),3,"C"),4,"D"),5,"F"),0,"S")


Works for me. Shrug. Try switching to the VBA solution:

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(cell.Value, 1, "A"), 2, "B"), _
3, "C"), 4, "D"), 5, "F"), 0, "S")
Next
End Sub

--
Where is your savior now?
Not Getting..

Eg: 1.550 , Shown only : A.FF, To be Shown : A.FFS
  #13  
Old July 4th 12, 01:56 PM
Moideen Moideen is offline
Member
 
First recorded activity by ExcelBanter: Mar 2012
Posts: 30
Default

[quote=Auric__;1603366]Moideen wrote:

> We Need Always 3 Digits.This function only comming 2 Digits, Pls Advice
> me on this matter.
>
> Eg: 1.550 , Shown only : A.FF, To be Shown : A.FFS
>
> =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE
> (A1,1,"A"),2,"B"),3,"C"),4,"D"),5,"F"),0,"S")


Works for me. Shrug. Try switching to the VBA solution:

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(cell.Value, 1, "A"), 2, "B"), _
3, "C"), 4, "D"), 5, "F"), 0, "S")
Next
End Sub

--
I Tried with Above VBA code, Not Getting
Eg: 1.550 , Shown only : A.FF, To be Shown : A.FFS
  #14  
Old July 4th 12, 07:50 PM posted to microsoft.public.excel.programming
Auric__
external usenet poster
 
Posts: 304
Default To be got Alphabetic

Moideen wrote:

> Auric__;1603366 Wrote:
>> Moideen wrote:
>> -
>> > We Need Always 3 Digits.This function only comming 2 Digits, Pls

>> Advice
>> > me on this matter.
>> >
>> > Eg: 1.550 , Shown only : A.FF, To be Shown : A.FFS
>> >
>> > =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBST ITUTE(SUBSTITUTE
>> > (A1,1,"A"),2,"B"),3,"C"),4,"D"),5,"F"),0,"S")-

>>
>> Works for me. Shrug. Try switching to the VBA solution:
>>
>> 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(cell.Value, 1, "A"), 2, "B"),
>> _
>> 3, "C"), 4, "D"), 5, "F"), 0, "S")
>> Next
>> End Sub

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


Then there's some difference between your system and mine, possibly something
wrong. Everything that I've posted works as expected for me.

--
SPIDERS! One had a name, even.
  #15  
Old July 4th 12, 11:15 PM posted to microsoft.public.excel.programming
Auric__
external usenet poster
 
Posts: 304
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.
  #16  
Old July 5th 12, 10:49 AM
Moideen Moideen is offline
Member
 
First recorded activity by ExcelBanter: Mar 2012
Posts: 30
Default

Quote:
Originally Posted by Auric__ View Post
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.
Now Okay, Thank you very much.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto alphabetic [email protected] Excel Worksheet Functions 1 November 27th 07 04:30 PM
HIghest Value - Numeric and Alphabetic De-coi via OfficeKB.com Excel Worksheet Functions 2 December 7th 06 12:01 PM
how can I set up an alphabetic sequence? JackLWinans Excel Discussion (Misc queries) 2 May 1st 06 06:25 PM
Alphabetic autofill dogisnuts Excel Discussion (Misc queries) 3 June 17th 05 03:16 AM
alphabetic order adm1 Excel Programming 0 December 18th 03 09:26 PM


All times are GMT +1. The time now is 12:00 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Copyright ©2004-2013 ExcelBanter.
The comments are property of their posters.