Results 1 to 3 of 3

Thread: -

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date: Nov:2012
    Location: Sofia
    Posts: 2

    -

    ,
    :///

    - , ,

    D1 , , , ,

    E1 , , , ,


    , . : D1: *2 ; *2: *1 //// 1 *3 ; *1 ; *1


    .

  2. #2
    Registered User hateras's Avatar
    Join Date: Jan:2011
    Location: Kronos III
    Posts: 1,028
    Code:
    Sub splitdemo()
    
    'read input form A14 (column=1, row=14)
    s = CStr(Worksheets("Sheet2").Cells(14, 1))
    
    'split the string
    anarray = Split(s, ",")
    l = UBound(anarray)
    ReDim cntrarray(l)
    
    For i = 0 To l
        'init
        cntrarray(i) = 1
        'debug
        Worksheets("Sheet2").Cells(15 + i, 1) = anarray(i)
        Worksheets("Sheet2").Cells(15 + i, 2) = CStr(i)
    Next
    
    For i = 0 To l
        If cntrarray(i) <> -1 Then
            For j = i + 1 To l
                If Trim(anarray(j)) = Trim(anarray(i)) Then
                    cntrarray(i) = cntrarray(i) + 1
                    cntrarray(j) = -1
                End If
            Next
        End If
    Next
    
    'show counts into cells A15, A16... 
    For i = 0 To l
        If cntrarray(i) <> -1 Then
            Worksheets("Sheet2").Cells(15 + i, 3) = Trim(CStr(anarray(i))) + "*" + CStr(cntrarray(i))
        End If
    Next
    End Sub
    . ( 14), (split ) . 15 , .
    .

    : "" "". - UCase .
    ASRock B550M Pro 4; Ryzen R5 3600; 2x16 GiB G.SKILL Aegis 3200; 1TB Samsung QVO 960 + 3TB Seagate IronWolf; Zalman Z1

  3. #3
    Registered User
    Join Date: Nov:2012
    Location: Sofia
    Posts: 2
    , , . , , - , .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Copyright © 1999-2011 . .
iskamPC.com | mobility.BG | Bloody's Techblog | | 3D Vision Blog |