Results 1 to 10 of 18

Thread: Initial capital customized

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member
    Join Date
    Oct 2011
    Posts
    135
    Rep Power
    14
    Hi,

    I used the Excel formula 'Proper', that is not part of VBA. Check Excel for the meaning of [ ] .
    In VBA you can use strconv() instead.
    I tried them all really, but do not show the expected result.

    Method strconv It is not sufficient
    Check Excel for the meaning of [ ]
    Ok, evaluates a formula, I had tried to enter a cycle unnecessarily.

    It follows the cycle vb6 I have implemented

    Code:
                    For Each celle In dataArray
                        If InStr(celle, Trim(Form1.List1.List(I))) Then
                            FFF = Split(celle, Trim(Form1.List1.List(I)))
                            GGG = Split(FFF(1), "(")
                            HCodes = Replace(Left(GGG(0), Len(GGG(0)) - 1), "-", "")
                            tx = "  " & StrConv(Trim(HCodes), vbLowerCase)
                            tx = "  " & LwrToUpprCase(tx)
                            If InStr(tx, " ") Then
                             For Each K In Testo
                               tx = Replace(tx & s, s & K & s, s & LCase(K) & s)
                             Next
                            End If
                            List8.List(I) = tx
                            arr5(I) = tx
                            Exit For
                        End If
                    Next

  2. #2
    Senior Member
    Join Date
    Jun 2012
    Posts
    337
    Rep Power
    13
    strconv() is your friend:

    Code:
    Sub M_snb()
       sn = [B3:B12]
       
       For j = 1 To UBound(sn)
         sn(j, 1) = Replace(Replace(StrConv(Replace(Replace(sn(j, 1), ".", ". "), "/", "/ "), 3), ". ", "."), "/ ", "/")
         If sn(j, 1) Like "*[0-9]*" Then sn(j, 1) = UCase(sn(j, 1))
         
         For Each it In Split("di da con per mm in a e la le")
           If InStr(1, sn(j, 1) & " ", " " & it & " ", 1) Then sn(j, 1) = Replace(Replace(sn(j, 1), UCase(it), it), StrConv(it, 3), it)
         Next
       Next
       
       [K3:K12] = sn
    End Sub
    Last edited by snb; 09-18-2015 at 01:57 AM.

Posting Permissions

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