Hi, what would the code be to hide a row if the cell in column A contains the text "CEASEPHONE" .. an example of the text in the cell is 87543004937767149|AC|||CEASEPHONE||||| |05312016||||||05312016|
Hi, what would the code be to hide a row if the cell in column A contains the text "CEASEPHONE" .. an example of the text in the cell is 87543004937767149|AC|||CEASEPHONE||||| |05312016||||||05312016|
Any cell in column C contains the specified search string will result in deleting the entire row
Hope this will help.
Awesome,thanks!
What if I also wanted to highlight the cells (only columns A and B) before hiding?
This didnt work..
Sub CommandButton()
Dim c As Range
Dim SrchRng As Range
Dim SrchStr As String
Dim LR As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
Set SrchRng = ActiveSheet.Range("A2:A" & LR)
SrchStr = "CEASEPHONE"
Do
Set c = SrchRng.Find(SrchStr, LookIn:=xlValues)
If c Is Nothing Then
c.Interior.ColorIndex = 8
c.Offset(0, 1).Interior.ColorIndex = 8
c.EntireRow.Hidden = True
End If
Loop While Not c Is Nothing
End Sub
Use this instead:
An Example is attached
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks