madhuchelliah
Board Regular
- Joined
- Nov 22, 2017
- Messages
- 226
- Office Version
- 2019
- Platform
- Windows
Hello Folks,I have a very complex requirement. I need a macro to multiply based on some conditions. I have a two column one is filled with "Y" and "N" letters another one is filled with numbers. My requirement is to identify all the "Y" succeeded by "N" and multiply the value of adjacent cell to 'N" with values of cells adjacent to "Y". There could be lot of combinations of N decent by Y. See the example below.
Source Result
<tbody>
</tbody>
<tbody>
</tbody>
Source Result
G | H |
N | 2 |
N | 3 |
N | 2 |
Y | 1 |
Y | 2 |
Y | 3 |
N | 2 |
N | 2 |
N | 2 |
Y | 1 |
N | 5 |
Y | 1 |
Y | 2 |
Y | 3 |
N | 1 |
Y | 1 |
<tbody>
</tbody>
G | H |
N | 2 |
N | 3 |
N | 2 |
Y | 2 |
Y | 4 |
Y | 6 |
N | 2 |
N | 2 |
N | 2 |
Y | 2 |
N | 5 |
Y | 5 |
Y | 10 |
Y | 15 |
N | 1 |
Y | 1 |
<tbody>
</tbody>