Tricky OFFSET routine
Thanx Bernie.
We're getting there, now I need to add in the final issue ...
First off, one more error on my part ...
rows(m$1:m$1018)-row(m1220)
Should be
rows(m$1:m$1218)-row(m1220)
That way the offset is looking for criteria 2 rows above the *first* row.
But as earlier presented, this is in groups of 200, or actually 202
including the two criteria rows above each group.
The starting group's "first row" is row 8, which would be...
rows(m$1:m$6)-row(m8)
The second group's first row would be in row 210, so ...
rows(m$1:m$208)-row(m210)
The third group's first row would be in row 412, so ...
rows(m$1:m$410)-row(m412)
.... And so on.
Which brings me back to the original [restated slightly] "offset always
needs to be specifically and "absolutely" 2 rows above whatever the *first*
row is [only].
In thinking this through, perhaps I could have the code find-and-replace the
original
rows(m$1:M$6)-row(m8)
with rows(m$1: REPLACE "M$6" WITH "ROW 0-2" )-row(m****)
???
Thanx again for working thru this with me, it presents a tricky set of
parameters.
Regards,
- Mike
"Bernie Deitrick" wrote:
Mike,
Try changing
rows(m$1:m1018)-row(m1220)
to
rows(m$1:m$1018)-row(m1220)
which should increment as it is copied down the column.
HTH,
Bernie
MS Excel MVP
"MikeF" wrote in message
news:981282DD-5615-42A7-AE00- ... And so on.
I had tried something like rows(m$1:m1018)-row(m1220), but it always
returns
-2 as it goes down the rows, not -2, -3, -4, and so on.
|