Hello all,
I have very little experience with VBA, but I'm trying to write a code that will copy cells in a range that are not empty, then continue down the column to the next range and copy those values until another non-empty cell appears, then move to the next range. For instance:
I have a sheet with the following values:
<tbody>
</tbody>
I want the code to check if cell is empty in range B2:B4, and when it gets to an empty cell (B3) then move to next range (B6:B8), but if non-empty, copy cells (A1:D2) into a different sheet then move to next range and copy those non-empty cells in that range like this:
<tbody>
</tbody>
So basically, the code "compresses" the data into a summary sheet. Any help would be greatly appreciated.
Thanks!
I have very little experience with VBA, but I'm trying to write a code that will copy cells in a range that are not empty, then continue down the column to the next range and copy those values until another non-empty cell appears, then move to the next range. For instance:
I have a sheet with the following values:
A | B | C | D | |
1 | z | |||
2 | 1 | 2 | 3 | |
3 | ||||
4 | ||||
5 | y | |||
6 | q | r | t | |
7 | 4 | 5 | 6 | |
8 | 1 | 4 | 7 |
<tbody>
</tbody>
I want the code to check if cell is empty in range B2:B4, and when it gets to an empty cell (B3) then move to next range (B6:B8), but if non-empty, copy cells (A1:D2) into a different sheet then move to next range and copy those non-empty cells in that range like this:
A | B | C | D | |
1 | z | |||
2 | 1 | 2 | 3 | |
3 | y | |||
4 | q | r | t | |
5 | 4 | 5 | 6 | |
6 | 1 | 4 | 7 |
<tbody>
</tbody>
So basically, the code "compresses" the data into a summary sheet. Any help would be greatly appreciated.
Thanks!