關于excel生成組合排列函數(shù),excel排列組合函數(shù)這個問題很多朋友還不知道,今天小六來為大家解答以上的問題,現(xiàn)在讓我們一起來看看吧!
1、序列TEwTEwTAwDAxTAwTAxDEw里,不管T、E、w、A、D、x分別出現(xiàn)多少次,同一時刻每個字母都僅等于一個數(shù)字(0或者1)。
2、沒有其他限制的話,總共6個字母,每個有0和1兩種可能,這樣實際上就有2^6即種組合。
3、字母取值組合相應的,字符串所有組合只需要將每組字母代表數(shù)字代入字符串即可,如下:000000000000000000000 ? ?000000000001000001000 ? ?000000000100000000100 ? ?000000000101000001100 ? ?00000000000 ? ?000000010011010011000 ? ?0000000101010100 ? ?000000010111010011100 ? ?0001000001000001 ? ?000001 ? ?0001100001000101 ? ?00011001101 ? ?0011010011010001 ? ?0011011011011001 ? ?0011110011010101 ? ?0011111011011101 ? ?0000000000000010 ? ?0000001000001010 ? ?0000100000000110 ? ?0000101000001110 ? ?000010 ? ?0010011010011010 ? ?00101010110 ? ?0010111010011110 ? ?0110100001000011 ? ?01101001011 ? ?011011001100001000111 ? ?0110110011001111 ? ?011011011010011010011 ? ?011011011011011011011 ? ?011011011110011010111 ? ?011011011111011011111 ? ?01000000000 ? ?01000011000 ? ?000100 ? ?011100 ? ?01110110000 ? ?0110011110111000 ? ?0110110110110100 ? ?0110111110111100 ? ?101101101000101100001 ? ?101101101001101101001 ? ?10110110111 ? ?101101101101101101101 ? ?101101111010111110001 ? ?101101111011111111001 ? ?101101111110111110101 ? ?101101111111111111101 ? ?1101101000000010 ? ?1101101000011010 ? ?11011000110 ? ?11011011110 ? ?11011011101 ? ?110110110011110111010 ? ?110110110110110110110 ? ?110110110111110111110 ? ?111111101000101100011 ? ?111111101001101101011 ? ?1111111011100111 ? ?111111101101101101111 ? ?111111111010111110011 ? ?111111111011111111011 ? ?111111111110111110111 ? ?111111111111111111111 ? ?這里使用VBA進行處理,如下代碼供參考:Sub T()Dim ii%, T%, E%, w%, A%, D%, x%ii = 1For T = 0 To 1For E = 0 To 1For w = 0 To 1For A = 0 To 1For D = 0 To 1For x = 0 To 1Cells(2, ii + 1) = TCells(3, ii + 1) = ECells(4, ii + 1) = wCells(5, ii + 1) = ACells(6, ii + 1) = DCells(7, ii + 1) = xRange("A" & ii + 10).NumberFortLocal = "@"Range("A" & ii + 10) = T & E & w & T & E & w & T & A & w & D & A & x & T & A & w & T & A & x & D & E & wii = ii + 1Next xNext DNext ANext wNext ENext TEnd Sub以上,希望能幫上忙!。
本文分享完畢,希望對大家有所幫助。
標簽:
免責聲明:本文由用戶上傳,如有侵權請聯(lián)系刪除!