Carole,
"the code you gave me trys to pull all of the data in those rows in"
I have not provided you any code. All I did was corrected one of the lines.
This line does not return any value, it just looks at the last non-empty cell.
For i = 1 To LR
Is looping from row 1 to the last row in your data.
The LR may be 5,10,100,10000, it depends on the last raw in your data.
If you want to restrict your loop, you need to do
Either start it from different row.
let's say row 10.
Or,
When you loop down, instead of looping to unknown length, you can put in a fixed end.
Let's say from row 1 to 100
I= 1 to 100
We removed LR, as the last row may go below 100, but you only want to loop down to 100.
To sum up: The function of LR is to find a number(long), does not have any other function.
Bookmarks