Results 1 to 9 of 9

Hiding all rows with inexact matches

Threaded View

  1. #2
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: Hiding all rows with inexact matches

    Hi, and welcome to ExcelForums. This place has taught me a ton, and I'm just now myself starting to feeling comfortable and confident enough in offering help and advice back to other's.

    How's something like this?

    I did a compare of the two fields and returned a True or False. True is a Match found. That formula is as follows
    =ISNUMBER(SEARCH(B2,A2))
    Then I searched that True/False cell range hiding any 'True' Values.
    Sub HideMatch()
        Dim rows_rng As Range, rows2hide As Range
        Dim rCell As Range
        
        Set rows_rng = Range("C2:C5")
            
        For Each rCell In rows_rng
            If rCell.Value = "True" Then
                If rows2hide Is Nothing Then Set rows2hide = rCell Else Set rows2hide = Union(rCell, rows2hide)
            End If
        Next
    
        Application.ScreenUpdating = 0
        rows_rng.EntireRow.Hidden = 0
        If Not rows2hide Is Nothing Then rows2hide.EntireRow.Hidden = 1
        
        Application.ScreenUpdating = 1
    End Sub
    Sample Attached
    Attached Files Attached Files
    Last edited by ptmuldoon; 06-28-2015 at 11:21 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Match Category ID's to Campaign Names with inexact vlookup matches.
    By luftschiff in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-03-2014, 12:56 PM
  2. [SOLVED] Finding specific text in a cell with inexact results
    By bob33 in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 03-05-2013, 12:29 PM
  3. Formula for detecting inexact duplicates?
    By Chucky2222 in forum Excel General
    Replies: 10
    Last Post: 06-21-2012, 08:53 PM
  4. [SOLVED] Hiding column/row labels --without hiding entire columns/rows
    By daniel.wolff@csfb.com in forum Excel General
    Replies: 2
    Last Post: 10-18-2005, 10:05 PM
  5. Inexact? InsideTop and InsideLeft Method of PlotArea (Excel 97)
    By jintao in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-21-2005, 04:47 AM

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