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: 1
Default Filtering Data


Hello,
I am trying to filter out a large amount of data, currently I am onl
searching one column("C:C"), but for another function, I am needed t
filter through 3 columns (C,D,E). I also need to revise my code, s
that if the cell contains any part of the string I am looking for, i
should filter it out(keep the row), and if not, it should delete th
row. Right now, this code will search col c, and if that row EQUALS m
search variable (FVar), it will keep the row. (set it to true).

Function Filter4(FVar)
Dim rnData As Range
Dim iRows As Integer
Dim iColumns As Integer

Application.ScreenUpdating = False
Range("A1").Select
Set rnData = ActiveSheet.UsedRange
Let iRows = rnData.CurrentRegion.Rows.count
Let iColumns = 6

Cells(1, iColumns).FormulaR1C1 = "Sort"
Cells(2, iColumns).Select
Selection.FormulaR1C1 = "=OR(RC[-3]={""" & FVar & """})"
Selection.Copy Destination:=Range(Cells(3, iColumns), Cells(iRows
iColumns))

With rnData
.AutoFilter Field:=iColumns, Criteria1:="False"
.Offset(1, 0).Resize(.Rows.count - 1, .Columns.count) _
.SpecialCells(xlCellTypeVisible).EntireRow.Delete
.AutoFilter
End With

rnData.Columns(iColumns).Delete
Application.ScreenUpdating = True

End Function

Would anyone be able to help me out in order to be able to searc
through 3 columns, and even if the cell contains part of the searc
variable, it will filter it out??? thanks alot for any suggestion
that you may have!

--
tess45
-----------------------------------------------------------------------
tess457's Profile: http://www.excelforum.com/member.php...fo&userid=1393
View this thread: http://www.excelforum.com/showthread.php?threadid=26206

 
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
Filtering of data - autmatically based on data on other sheet uptonfamilywa Excel Discussion (Misc queries) 1 June 20th 09 12:46 AM
Need Help filtering data dab Excel Worksheet Functions 6 March 3rd 08 06:41 PM
Filtering Data KCWCD190 Excel Discussion (Misc queries) 2 March 10th 07 01:21 AM
Filtering out Data Jo Davis Excel Discussion (Misc queries) 1 July 7th 05 11:34 AM
Help with Filtering data and matching two data sets? masai_chadi Excel Programming 2 March 1st 04 10:33 PM


All times are GMT +1. The time now is 03:42 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"