ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð°Ý¦p¦ó±N¦UÄæ¦ì¼Æ­È¤À³Î«á¡A¦A­¼¤W¹ïÀ³½X«á¥[Á`?

[µo°Ý] ½Ð°Ý¦p¦ó±N¦UÄæ¦ì¼Æ­È¤À³Î«á¡A¦A­¼¤W¹ïÀ³½X«á¥[Á`?

¦pªþÀÉ»¡©ú¡AÁÂÁÂ! Book.rar (4.45 KB)

  1. Sub yy()
  2.     Dim rng, arr, t$, w$, i%, j%
  3.     With Sheet1
  4.         rng = .Range(.[a2], .[g65536].End(3))
  5.     t = "12345678901234567890123"
  6.     ReDim arr(1 To UBound(rng), 0)
  7.     For i = 1 To UBound(rng)
  8.         w = rng(i, 2) & rng(i, 3) & rng(i, 4) & rng(i, 5) & rng(i, 6) & rng(i, 7)
  9.         For j = 1 To 23
  10.             x1 = Mid(w, j, 1) * Mid(t, j, 1)
  11.             arr(i, 0) = arr(i, 0) + x1
  12.         Next
  13.     Next
  14.     .[h2].Resize(i - 1, 1) = arr
  15.     End With
  16. End Sub
½Æ»s¥N½X

TOP

oobird¤j¤j¡A±z¯u¬O¤Ó¯«¤F! ·PÁ±z~

TOP

¤p§Ì¤]¨Ó¸Õ¸Õ
  1. Sub nn()
  2. For Each a In Range([B2], [B65536].End(xlUp))
  3.     mystr = Join(Application.Transpose(Application.Transpose(a.Resize(, 6))), "")
  4.     For i = 1 To 23
  5.        cnt = cnt + (i Mod 10) * Mid(mystr, i, 1)
  6.     Next
  7.     a.Offset(, 6) = cnt: cnt = 0
  8. Next
  9. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# winston219
  1. Sub Ex()
  2.     Dim Ar(), Ar1(), A, MyStr, I
  3.     For Each A In Range("B2", Range("B" & Rows.Count).End(xlUp).Address)
  4.         MyStr = Join(Application.Transpose(Application.Transpose(A.Resize(, 6))), "")
  5.         ReDim Ar(Len(MyStr) - 1)
  6.         ReDim Ar1(Len(MyStr) - 1)
  7.         For I = 1 To Len(MyStr)
  8.             Ar(I - 1) = Val(Right(I, 1))
  9.             Ar1(I - 1) = Val(Mid(MyStr, I, 1))
  10.         Next
  11.         A.Offset(, 6) = Application.SumProduct(Ar, Ar1)
  12.     Next
  13. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : °µ¦n¨Æ¤£¯à¤Ö§Ú¤@¤H¡A°µÃa¨Æ¤£¯à¦h§Ú¤@¤H¡C
ªð¦^¦Cªí ¤W¤@¥DÃD