Very useful tutorial, And thanks that you explained why you need last row (but I wonder if it counts every column or only first?) I think this is only way to prevent duplicating and mismatch conditional formatting (CF) rules when you must copy/paste between areas with different CF. Can you explain in which event in VBA should I put this function to work automatically like traditional CF? Maybe "Worksheet_SelectionChange"?
That's some good question, will do my best to answer them. 1) I didn't explain the entire code for defining the last row. You will notice that after "rows.count," there is a number, this represents the column number, so in this case it is referring to column A. 2) Are you referring to when the sheet gets edited/modified and/or new rows are added? In this case you can use the worksheet change event and the range used in the "with sheet" would need to be larger to ensure you capture any additional rows.
Hi @jxfladh, You could do something like this, where if someone clicks on a specific cell, then another cell(or range) would be cleared or whatever you want it to do. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim reg As Range, abc As Range Set reg = Range("D2") Set abc = Range("E2") If Target.Address = reg.Address Then abc.ClearContents End If End Sub