zain zahran
New Member
- Joined
- Apr 6, 2002
- Messages
- 2
In Excel we can do this by =max(range) but I cannot figure out how to do it in macro.
For example, I have the data in two columns:
1 2
1 3
2 1
2 4
3 1
4 2
The table means that ID#1 is related to ID#2 and 3, etc.
I want to make a macro to find the max of column 1 (which is 4). Then make a nxn matrix, n is the max of col#1 = 4.
The matrix will be
1 1 1 0
1 1 0 1
1 0 1 0
0 1 0 1
1 means related, 0 means not related.
Can anyone help? Thanks!
This message was edited by zain zahran on 2002-04-07 09:53
This message was edited by zain zahran on 2002-04-07 09:55
For example, I have the data in two columns:
1 2
1 3
2 1
2 4
3 1
4 2
The table means that ID#1 is related to ID#2 and 3, etc.
I want to make a macro to find the max of column 1 (which is 4). Then make a nxn matrix, n is the max of col#1 = 4.
The matrix will be
1 1 1 0
1 1 0 1
1 0 1 0
0 1 0 1
1 means related, 0 means not related.
Can anyone help? Thanks!
This message was edited by zain zahran on 2002-04-07 09:53
This message was edited by zain zahran on 2002-04-07 09:55