Hi Chaya,

I Hope This may Help you.

Sub Test()

    Dim varData         As Variant
    Dim intCtr          As Integer
    Dim intChr          As Integer
    Dim intLen          As Integer
    Dim rngData         As Range
    Dim strNum          As String
    Dim strString       As String
    Dim varResData()    As Variant
    
    Const strRange      As String = "G1"                           'Change 
this Range as per your requirment 
    Const strSheetName  As String = "Sheet2"
    
    With ThisWorkbook.Worksheets(strSheetName)
        Set rngData = Intersect(.Range("A1").CurrentRegion, 
.Range("A1").CurrentRegion.Offset(1)).Columns(1)
        varData = rngData
        ReDim varResData(UBound(varData, 1), 2)
        For intCtr = LBound(varData) To UBound(varData)
            For intChr = 1 To Len(varData(intCtr, 1))
                If IsNumeric(Mid(varData(intCtr, 1), intChr, 1)) = False 
Then
                     strString = strString & IIf(Mid(varData(intCtr, 1), 
intChr, 1) = ".", " ", Mid(varData(intCtr, 1), intChr, 1))
                Else
                    strNum = strNum & IIf(Mid(varData(intCtr, 1), intChr, 
1) = ".", " ", Mid(varData(intCtr, 1), intChr, 1))
                End If
            Next
            varResData(intCtr, 1) = Replace(strString, "", " ", 1, , 
vbTextCompare)
            varResData(intCtr, 2) = Replace(strNum, "", " ", 1, , 
vbTextCompare)
            strString = vbNullString
            strNum = vbNullString
        Next
        .Range(strRange).Resize(UBound(varResData, 1), 2) = varResData
    End With
    
End Sub

Regards
Prince


On Monday, April 8, 2013 10:20:35 AM UTC+5:30, chaya moni wrote:
>
> Dear Experts and folk,
>
>         I have been trying to extract numbers and words seperately from 
> the strings. Manually i did, but taking huge time and even more to go. Is 
> there any other way to extract as per my requirement.
>         i have attached my sample sheet and my requirement in the excel 
> file. Please find the attachment. 
>
>        Thanking in advance
>
>
> Regards,
> Chaya
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to