LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Code ignoring filtered (visible) tasks.

mycat is a string in my I column or column 9 (defined as MyCategoryCol)

Export_Info(mycat as string)
{
....misc variables.


' Apply my filter.
Selection.AutoFilter Field:=MyCategoryCol, Criteria1:=mycat, Operator:=xlAnd

' Count the number of filtered tasks.
column_counter = Application.WorksheetFunction.Subtotal(3, Range("I:I"))


For i = 1 To column_counter



' The QUESTION
buff = Selection.Cells(i, MyQuestionCol)
ConBuff = ""
For j = 1 To Len(buff)
If InfFont(Asc(Mid(buff, j, 1))) = 255 Then
MsgBox "Unrecognised characters in Question at line " & i &
", character # " & j & " (" & Chr(InfFont(Asc(Mid(buff, j, 1)))) & "), table
entry " & Asc(Mid(buff, j, 1))
ConBuff = ConBuff + "?"
Else
ConBuff = ConBuff + Chr(InfFont(Asc(Mid(buff, j, 1))))
End If
Next j
Print #hfile, ConBuff

next i

.... many more sections of data, but they are all basically the same as this.

}


THE PROBLEM:
When I go through this loop, i always get the cells from the top, even ones
that should be filtered. I don't know why this happens. When I filter by
"Kids" for example, the 217 rows that have info about the "kids" even though
the actual row is at like 21,000 - I start getting entries from row 1, which
is usually a different column like "History"
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
count if on Visible - Filtered tonyv Excel Worksheet Functions 4 July 7th 07 07:34 PM
Return filtered tasks Finius Eetch Excel Programming 4 December 16th 06 06:53 PM
Filtered Visible Rows & VBA Non-Filtered Rows Displayed QTE[_15_] Excel Programming 8 July 11th 04 02:21 AM
Repost: Dop to next visible row when filtered? Ed[_9_] Excel Programming 4 October 21st 03 01:12 PM
Drop to next visible row when filtered? Ed[_9_] Excel Programming 2 October 11th 03 01:32 AM


All times are GMT +1. The time now is 04:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"