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

[µo°Ý] ½Ð±Ð3¦ì¼Æ±Æ¦C²Õ¦X

[µo°Ý] ½Ð±Ð3¦ì¼Æ±Æ¦C²Õ¦X

·Q½Ð±Ð«e½ú­Ì
¬O§_¦³¤½¦¡©Î¬O¥Îvbaªº¤è¦¡
¥i¥HÅý§Ú¦bAÄ椤¶ñ¤J3­Ó¼Æ¦r ¥i¥H¦Û°Ê¦bDÄ椤±Æ¦C¥X¦UºØ²Õ¦X¨Ã§â½s¸¹±a¤J
3¦ì.png
2019-2-20 13:09

¥»©«³Ì«á¥Ñ stillfish00 ©ó 2019-2-21 13:53 ½s¿è

¦^´_ 1# eric7765
¥ô·N¦ì¼Æ±Æ¦C
  1. Sub Solution()
  2.     Range(Cells(2, "D"), Cells(Rows.Count, "E")).ClearContents  ' Clear result
  3.     If Cells(Rows.Count, "A").End(xlUp).Row < 2 Then Exit Sub   ' Exit if no input
  4.     Dim text As String, id, r
  5.     r = 1
  6.     For i = 2 To Cells(Rows.Count, "A").End(xlUp).Row
  7.         text = Cells(i, "A").text
  8.         id = Cells(i, "B").Value
  9.         If Len(text) > 0 Then
  10.             For Each s In GetAllPermutation(text)
  11.                 r = r + 1
  12.                 Cells(r, "D").Value = s
  13.                 Cells(r, "E").Value = id
  14.             Next
  15.         End If
  16.     Next
  17. End Sub
½Æ»s¥N½X
  1. Function GetAllPermutation(ansi_str As String)
  2.     Dim ans: Set ans = CreateObject("scripting.dictionary")
  3.     Dim ch, new_ans
  4.     ans("") = 0
  5.     For i = 1 To Len(ansi_str)
  6.         ch = Mid(ansi_str, i, 1)
  7.         Set new_ans = CreateObject("scripting.dictionary")
  8.         For Each s In ans.keys()
  9.             For j = 0 To Len(s)
  10.                 new_ans(Left(s, j) & ch & Mid(s, j + 1)) = 0
  11.             Next
  12.         Next
  13.         Set ans = new_ans
  14.     Next
  15.     GetAllPermutation = ans.keys()
  16. End Function
½Æ»s¥N½X
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

D2:
=TEXT(SUM((0&MID(INDEX(A:A,INT(ROW(A6)/6)+1),MID({112233,231312,323121},MOD(ROW(A6),6)+1,1),1))*{100,10,1}),"000;;")

E2:
=INDEX(B:B,INT(ROW(A6)/6)+1)&""

TOP

¦^´_ 3# ­ã´£³¡ªL


    ·PÁ¤j¤j ¦ý¦³­Ó¤p°ÝÃD  ¥i¥H±Æ°£­«½Æªº¶Ü?  ¤ñ¦p 366 ¦pªG¤£­«½Æ ¥u·|¦³3ºØ²Õ¦X ¦ý¬O·Ó³o­Ó¤½¦¡ ·|±Æ¦¨6­Ó²Õ¦X

TOP

¦^´_ 2# stillfish00
ÁÂÁÂs¤j  ¹ïµ{¦¡¤è­±¤£¼ô±x §Ú¶K¤W ¥¦Åã¥Ü ¨S¦³©w¸qsub §Úªþ¤WÀÉ®× ¥i¥H³Â·Ð s¤jÀ°§Ú¬Ý¬Ý¶Ü ·PÁÂ

3¦ì¼Æ±Æ¦C²Õ¦X.rar (15.96 KB)

TOP

¦^´_ 2# stillfish00


    ·PÁÂs¤j ±z´£¨Ñªºµª®× §¹¥þ²Å¦X§Ú»Ý­nªº «D±`·PÁÂ

TOP

¦^´_ 2# stillfish00

s¤j~«D±`·PÁ±zÀ°¦£¸Ñ¨M¤W¦¸ªºÃøÃD   ¦pªG§ï¦¨ ¼Æ¦r«á­±¦³+¸¹¦A±Æ¦C  ©ÎªÌ¬O ¦bCÄ椤 ¦pªG¦³¥ô·N¦r¦A¶i¦æ±Æ¦Cªº¸Ü  ³o¼Ë¥i¦æ¶Ü?  ³Â·Ð¤j¯«¦³ªÅ®É¯à«ü¾É¤@¤U ·P¿E¤£ºÉ
222.png
2019-2-27 13:24


±Æ¦C.rar (15.7 KB)

TOP

¦^´_ 7# eric7765


    + §ï¬° CÄæ ¬° "P"
  1. Sub ±Æ¦C3()
  2.     Range("D2:E999").ClearContents
  3.     j = 1
  4.     For i = 2 To [a65536].End(xlUp).Row
  5.         If Cells(i, "C").Value = "P" Then
  6.             'For Each k In Array(123, 132, 213, 231, 312, 321)
  7.             For k = 100 To 999
  8.                     a = Cells(i, "A")
  9.                     xA = 7 ^ Mid(a, 1, 1) + 7 ^ Mid(a, 2, 1) + 7 ^ Mid(a, 3, 1)
  10.                     xK = 7 ^ Mid(k, 1, 1) + 7 ^ Mid(k, 2, 1) + 7 ^ Mid(k, 3, 1)
  11.                     If xA = xK Then
  12.                         j = j + 1
  13.                         Cells(j, "D") = k
  14.                         Cells(j, "E") = Cells(i, "B")
  15.                     End If
  16.             Next k
  17.         Else
  18.             j = j + 1
  19.             Cells(j, "D") = Cells(i, "A")
  20.             Cells(j, "E") = Cells(i, "B")
  21.         End If
  22.     Next i
  23. End Sub
½Æ»s¥N½X
{...} ªí¥Ü»Ý­n¥Î CTRL+SHIFT+ENTER ¤TÁä¿é¤J¤½¦¡

TOP

¦^´_ 8# ML089
·PÁ³»¶«e½úªº¸Ñµª~¤w¦¨¥\

TOP

¥»©«³Ì«á¥Ñ eric7765 ©ó 2019-3-4 14:27 ½s¿è

¦^´_ 8# ML089
M¤j ©êºp ³o¨â©P¥Î°_¨Óµo²{ ³oµ{¦¡¹B¦æ ¦pªG¹J¨ì¼Æ¦r¸Ì­±¦³"0"±Æ¦C¥X¨Óªº²Õ¦X³£·|¯Ê¤Ö ¯à³Â·Ð«e½úÀ°¦£¬Ý¬Ý¶Ü?
0°ÝÃD.png
2019-3-4 14:25

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD