mrchonginhk
Well-known Member
- Joined
- Dec 3, 2004
- Messages
- 679
Hi I have a table like this
Then, I need to write a FUNCTION called
Tableonly that returns a table as range without extraneous emoty rows and column. But, if user clicks a cell outside table, return only cell where user has clicked. Hints from my boss: Use COUNTA and range.EntireRow.
Then using above write program that selects only data from table (Bosss say use range.size method)
Then write another program select only col heading
Then write another select only row headings
Hence, write a program converting the table in a list. ie the table above should becomes:-
Pls help. Any one part will help ... Thanks.
VBAAssignment1.xls | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Q2 | ||||||
2 | Col1 | Col2 | Col3 | Col4 | |||
3 | Row1 | 1 | 2 | 3 | 4 | ||
4 | Row2 | 5 | 6 | 7 | 8 | ||
5 | Row3 | 9 | 10 | 11 | 12 | ||
6 | Row4 | 13 | 14 | 15 | 16 | ||
7 | Row5 | 17 | 18 | 19 | 20 | ||
Q2 |
Then, I need to write a FUNCTION called
Tableonly that returns a table as range without extraneous emoty rows and column. But, if user clicks a cell outside table, return only cell where user has clicked. Hints from my boss: Use COUNTA and range.EntireRow.
Then using above write program that selects only data from table (Bosss say use range.size method)
Then write another program select only col heading
Then write another select only row headings
Hence, write a program converting the table in a list. ie the table above should becomes:-
VBAAssignment1.xls | ||||||
---|---|---|---|---|---|---|
G | H | I | J | |||
6 | Row1 | Col1 | 1 | |||
7 | Row2 | Col1 | 5 | |||
8 | Row3 | Col1 | 9 | |||
9 | Row4 | Col1 | 13 | |||
10 | Row5 | Col1 | 17 | |||
11 | Row1 | Col2 | 2 | |||
12 | Row2 | Col2 | 6 | |||
13 | Row3 | Col2 | 10 | |||
14 | Row4 | Col2 | 14 | |||
15 | Row5 | Col2 | 18 | |||
16 | Row1 | Col3 | 3 | |||
17 | Row2 | Col3 | 7 | |||
18 | Row3 | Col3 | 11 | |||
19 | Row4 | Col3 | 15 | |||
20 | Row5 | Col3 | 19 | |||
21 | Row1 | Col4 | 4 | |||
22 | Row2 | Col4 | 8 | |||
23 | Row3 | Col4 | 12 | |||
24 | Row4 | Col4 | 16 | |||
25 | Row5 | Col4 | 20 | |||
Q2 |
Pls help. Any one part will help ... Thanks.