View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
GS[_5_] GS[_5_] is offline
external usenet poster
 
Posts: 226
Default nXn matrix creation

AG formulated the question :
Hi All,

I have a need to create a matrix based on some user choices. The
requirement is described below:

User Inputs 5 options Opt1, Opt2, Opt3, Opt4, Opt5. Then runs the
macro to generate the matrix. The matrix should look like below

Opt1 Opt2 Opt3
Opt4 Opt5
Opt1 1
Opt2 choice21 1
Opt3 choice31 choice32 1
Opt4 choice41 choice42 choice43 1
Opt5 choice51 choice52 choice53 choice54
1

The choices is the drop down menu created using Data Validation
List. In this matrix user will make certain choices. The cells above
the diagonal need to have a formula, which is the reciprocal of the
choice for a corresponding combination below the diagonal, that is, if
intersection of RowValue = Opt2 and ColumnValue = Opt1 is choice21
then intersection of RowValue = Opt1 and ColumnValue = Opt2 will be a
formula = 1/choice21.

The number of options a user can provide could be anything it could be
as small as 2 and as large as 20-30 options. So the matrix need to be
sized accordingly.

I am totally clueless on this. Any help on this will me much
appreciated. Thanks in advance.

Regards,
AG


The example you gave for the construction of the formula is easy enough
to do since it only involves 1 choice. How do you want to construct the
formula for the remaining rows below Rows(Opt2)? I can assume it would
include all choices in the respective row, but I'd rather you
explicitly state exactly what results you want.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc