How to list all possible combinations of the values in three columns in excel?

前端 未结 1 1764
执念已碎
执念已碎 2020-12-06 03:28

I have three columns, each of which has different kinds of master data as shown below:

Now, I want to have all possible combinations of these three cells -

相关标签:
1条回答
  • 2020-12-06 03:49

    You can do this with a formula:

    =IFERROR(INDEX($A:$A,IF(INT((ROW(1:1)-1)/(((COUNTA(B:B)-1)*((COUNTA(C:C)-1)))))+2>COUNTA(A:A),-1,INT((ROW(1:1)-1)/(((COUNTA(B:B)-1)*((COUNTA(C:C)-1)))))+2))&" "&INDEX(B:B,MOD(INT((ROW(1:1)-1)/(COUNTA(C:C)-1)),(COUNTA(B:B)-1))+2)&" "&INDEX(C:C,MOD((ROW(1:1)-1),(COUNTA(C:C)-1))+2),"")
    

    0 讨论(0)
提交回复
热议问题