test askjhfaskjhaskjhfkjashfkjhsfkjhafkjhaskjfjaskfh
ASLJJSA
ASFJSAKHASHF
AKHASKJFH
These are just some ideas to get you started.
I will give you a routine which will give you an array, arrOut() , like this
Code:
Group Deafault item
1 ItemG11
2 ItemG21
3 ItemG31
The routine is here:
http://www.excelfox.com/forum/showth...ll=1#post11094
Routine brief description
Rem 1
I get the current data region to which includes the first cell in worksheet "Sheet2"
Rem 2
I make an array, arrDtaIn() , of the data
Group |
Item Col A |
Item Col B |
1 |
ItemG11 |
ItemG11 |
1 |
ItemG12 |
ItemG12 |
1 |
ItemG13 |
ItemG13 |
1 |
ItemG14 |
ItemG14 |
1 |
ItemG15 |
|
1 |
ItemG16 |
|
1 |
ItemG17 |
|
1 |
ItemG18 |
|
1 |
ItemG19 |
|
2 |
ItemG21 |
ItemG21 |
2 |
ItemG22 |
ItemG22 |
2 |
ItemG23 |
ItemG23 |
2 |
ItemG24 |
ItemG24 |
2 |
ItemG25 |
|
2 |
ItemG26 |
|
2 |
ItemG27 |
|
2 |
ItemG28 |
|
2 |
ItemG29 |
|
3 |
ItemG31 |
ItemG31 |
3 |
ItemG32 |
ItemG32 |
3 |
ItemG33 |
ItemG33 |
3 |
ItemG34 |
ItemG34 |
3 |
ItemG35 |
|
3 |
ItemG36 |
|
3 |
ItemG37 |
|
3 |
ItemG38 |
|
Rem 3
' 3a)
I make a string of the unique group numbers " 1 2 3 "
' 3b)
I make an array of the unique group numbers { 1, 2, 3 }
' 3c) - ' 3d)
I make and fill an array for output, arrOut()
Rem 4
I paste out that array for output, arrOut()
Results
For this input data, before
_____ Workbook: Lists.xlsm ( Using Excel 2007 32 bit )
Row\Col |
A |
B |
C |
D |
E |
1 |
Group |
Item Col A |
Item Col B |
|
|
2 |
1 |
ItemG11 |
ItemG11 |
|
|
3 |
1 |
ItemG12 |
ItemG12 |
|
|
4 |
1 |
ItemG13 |
ItemG13 |
|
|
5 |
1 |
ItemG14 |
ItemG14 |
|
|
6 |
1 |
ItemG15 |
|
|
|
7 |
1 |
ItemG16 |
|
|
|
8 |
1 |
ItemG17 |
|
|
|
9 |
1 |
ItemG18 |
|
|
|
10 |
1 |
ItemG19 |
|
|
|
11 |
2 |
ItemG21 |
ItemG21 |
|
|
12 |
2 |
ItemG22 |
ItemG22 |
|
|
13 |
2 |
ItemG23 |
ItemG23 |
|
|
14 |
2 |
ItemG24 |
ItemG24 |
|
|
15 |
2 |
ItemG25 |
|
|
|
16 |
2 |
ItemG26 |
|
|
|
17 |
2 |
ItemG27 |
|
|
|
18 |
2 |
ItemG28 |
|
|
|
19 |
2 |
ItemG29 |
|
|
|
20 |
3 |
ItemG31 |
ItemG31 |
|
|
21 |
3 |
ItemG32 |
ItemG32 |
|
|
22 |
3 |
ItemG33 |
ItemG33 |
|
|
23 |
3 |
ItemG34 |
ItemG34 |
|
|
24 |
3 |
ItemG35 |
|
|
|
25 |
3 |
ItemG36 |
|
|
|
26 |
3 |
ItemG37 |
|
|
|
27 |
3 |
ItemG38 |
|
|
|
28 |
|
|
|
|
|
Worksheet: Sheet2
Now run routine, Sub DefaultItem() ( http://www.excelfox.com/forum/showth...ll=1#post11094 )
After running Sub DefaultItem()
_____ Workbook: Lists.xlsm ( Using Excel 2007 32 bit )
Row\Col |
A |
B |
C |
D |
E |
1 |
Group |
Item Col A |
Item Col B |
Group |
Deafault item |
2 |
1 |
ItemG11 |
ItemG11 |
1 |
ItemG11 |
3 |
1 |
ItemG12 |
ItemG12 |
2 |
ItemG21 |
4 |
1 |
ItemG13 |
ItemG13 |
3 |
ItemG31 |
5 |
1 |
ItemG14 |
ItemG14 |
|
|
6 |
1 |
ItemG15 |
|
|
|
7 |
1 |
ItemG16 |
|
|
|
8 |
1 |
ItemG17 |
|
|
|
9 |
1 |
ItemG18 |
|
|
|
10 |
1 |
ItemG19 |
|
|
|
11 |
2 |
ItemG21 |
ItemG21 |
|
|
12 |
2 |
ItemG22 |
ItemG22 |
|
|
13 |
2 |
ItemG23 |
ItemG23 |
|
|
14 |
2 |
ItemG24 |
ItemG24 |
|
|
15 |
2 |
ItemG25 |
|
|
|
16 |
2 |
ItemG26 |
|
|
|
17 |
2 |
ItemG27 |
|
|
|
18 |
2 |
ItemG28 |
|
|
|
19 |
2 |
ItemG29 |
|
|
|
20 |
3 |
ItemG31 |
ItemG31 |
|
|
21 |
3 |
ItemG32 |
ItemG32 |
|
|
22 |
3 |
ItemG33 |
ItemG33 |
|
|
23 |
3 |
ItemG34 |
ItemG34 |
|
|
24 |
3 |
ItemG35 |
|
|
|
25 |
3 |
ItemG36 |
|
|
|
26 |
3 |
ItemG37 |
|
|
|
27 |
3 |
ItemG38 |
|
|
|
Worksheet: Sheet2
https://wordtohtml.net/
Bookmarks