Hello,
I want to write a macro that will search for a cell with string "Items-Description" (which can be at different rows in each file) and from that row it will copy all the pictures in column E that occur before the cell with a string "Items-Details". Then it will paste those pictures in new excel file in specific sheet. Do you have any tips/functions I can use?
I want to write a macro that will search for a cell with string "Items-Description" (which can be at different rows in each file) and from that row it will copy all the pictures in column E that occur before the cell with a string "Items-Details". Then it will paste those pictures in new excel file in specific sheet. Do you have any tips/functions I can use?
MR_Excel_example.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | def | Xxx | ||||||||
2 | effw | ff | ||||||||
3 | f | wf | fwf | |||||||
4 | fw | fef | ||||||||
5 | e | wf | ||||||||
6 | f | wf | fef | few | ||||||
7 | wf | ewf | ||||||||
8 | wf | wfw | ||||||||
9 | rh | re | err | |||||||
10 | f | r | r | |||||||
11 | ||||||||||
12 | ||||||||||
13 | Items - description | |||||||||
14 | Nr. | Name | material | quantity | picture | subpart | ||||
15 | 1 | AAA | X1 | 23 | 1 | |||||
16 | 2 | BBB | X2 | 34 | 2 | |||||
17 | 3 | CCC | X3 | 56 | 3 | |||||
18 | 4 | DDD | X4 | 32 | 4 | |||||
19 | 5 | EEE | X5 | 12 | 5 | |||||
20 | 6 | FFF | X6 | 4 | 6 | |||||
21 | 7 | GGG | X7 | 6 | 7 | |||||
22 | 8 | HHH | X8 | 54 | 8 | |||||
23 | 9 | III | X9 | 32 | 9 | |||||
24 | SUM: | 253 | ||||||||
25 | ||||||||||
26 | ||||||||||
27 | ||||||||||
28 | Items - details | |||||||||
29 | Nr. | Name | material | price | cost | xxx | ||||
30 | 1 | AAA | X1 | 1 | 1 | xxx | ||||
31 | 2 | BBB | X2 | 2 | 2 | xxx | ||||
32 | 3 | CCC | X3 | 3 | 1 | xxx | ||||
33 | 4 | DDD | X4 | 5 | 2 | xxx | ||||
34 | 5 | EEE | X5 | 4 | 1 | xxx | ||||
35 | 6 | FFF | X6 | 3 | 2 | xxx | ||||
36 | 7 | GGG | X7 | 2 | 1 | xxx | ||||
37 | 8 | HHH | X8 | 1 | 2 | xxx | ||||
38 | 9 | III | X9 | 2 | 1 | xxx | ||||
39 | ||||||||||
40 | ||||||||||
41 | ||||||||||
42 | ||||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D24 | D24 | =SUM(D15:D23) |