Highlighting Rows

the_adam90

New Member
Joined
Aug 17, 2015
Messages
3
I don't know if this is possible, but I would like to be able to highlight a row by using ctrl+F and by typing in what is in column A, be able to highlight the row in blue.
When I type in what is in column A while it is highlighted in blue, I want it to turn green. When I type in what is highlighted in green, I want the row to delete. I don't know what formula to use.
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hello,

this code needs to go into the relevant sheet code window, not a standard module

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Columns(1)) Is Nothing Then Exit Sub
        Application.EnableEvents = False
        Select Case Target.Interior.ColorIndex
            Case 5
                Rows(Target.Row).Interior.ColorIndex = 10
            Case 10
                Rows(Target.Row).Interior.ColorIndex = xlNone
                Rows(Target.Row).ClearContents
            Case Else
                Rows(Target.Row).Interior.ColorIndex = 5
        End Select
    Application.EnableEvents = True
End Sub

It works when you type in data into column A. It will not work with the shortcut.

Is it close to your requirements.
 
Upvote 0

Forum statistics

Threads
1,215,339
Messages
6,124,362
Members
449,155
Latest member
ravioli44

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top