cheekbones3
Board Regular
- Joined
- Jun 13, 2007
- Messages
- 85
Hi all, I'm looking to automate a long and tedious manual process with a macro, and I'm not exactly sure the best way to go about it.
My date is arranged thus (simplified for clarity):
I wish to:
1) Move to the first occurrence of A (where A is the first variable in a separate look-up table)
2) Note the cell reference of the cell four to the right of A
3) Find the next occurrence of A, make cell active
4) Insert a formula setting the blank cell two to the right of the active cell equal to the reference from step 2 (not just the value).
5) Note the cell reference of the cell four to the right of A.
Repeat until the last A is found, then move on to B or whatever's next in the list.
Edit: (In hindsight, this doesn't sound too tough, but I confused myself by trying to use array formulae or something like it...)
My date is arranged thus (simplified for clarity):
Code:
a z 1 2
z z 3 4
z a 5 7
a z 6 8
z z 9 10
z a 11 12
z z 13 15
z a 14 16
a z 17 18
z z 19 20
a z 21 22
z z 23 24
a z 25 26
z a 27 28
z z 29 30
z z 31 32
I wish to:
1) Move to the first occurrence of A (where A is the first variable in a separate look-up table)
2) Note the cell reference of the cell four to the right of A
3) Find the next occurrence of A, make cell active
4) Insert a formula setting the blank cell two to the right of the active cell equal to the reference from step 2 (not just the value).
5) Note the cell reference of the cell four to the right of A.
Repeat until the last A is found, then move on to B or whatever's next in the list.
Edit: (In hindsight, this doesn't sound too tough, but I confused myself by trying to use array formulae or something like it...)
Last edited: