Hi
Yep, removed the copy and paste by making one area's values be the same as another area's values.
This line of code is the same as going to the last column in row 5, then doing a ctrl left arrow to find the last filled cell in the row and then determining the column number. This effectively means you don't have to test each cell and see if it is blank and gives a defined end to the loop.
So each iteration of i is the column being actioned.
This makes the output range values be the same as the input range values. Using the cells approach enables you to use 2 numbers to determine the row and the column and not have to convert the column number to an alpha character (if you have that view!).
The resize command allows you to take a cell, and resize that single cell to a bigger range. In this case, it becomes a 5 row x 1 column block. As your output is 5 rows x 1 column, it matches in size. I've used this approach as you can use the cells command to determine the output starting point. Once you have that starting point, you expand the output range using resize and then transfer across the values.
Does that help clarify things??? Don't hesitate to ask more questions if still not clear.
rylo
Bookmarks