>There must be a way of doing this, but I cannot see it.
>
[quoted text clipped - 18 lines]
>
>Martin
Thanks for the help Jim. Subtotal gave me exactly what I wanted.
Gord, I think I may have been a little vague in my description - so to
clarify for anyone else reading this thread.
I had limited the range of the autofilter to only include the first 1000
rows. That is why I had stated that it only works on the first 1000 rows.
With this setup, the autofilter includes all of the rows in the autofilter
range (including the blank ones that come after the end of the rows that
actually contain data).
After a little experimentation, I noticed the problem that had caused my
initial post.
If I filter on a value in a column, then the status bar will give the
correct number of records found, exactly as you said. However, for one
filter I use a lot, I have a custom filter which checks for "does not
contain" "closed". This gives the problem I have stated. It counts the
number of records in the appropriate column which contain data, as well as
the blank ones. Obviously, it is counting the blank as "does not contain"
"closed", so the status bar gives a misleading value - ish.
I have used Jim's Subtotal to give me what I need and display it in a cell
at the top.
Thanks to you both.
Martin
> Why do say "only works on the first 1000 rows"?
>
[quoted text clipped - 45 lines]
>>
>>Martin
Gord Dibben - 20 Feb 2008 16:11 GMT
Martin
I cannot replicate this on my 2003 version.
Select a1:a1000 which includes a1 as header and a2:a500 with "closed" and 500
blanks cells A501:A1000
Filter on "does not contain" "closed"
I get 0 of 499 records.
Excel's filter range extends only to the last contiguous non-blank cell.
Gord
>Thanks for the help Jim. Subtotal gave me exactly what I wanted.
>
[quoted text clipped - 74 lines]
>>>
>>>Martin
Martin C - 21 Feb 2008 08:36 GMT
Cannot explain that! I also have Excel 2003. I have tried changing it to
"does not equal" "closed" and get the same result. I even changed my data so
that all the used rows had Closed in the appropriate column, ran the filter
and still had the same problem. Weird.
The formatting for the colum in question is set to General. Any filter I do
give me x of 999 records found.
Maybe my Excel is corrupted somehow. I may try getting the company to
reinstall it some time later.
Thanks for your help.
Martin
> Martin
>
[quoted text clipped - 95 lines]
>>>>
>>>>Martin
Gord Dibben - 21 Feb 2008 17:54 GMT
Maybe your blank cells are not blank?
Do they have formulas that return a blank?
Maybe a space in?
In a cell adjacent to a blank cell enter =LEN(cellref)
Gord
>Cannot explain that! I also have Excel 2003. I have tried changing it to
>"does not equal" "closed" and get the same result. I even changed my data so
[quoted text clipped - 109 lines]
>>>>>
>>>>>Martin
Martin C - 22 Feb 2008 11:44 GMT
I tried the LEN check, and the cells are indeed blank (ie len=0).
I even tried removing all of the conditional formatting (which is applied to
an entire row if appropriate cell in the column in question is set to
'Closed'. This had no affect on the problem either.
The only other thing I can think of is that the data placed into the area in
question is copied into the relevant columns via a macro which pulls out the
relevant data from another area of the sheet. i.e. Data is obtained from a
seperate application, pasted into a particular area in the sheet and the
macro run to process the data. I don't see why pasting data in and then
filtering should have any effect on the problem, but I am out of ideas or
possible information to give you.
Thanks for your help
Martin
> Maybe your blank cells are not blank?
>
[quoted text clipped - 132 lines]
>>>>>>
>>>>>>Martin