fiberboysa
Board Regular
- Joined
- Apr 25, 2012
- Messages
- 106
- Office Version
- 365
- Platform
- Windows
Hi Dear Allz,
I am trying to extract values from preceding rows based on a value which is given in next columns.
Like in following example, in cell A2 Cell value is 10 (Highlighted in Green) the corresponding value in cell D2 is 3 (Highlighted in Red) so the value required in Cell E2 is combination of following three rows of Cell A2 i.e. values of cells A3, A4 and A5 which are A-1111 B-2222 C-3333 respectively. And in case of Cell A6 the corresponding value in cell D6 is 2 so the required value in cell E6 will be D-4444 E-5555.
The data continuous like this and formula or VBA code will fill my requirement in column E. Kindly let me know if you need further clarification. Thanks in advance...
<tbody>
</tbody>
I am trying to extract values from preceding rows based on a value which is given in next columns.
Like in following example, in cell A2 Cell value is 10 (Highlighted in Green) the corresponding value in cell D2 is 3 (Highlighted in Red) so the value required in Cell E2 is combination of following three rows of Cell A2 i.e. values of cells A3, A4 and A5 which are A-1111 B-2222 C-3333 respectively. And in case of Cell A6 the corresponding value in cell D6 is 2 so the required value in cell E6 will be D-4444 E-5555.
The data continuous like this and formula or VBA code will fill my requirement in column E. Kindly let me know if you need further clarification. Thanks in advance...
A | B | C | D | E | |
1 | CLMN 1 | CLMN 2 | CLMN 3 | CLMN 4 | CLMN 5 (Required Formula/VBA) |
2 | 10 | 3 | A-1111 B-2222 C-3333 | ||
3 | A-1111 | ||||
4 | B-2222 | ||||
5 | C-3333 | ||||
6 | 20 | 2 | 4444 5555 | ||
7 | 4444 | ||||
8 | 5555 | ||||
9 | 30 | 4 | |||
10 | F-6666 | F-6666 7777 H-8888 9999 | |||
11 | 7777 | ||||
12 | H-8888 | ||||
13 | 9999 |
<tbody>
</tbody>