Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 244
Default read only alfabethical

Hi! I have a spreadsheet that contains lots of rating info. the info look
like eg AAA, AA+, A, BBB-, Aa3 etc. now I am only intereseted in the letters
ie I want to have a worksheet function that cleans the data from the numbers
and the plus, minus signs. How can I do this? pls any help appreciated!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default read only alfabethical

ASAP Utilities, a free Add-in available at www.asap-utilities.com has
features that will allow you to strip out all numerical and symbol characters
leaving only the alpha characters...

hth
Vaya con Dios,
Chuck, CABGx3



"Arne Hegefors" wrote:

Hi! I have a spreadsheet that contains lots of rating info. the info look
like eg AAA, AA+, A, BBB-, Aa3 etc. now I am only intereseted in the letters
ie I want to have a worksheet function that cleans the data from the numbers
and the plus, minus signs. How can I do this? pls any help appreciated!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 98
Default read only alfabethical

Hi,

I have just come up with the following:

Paste this into a new module:

Function Stripper(Initial_Value As String)

Dim s_length As Integer
Dim c_position As Integer
Dim c_letter As String

c_position = 1
s_length = Len(Initial_Value)

Do While s_length < (c_position - 1)
c_letter = Mid(Initial_Value, c_position, 1)
If c_letter = "A" And c_letter <= "Z" Then
Stripper = Stripper & Mid(Initial_Value, c_position, 1)
End If
c_position = c_position + 1
Loop

End Function

then, on your worksheet use =stripper([cell with your value])

HTH

Thanks,

Simon

Arne Hegefors wrote:
Hi! I have a spreadsheet that contains lots of rating info. the info look
like eg AAA, AA+, A, BBB-, Aa3 etc. now I am only intereseted in the letters
ie I want to have a worksheet function that cleans the data from the numbers
and the plus, minus signs. How can I do this? pls any help appreciated!


--
--------------------
Simon - UK

Email at simon22mports [ a t ] hot mail [ d ot ]com

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200610/1

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default read only alfabethical

If you don't want to use a helper column you can strip in place with this macro.

Public Sub StripAllButAZs()
''strips out everything except letters
Dim myRange As Range
Dim cell As Range
Dim myStr As String
Dim i As Integer

With Application
.ScreenUpdating = False
.Calculation = xlManual
End With
On Error Resume Next
Set myRange = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants)
If myRange Is Nothing Then Exit Sub
If Not myRange Is Nothing Then
For Each cell In myRange
myStr = cell.text
For i = 1 To Len(myStr)
If (Asc(UCase(Mid(myStr, i, 1))) < 65) Or _
(Asc(UCase(Mid(myStr, i, 1))) 90) Then
myStr = Left(myStr, i - 1) & " " & Mid(myStr, i + 1)
End If
Next i
cell.Value = Application.Trim(myStr)
Next cell
End If
With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
End With
End Sub


Gord Dibben MS Excel MVP

On Tue, 17 Oct 2006 15:12:22 GMT, "smw226 via OfficeKB.com" <u27645@uwe wrote:

Hi,

I have just come up with the following:

Paste this into a new module:

Function Stripper(Initial_Value As String)

Dim s_length As Integer
Dim c_position As Integer
Dim c_letter As String

c_position = 1
s_length = Len(Initial_Value)

Do While s_length < (c_position - 1)
c_letter = Mid(Initial_Value, c_position, 1)
If c_letter = "A" And c_letter <= "Z" Then
Stripper = Stripper & Mid(Initial_Value, c_position, 1)
End If
c_position = c_position + 1
Loop

End Function

then, on your worksheet use =stripper([cell with your value])

HTH

Thanks,

Simon

Arne Hegefors wrote:
Hi! I have a spreadsheet that contains lots of rating info. the info look
like eg AAA, AA+, A, BBB-, Aa3 etc. now I am only intereseted in the letters
ie I want to have a worksheet function that cleans the data from the numbers
and the plus, minus signs. How can I do this? pls any help appreciated!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with a read only frustration. tweacle Excel Worksheet Functions 1 February 25th 06 03:52 PM
remove read only - not showing up in properties Hakara Excel Worksheet Functions 0 January 18th 06 07:35 PM
Send Excel File As Read Only jgarzoli Excel Discussion (Misc queries) 1 October 3rd 05 07:48 PM
Read Text File into Excel Using VBA Willie T Excel Discussion (Misc queries) 13 January 8th 05 12:37 AM
Network access to file - read only property AL Excel Discussion (Misc queries) 1 December 2nd 04 01:22 AM


All times are GMT +1. The time now is 12:50 PM.

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

About Us

"It's about Microsoft Excel"