Livin404
Well-known Member
- Joined
- Jan 7, 2019
- Messages
- 743
- Office Version
- 365
- 2019
- Platform
- Windows
I have PDF that I save from a Database. This PDF is then saved as an Excel Worksheet which is then pasted on my Excel Worksheet. At this time I launch a series of macros. Part of this process Rows are being inserted, deleted, moved etc. On one of these columns I created conditional formatting rules so cells in Column M would highlight in yellow based on the height of Column A. However, it seams the conditional formatting is lost along the way. Is there another way I can have a conditional format remain intact without trying to figure out a VBA to use in it's place?
I tried to improve on the Macro to input base on the height of Column A. This macro is: Again, I hope I can use the conditional formatting.
Thank you,
I tried to improve on the Macro to input base on the height of Column A. This macro is: Again, I hope I can use the conditional formatting.
Thank you,
VBA Code:
Sub highlighting_Cells()
Dim rng As Range
Dim rngcell As Range
Dim row_count As Integer
Dim ws As Worksheet
Set ws = ThisWorkbook.Sheets("Outbound")
ws.Activate
row_count = WorksheetFunction.CountA(Range("A1", Range("A1").End(xlDown)))
cond_count = 0
Set rng = ws.Range("M5:N" & row_count)
For Each rngcell In rng
If Cells(rngcell).Value = "" Then
cell.Interior.ColorIndex = 6
End If
Next
End Sub