celestedeeva
Programmer
- Aug 27, 2007
- 14
Hello all,
I have a really messy Excel file and was wondering how I would go about selecting data based on the following example (VBA code would be good):
A B C D E
value
1 n 100
2 n 200
3 n 200
4 n 400
value
5 n 100
6 n 200
7 n 200
8 n 400
value
9 n 100
10 n 200
11 n 200
12 n 400
value
13 n 100
14 n 200
15 n 200
16 n 400
Effectively I need to get so that I have the following formatted:
A B C
value
1 n 100
2 n 200
3 n 200
4 n 400
5 n 100
6 n 200
7 n 200
8 n 400
9 n 100
10 n 200
11 n 200
12 n 400
13 n 200
14 n 200
15 n 400
16 n 400
Is there any way that I can search the whole sheet for the word "value" and then retrieve all of the rows beneath "value" until it hits a blank, select the values column and the two colums to the left for each non blank row and then append to another worksheet.
Thanks for any advice -- I am stumped.
Celeste.
I have a really messy Excel file and was wondering how I would go about selecting data based on the following example (VBA code would be good):
A B C D E
value
1 n 100
2 n 200
3 n 200
4 n 400
value
5 n 100
6 n 200
7 n 200
8 n 400
value
9 n 100
10 n 200
11 n 200
12 n 400
value
13 n 100
14 n 200
15 n 200
16 n 400
Effectively I need to get so that I have the following formatted:
A B C
value
1 n 100
2 n 200
3 n 200
4 n 400
5 n 100
6 n 200
7 n 200
8 n 400
9 n 100
10 n 200
11 n 200
12 n 400
13 n 200
14 n 200
15 n 400
16 n 400
Is there any way that I can search the whole sheet for the word "value" and then retrieve all of the rows beneath "value" until it hits a blank, select the values column and the two colums to the left for each non blank row and then append to another worksheet.
Thanks for any advice -- I am stumped.
Celeste.