Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Closed Thread
 
Thread Tools Display Modes
  #31  
Old 12-03-2014, 01:52 PM
BobBridges's Avatar
BobBridges BobBridges is offline highlight the entire row of current cell Windows 7 64bit highlight the entire row of current cell Office 2010 32bit
Expert
 
Join Date: May 2013
Location: USA
Posts: 700
BobBridges has a spectacular aura aboutBobBridges has a spectacular aura about
Default

Just for future note, when I want to set a conditional format, rather than type the range into the Rules Editor I just select the range the new rule applies to before going in there. Easier and less error-prone, I think.
  #32  
Old 05-20-2017, 06:31 AM
codeghi codeghi is offline highlight the entire row of current cell Windows 7 64bit highlight the entire row of current cell Office 2010 64bit
Advanced Beginner
 
Join Date: Jan 2010
Posts: 38
codeghi is on a distinguished road
Default

Quote:
Originally Posted by Pecoflyer View Post
It's not very complicated to add the VBA solution

Open a workbook
Hit Alt+F11 ( VB editor opens)
Clcik View - Project explorer ( it's usually open by default)
Select the sheet where you want to implement the macro
A window opens

Paste this code

Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
 
    Application.ScreenUpdating = False
    ' Clear the color of all the cells
    Target.Parent.Cells.Interior.ColorIndex = 0
    With Target
        ' Highlight the entire row and column that contain the active cell
        .EntireRow.Interior.ColorIndex = 8
 
    End With
    Application.ScreenUpdating = True
End Sub
Close the VB window and save when asked
From now on the row will highlight when a cell is selected

Play around with the macro a bit to change the color there where it says
.EntireRow.Interior.ColorIndex = 8
Change the 8 to another value

It works for me and I know nothing about VB


Hello,
I've the same problem.
The VBA solution works, but it deletes the format of the file.
How can be modified the VBA program in order to highlight the row of selected cell without deleting the existing format?
Regards
  #33  
Old 05-20-2017, 07:30 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline highlight the entire row of current cell Windows 7 64bit highlight the entire row of current cell Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Please do not hijack existing threads but start a one of your own adding a link to any other relevant threads if necessary. Thank you
Thread closed
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Closed Thread



Similar Threads
Thread Thread Starter Forum Replies Last Post
highlight the entire row of current cell Excel 2007, highlight entire row based on data found in one cell MSofficeBLUE Excel 2 10-15-2013 09:51 PM
Is there a way to automatically highlight the column and the row that of the current Jamal NUMAN Excel 8 02-14-2012 02:58 PM
highlight the entire row of current cell How to highlight the row based on cell value? Learner7 Excel 1 12-11-2011 02:28 AM
highlight the entire row of current cell Macro for moving one cell down from current position Johnny thunder Word VBA 3 04-07-2011 04:44 PM
highlight cell after checkbox flatk Word 0 01-25-2007 12:32 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:29 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft