Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Excel VBA -- Finding last row in group of columns
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Dianne Butterworth, post: 5941565"] How about: Sub OverTaktHighlight() Dim lngLastRow As Long Dim lngCol As Long Dim lngRow As Long Dim ws As Worksheet Dim vntMatch As Variant For Each ws In ActiveWorkbook.Worksheets lngLastRow = ws.Range("G" & ws.Rows.Count).End(xlUp).Row vntMatch = ws.Range("U3").Value For lngCol = 7 To 11 For lngRow = 3 To lngLastRow With ws.Cells(lngRow, lngCol) If .Value > vntMatch Then .Interior.ColorIndex = 6 .Font.ColorIndex = 3 Else .Interior.ColorIndex = xlColorIndexNone .Font.ColorIndex = xlColorIndexAutomatic End If End With Next lngRow Next lngCol Next ws End Sub [/QUOTE]
Verification
Post reply
Forums
Archive
Newsgroup Archive
Excel Newsgroups
Excel Programming
Excel VBA -- Finding last row in group of columns
Top