Hi,
I am looking for a macro to highlight a cell based on the rule it has a blank cell below.
The data series looks like the below and has 15,000 rows:
Cells.png
Thanks in advance.
Hi,
I am looking for a macro to highlight a cell based on the rule it has a blank cell below.
The data series looks like the below and has 15,000 rows:
Cells.png
Thanks in advance.
Try:
Sub Highlight() Dim LR As Long, R As Long LR = ActiveSheet.Range("A" & ActiveSheet.UsedRange.Rows.Count + 2).End(xlUp).Row For R = 1 To LR If Cells(R, 1) <> "" And Cells(R + 1, 1) = "" Then With Cells(R, 1).Interior .Pattern = xlSolid .PatternColorIndex = xlAutomatic .Color = 65535 .TintAndShade = 0 .PatternTintAndShade = 0 End With End If Next R End Sub
Want to show appreciation for the help you received from a member? Give them reps by clicking the bottom left of their post!
Perfect! Thanks!
try this:
Option Explicit Sub HiLite() Dim lr As Long Dim i As Long lr = Range("A" & Rows.Count).End(xlUp).Row Application.ScreenUpdating = False For i = 1 To lr If IsEmpty(Range("A" & i)) Then Range("A" & i - 1).Interior.ColorIndex = 37 End If Next i Application.ScreenUpdating = True End Sub
Alan עַם יִשְׂרָאֵל חַי
Change an Ugly Report with Power Query
Database Normalization
Complete Guide to Power Query
Man's Mind Stretched to New Dimensions Never Returns to Its Original Form
If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks for the rep
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks