Ask Your Question

Create every combination (Calc) [closed]

asked 2012-04-21 14:09:10 +0200

wookie1 gravatar image

Hi, I'm trying to find a way to create a list of two numbers x, and y which will contain every combination of the numbers I have defined for x and y. i.e. I've said x can be 1,2,3 Y can be 6,7,8 not actual numbers. How can I create two columns one for x, one for y which look like so:

x      y
1      6
1      7
1      8
2      6
2      7
2      8
3      6
3      7
3      8

Any thoughts on how to go about this, I've a feeling it's got something to do with matrix functions but don't know.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2015-10-15 23:16:36.159773

1 Answer

Sort by » oldest newest most voted

answered 2012-04-23 08:38:54 +0200

MegaTallDave gravatar image

updated 2012-04-23 08:39:39 +0200

I can only think of an ugly solution right now.

You can get started with a column of numbers, 1,2,3,4, et cetera.

Next you can try out the mod function. =mod(a1,3) will get you halfway to your y column.

You can then try out using the round function. =round(a1/3) will get you halfway to your x column.

A little tweaking from there and you should have it.

edit flag offensive delete link more

Question Tools


Asked: 2012-04-21 14:09:10 +0200

Seen: 740 times

Last updated: Apr 23 '12