In Excel is it possible to highlight a row Red if anywhere in that row is clicked?
-
I need to quickly mark a bunch of rows scattered around a large excel file.. Is there a macro code that can be written for this task? Basically if I click anywhere in a row it needs to turn the entire row red.. for each row I click. Then later I can manually sort by color and remove the red rows.
-
Answer:
Yes. Such macro would have to run freely and continously. Therefore I would put the script directly in the said sheet you would have to use it; Open VBA (Alt+F11) and double click the sheet you wish use this macro... Paste all that is under the ##### in the sheet. The way I wrote it, you would have to start the macro by typing True in the A1 cell... But you can change that. Cells(1, 1) mean cell A1... if you want like C1 put (1, 3) or if you wish A2 put (2, 1)... To start macro simply go to the choosen cell and type true. To stop, return there and clear it or type anything else lol... #### Option Explicit ' ' Macro made by Simonp for Custom S Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Cells(1, 1) = True Then Dim RngRow As Range Dim RngCol As Range Dim RngFinal As Range Dim Row As Long Dim Col As Long Row = Target.Row Col = Target.Column Set RngRow = Range("A" & Row, Target) RngRow.Interior.ColorIndex = 3 End If End Sub
Custom S at Yahoo! Answers Visit the source
Related Q & A:
- How to find out if it is possible to contruct a binary matrix with given row and column sums?Best solution by Mathematics
- Is it possible to allow a client/user to log into a Remote Desktop session using credentials other than their AD username/password? (for SSO?Best solution by Server Fault
- How to get the column value when a row is selected in wpf listview?Best solution by Stack Overflow
- What is bad about painting a barn red in the south?Best solution by grit.com
- Is it possible to be allergic to red peppers because of its colour?Best solution by instah.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.