General Question regarding Conditional Format

Livin404

Well-known Member
Joined
Jan 7, 2019
Messages
743
Office Version
  1. 365
  2. 2019
Platform
  1. 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,

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
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

Forum statistics

Threads
1,214,944
Messages
6,122,392
Members
449,081
Latest member
JAMES KECULAH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top