To Highlight Active Row And Column
I found this code to highlight the active row. I tried to make it highlight the row and column, but I was not successful. What I really need is to highlight the active row and column above and to the left of the active cell, not the entire row and column. For example, if G10 is active, the highlighted cells would be G1:G10 and A10:G10.
Private Sub Worksheet_SelectionChange(ByVal Target As Excel. Range)
Dim i As Long
Cells.Interior.ColorIndex = xlColorIndexNone
If Application. CountA(Target.EntireRow) 0 Then
i = Target.Row
Else
For i = Me.UsedRange.Rows.Count To 1 Step -1
If Application.CountA(Me.Rows(i)) 0 Then
i = i + 1
Exit For
End If
Next i
End If
Rows(i).Interior.ColorIndex = 6
End Sub
Also, I have fill colors on the sheet and I just noticed that the code removes those fill colors. I need it to not remove my fill colors. The only fill colors it should remove are ones it previously colored.
View Complete Thread with Replies
Sponsored Links:
Related Forum Messages:
Highlight The Active Row
if you click on a row, it highlights every cell in it, I want to do the exact same thing but then also when you click on a cell only. Preferable (probably impossible though) without the use of VBA, because in my company I think some are "carefull" with enabling macro
View Replies!
View Related
Highlight Active Row
I spend a lot of time in spread sheets working with part numbers and sales figures. With a part # in column B and sales per month in adjacent columns, stretching back years. Is there any way to highlight an entire row automatically? ie. I use Ctrl F to search for a number and it goes to B24. I now want the entire row 24 highlighted as the active row. When I move to another cell I want the entire row highlighted automatically. Can it be done.
View Replies!
View Related
Highlight Row Of Active Cell
Is it possible to have a specified shading (say 50%) applied to all rows except the currently picked row and the header rows to allow a user to focus on inputting across the row? I'd use this in conjunction with " Move Selection After Enter" to "Right" so the user would stay on the same row. I've tried the Help function, but can't find anything.
View Replies!
View Related
Highlighting Active Cell's Row, Along With Any Row That Shares Same Value In That Column
Is it possible to click on a cell in column C, and have the wishlist below happen: That active cell's row is hightlighted. Any cell in that column that has the same value as active cell is also highlighted. Plus, any cell in another sheet that has that value it's row is highlighted too. Example: I click on C5 in Sheet 2 its value is 45000789 it row is highlighted, this value also appears in C3 in the same sheet, so it's row is highlighted as well. Plus, in sheet 1 in C10 this value appears and it's row is highlighted as well. When any of the values are clicked again the highlight is removed from all parties.
View Replies!
View Related
Row/column Highlight
When I click on a cell, is there a way to have the cells in the column and row that intersect with that cell highlighted or greyed-out automatically .. to highlight the intersection itself ?
View Replies!
View Related
Highlight Row Range Based On Value In Another Column
I have been reading and searching on how to get around Excel's limit of 3(or 4) conditional formatting rules with VBA. I have a pretty good grasp of what the code is telling the system to do, however what I am not understanding is how can I have the Code check multiple sets of columns? ex Columns A,B and C Rows 1:100 need to be checked if they are between a particular range and clolums D,E, and F need to be checked against a completely different set of criteria. I tried cutting and pasting the Sub, changing the Range values and the conditions, but it always errors out.
View Replies!
View Related
Paste Formula To Specific Row In Active Column
I'm trying create a macro to enter a series of forumula's in a series of rows in whatever column is currently selected (or column which has a cell selected). IE if the active cell is C5 I want "=A1+B1" copied to C10 of it was AA43 selected I'd want "=A1+B1" copied to AA10. Have done this with setting a row as a variable, but whenever I've defined the column as one it comes out as a numeric value. and gives me "method range of object global failed"
View Replies!
View Related
Set Variable To Row & Active Cell Column
I have a sort procedure I have been working on. Sort By Active Cell Column Now I would like to make sure the row of the activecell.column is row 7. I tried Private Sub comp_myMonthlyReport_SortAscend() Dim rng As Range With ActiveWindow rng = .ActiveCell(7, .ActiveCell.Column) End With Selection.Sort Key1:=rng, _ Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom End Sub But I receive this error: Run-time error '91': Object variable or With block variable not set
View Replies!
View Related
Highlight Differences Of Cells In Multi Column & Row Table
PART 1 - A record is created - The record is modified once/several times - Only the original record and the last modified record needs to be kept PART 2 - The differences between the original and the last record need to be highlighted in the spreadsheet. - This has to be repeated for a whole bunch of rows Currently I am manually deleting the rows and eye-balling the changes. I'm using Excel 2002. I have ASAP Utitilities as well. Although macros are cool, I was hoping I could try with an Add-in or software.
View Replies!
View Related
Pick Data From A Specific Row/column (eg 10/B) Related To Active Cell
I have a spreadsheet with my Periods along row 10. e.g. C10: "1", D10: "2", E10 "3", F10: "4", G10: "5" etc. (green on the attached sheet). I have my departments along column B, e.g. B11: "Baked" B12: "Fresh" B13: "Frozen" (yellow on the attached sheet) what I need and cannot work out is some VBA code that will populate two variables (lets call them Period & Department) when I click on one of the figures. For example if I click on cell: if I click E14: Period would have the contents of cell E10, and Department the contents of cell B14. if i click G14: Period would have the contents of G10, and Department the contents of cell B14 again. I know how to get the click on the cell to work properly etc, and I have code to slot these variables into that works very nicely, I just can't get this bit to work!!!!
View Replies!
View Related
Print Active Cell Highlight
I have a routine that highlights a selected Active Cell, but when I printout the spreadsheet this highlight is not printed. I have been pull my hair out (what's left!), to try to show this highlighted cell when printed. Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Range("d22:u45"), Target) Is Nothing Then Range("d12").Value = " Out" Range("e14").Value = "0" Else If Intersect(Range("d22:u45"), Target) >= 3 Then Range("d12").Value = Cells(19, ActiveCell.Column).Value Range("e14").Value = Cells(21, ActiveCell.Column).Value Static rngPrev As Range, PrevColor As Integer Dim TempColor As Integer TempColor = Target.Cells(1, 1).Interior.ColorIndex If Not rngPrev Is Nothing Then If PrevColor <> xlLineStyleNone Then .......................
View Replies!
View Related
Highlighting The Active Cell After A Highlight
I have a cover sheet to a workbook that holds hyperlinks to its relevent page. Several of the hyperlinks link to the same page but different relevant cells. However it is not overly clear which cell is active when you click the hyperlink. What I would like is for the active cell to be highlighted on the page. EG hyperlink 1 links to page 1 cell A2 & hyperlink 2 links to page 1 cell B6 - I would like A2 to be highlighted when accessed by hyperlink 1 & B6 highlighted when accessed by hyperlink 2.
View Replies!
View Related
Highlight Row If Cells In Row Meet Multiple Conditions
I have a spreadsheet of actions/tasks. I have a column with the expected completion dates of each action and another column stating whether the action/task is "open" or "closed". I would like to highlight any actions that have gone past their expected completion date and are marked as still being "open". Obviously i dont want any row that are closed to be highlighted. I know the =TODAY()- B1>0 formula will highlight the dates cell that have expired but how do i extend this formula to what i require.
View Replies!
View Related
Insert Row On Sheet & Move Active Cell Row To It
I would like to create a macro that could archive entries from one sheet and insert them in another. I created one but the problem is that the entry has to be the same row each time. Example: Sheet 1 – is current jobs and sheet 2 is old jobs. My macro moves an entry from Row A-5 of Sheet 1 and moves it to the top of Sheet 2. I would like to be able to scroll through each entry select it and have it moved to the top of the Old Jobs sheet.
View Replies!
View Related
Insert Row At Active Cell With Formula From Fixed Row
I want to insert a new row that contains the formulas of a fixed row (1:1). The inserted row is changeable and is determined by whichever is the current active cell. Eg: Active cell is something random like E16 I want to add a new row but don't want a blank row - rather want a row that contains the properties of 1:1
View Replies!
View Related
Evaluate Each Row And If The Last Value For That Row Is X, Then Highlight That Cell
I want to do it evaluate each row and if the last value for that row is X, then highlight that cell and the Server name for that row. I have used conditional formatting but it seems that I cannot specify an option to look at the last cell in a row, evaluate that cell's value and then apply the formatting. I can only have conditional formatting highlight every cell in that row that matches the condition. I only want the last cell, which represents the most current data, to be highlighted, as well as the category name, if the condition is met.
View Replies!
View Related
Highlight Row If Cell Value Exists In Row
I'm trying to make a macro. I'm experienced with Excel (took a college course on it) but am really new to VBA and making my own macros. I need a macro that will take the item number in cell E4, and highlight the row (specifically columns B through R) where that unique item number is found (they're located in row B).
View Replies!
View Related
ACtiveCell.row: Active Row Is Empty
I am trying to write a statement that sees if the the row below the active row is empty. I have written the following but it is wrong. Please can someone correct it for me? Thanks! If IsEmpty(ActiveCell.Row.Offset(1, 0)) = False Then MsgBox "Not Empty" End If
View Replies!
View Related
Highlight A Row
In a workbook. I have a cell with a hyperlink to different sheet in the same workbook. I want to make it so, that when someone clicks on the hyperlink and is taken to the cell on the sheet i linked to, that the whole row of data highlights. The highlight can only be turned on when someone clicks the hyperlink. Does this require VBA script? I am using Excel 2003.
View Replies!
View Related
Highlight The Row ...
I have a spredsheet with names going down column A and then a lot of data in the next 20 columns. It is sometime a challenge to see for which name the data is associated with becuase I have to look across a long row... Is there a way in Excel, that when you click on a cell, it would HIGHLITE the row that you are in at that moment?
View Replies!
View Related
Highlight Every Other Row
I need a code that will highlight every other row in a some color. I would like the macro to start in row 7 and use column A as a reference to know when to stop (last populated row in column A is where it needs to stop). The rows that get highlighted can all get highlighted in the same color, and the entire row can be highlighted. The twist to this is that there are hidden rows in the range and I want the macro to disregard those.
View Replies!
View Related
Highlight A Selected Row
just bought a 22" wide screen monitor and when working in excel it's difficult to follow from left to right in a row i am looking at. i have 22 columns of info that are in view at any given time. the row number on the left gets highlighted and the cell i happen to be in is outlined with a double line border. is there a way to get the whole row outlined like the single cell? i know i can achieve this by clicking on the row itself, but i tend to move a lot around the spreadsheet via the arrow keys.
View Replies!
View Related
Highlight Row Cursor Is Currently In
I received this code from the board about a month ago. It works perfectly to highlight the row the cursor is currently in but, has one flaw. Once you place this code in the sheet module and the code initiates, it will "erase all other highlight colors" within your sheet. Is there a way to correct this problem? Here is the code; Private Sub Worksheet_SelectionChange(ByVal Target As Range) Cells.Interior.ColorIndex = xlNone With Target.EntireRow.Interior .ColorIndex = 37 .Pattern = xlGray25 .PatternColorIndex = 24 End With End Sub
View Replies!
View Related
Select / Highlight Every Other Row
I have done a search both on here and on the Internet in general, and I can't seem to get this question exactly answered... How does one select/highlight every other row? (Alternating) (Other than Hold CTRL and select every other one) Related issue: How would you go about INSERTING alternating rows? ie Starting with rows 1 2 3 How would one make it into 1 2 3 ?
View Replies!
View Related
Auto Highlight A Row
I'm trying to reduce my formating time by have a script auto highlight a row based on a certain value in column "K" SPECIFICALLY K9 thru K1009. Hight Light Row - YELLOW if this value "AAIT ASSY" OR "AAIT OW" is in column "K" SPECIFICALLY K9 thru K1009 Hight Light Row - LIGHT YELLOW if this value "AAIT KIT" is in column "K" SPECIFICALLY K9 thru K1009 Hight Light Row - TURQUOISE if this value "C-TYPE" is in column "K" SPECIFICALLY K9 thru K1009 Hight Light Row- TAN if this value "C/A" is in column "K" SPECIFICALLY K9 thru K1009 Hight Light Row- ORANGE if this value "ZZ" is in column "K" SPECIFICALLY K9 thru K1009
View Replies!
View Related
Use Active Row In A Formula
I am wanting to use the row number of the current active cell in another formula on a spreadsheet. I have only been able to find info in putting the active row number in a dialog box. Is there a method of returning the active row number and using in a number of formulas.
View Replies!
View Related
Reference To Active Row
I want to arrange a dataset in blocks of 8 lines and for this I need to refer to the actual row of the active cell. Below code does not work - the "Row" does not change as the active cell moves down through the rows
View Replies!
View Related
Use Value Of Active Cell To Name Row
I'm trying to take the value of a cell and use the value as a name for the row. If cell a1 has value = June. I want to change the name of row 1 to June. I'm not sure what I'm doing wrong with the following code. Sub Name_a_row() ' ' Dim TheName As String Dim RowNum As Integer TheName = ActiveCell.Value RowNum = ActiveCell.Row ActiveWorkbook.Names.Add Name:="TheName", RefersToR1C1:="=Data!R&RowNum"
View Replies!
View Related
Condition Format: Highlight Whole Row
i cannot find my old msg , so i re-read again. let me repeat my question one more time . right now i can achieve is :- when i enter in cell $A$6 " win " and i set the conditional format when this cell text = Win. i highlight "RED color " i can set the above without much problem. what i want to a bit more is when $A$6 ="Win" i wanted , the Row A6 till F6 cell all highlighted with red.
View Replies!
View Related
Highlight A Row Based On A Cell
I have a macro that already works well but I need to make a change to it and I can't figure out how to do it. I need so when the macro is run it will prompt the user for a date. After they enter the date it will highlight cells A:K on each row that data appers. A little background for this. It is a schedule for a call centre which can show two to three weeks of schedules per agent. We rerun the macro each day to update break times and I would like it so it will highlight todays line.
View Replies!
View Related
Highlight A Row Of Cells That Contain Same Date
I am trying to figure out how to highlight the row of cells within the column that contains the same date as the date in cell e:1 the date in cell e:1 changes daily because the formula says =today(). With that said, the column contains every date of the year so i would just like to be able to have the row, that contains the same date as the date in cell e:1, highlighted AUTOMATICALLY.
View Replies!
View Related
|