1 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Generate repeating, non repeating permutions and combinations of inputs.

Just tabling a little challenge/discussion piece for us. To generate all repeating, non repeating permutions and combinations of a set of inputs.

Context: we have a list of 4 items in E2. {"P";"Q";"R";"S"}. We can refer to this list (set) as E2#. Above in E1 we have COUNTAed that set to 4. In F1 we have defined 2. In A1:C1 we’ve printed {"Power","Permut","Combin"}.

In A2 we want to define all pairs (re 2) of those 4. Colon seperated. So we’ll end up with 16 outputs.

P:P

P:Q

P:R

P:S

Q:P

S:S

In B2, we want all permutations that pair those items. Similar to A but items can’t be repeated within the pairing. They’ll amount to 12:

P:Q

P:R

P:S

Q:P

Q:R

S:R

In C2, all combinations. These are unique in their ordering. So having generated P:Q, we can’t generate Q:P. These will number 6.

I’ll screenshot the context into comments, and attempt to edit that into post (help invited). Rewording is also invited if any terminology above is incorrect.

How might we go about this?

submitted by /u/finickyone
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#rows.com
#natural language processing for spreadsheets
#generative AI for data analysis
#Excel compatibility
#financial modeling with spreadsheets
#Excel alternatives
#permutations
#combinations
#repeating
#non-repeating
#input set
#pairs
#Excel
#output
#item pairing
#unique ordering
#set E2
#COUNTA
#context