How to select ranges with variables
Posted by Brent Frame on July 06, 2000 1:54 PM
I need to write some VB code to run through and select varying ranges.
Take for example:
A B C
1 1 xxx xxx
2 2 xxx xxx
3 2 xxx xxx
4 2 xxx xxx
5 1 xxx xxx
6 2 xxx xxx
7 2 xxx xxx
8 2 xxx xxx
9 2 xxx xxx
10 2 xxx xxx
11 2 xxx xxx
12 1 xxx xxx
13 2 xxx xxx
14 2 xxx xxx
15 2 xxx xxx
I need code that will select a new range when column A = 1. So the first range in this example would be A1:C4. At that time I will use the range in a vLookup function on a separate worksheet. Then the range has to move on to the next set, A5:C11. This continues through the end of the list.
I know this has to be in a Loop, but I cant figure out how to write the code for a range with variables.
Thanks,
Brent