Venturing some thoughts ..
Think the prob lies in this term:
MATCH($F$5,source!$A$3:$A$33412,1)
which may not always return the "last" row
Think we could try replacing the above with this expression (it requires
array-entry):
MATCH(MAX(IF($F$5=source!$A$3:$A$33412,ROW($A$3:$A $33412))),IF($F$5=source!$A$3:$A$33412,ROW($A$3:$A $33412)),0)
Try, array-entered, ie press CTRL+SHIFT+ENTER to confirm the formula:
=COUNT(OFFSET(MGCSales,MATCH($F$5,source!$A$3:$A$3 3412,0),8,MATCH(MAX(IF($F$5=source!$A$3:$A$33412,R OW($A$3:$A$33412))),IF($F$5=source!$A$3:$A$33412,R OW($A$3:$A$33412)),0)-MATCH($F$5,source!$A$3:$A$33412,0),1))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:20,500 Files:362 Subscribers:64
xdemechanik
---
"alan82" wrote in message
...
Hi,
I have a problem when using the offset function. I am using the Match
function to find the first and last occurences of a string in a series
of data. When the string is early in the data this works. When the
string is late in the data -- past 1000 rows -- the offset function
returns nothing.
Does anybody know why this is??
Here is the formula:
=COUNT(OFFSET(MGCSales,MATCH($F$5,Source!$A$3:$A$3 3412,0),8,MATCH($F
$5,Source!$A$3:$A$33412,1)-MATCH($F$5,Source!$A$3:$A$33412,0),1))
Thanks in advance for your help.
A