+ Reply to Thread
Results 1 to 8 of 8

Searching tables and displaying results

Hybrid View

  1. #1
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523

    Re: Searching tables and displaying results

    Hello,
    Select the range you want to filter, goto Data>autofilter
    Use the arrows to select what to filter for.

  2. #2
    Forum Contributor
    Join Date
    02-08-2006
    Location
    UK
    MS-Off Ver
    2013
    Posts
    204

    Re: Searching tables and displaying results

    Thanks for the response, but I would like this to be done by using VBA.

    I have come across this code:

    With Sheet1
                .AutoFilterMode = False
                .Range("A1:A10").AutoFilter
                .Range("A1:A10").AutoFilter Field:=2, Criteria1:=Job11
    End With
    But when I use it to search for "Job11" (Which is contained in A2 and A4) It filters two rows that DONT contain that information! However if it is numerical (so just 11) then it filter properly - but what if I want to filter text? Will this still keep happening?

    What would be ideal is to adapt the code so that the range it is searching (A1:A1) reads as a named range and for criteria to be what is entered into a textbox (textbox1 of userform1).

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1