Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to highlight rows that meet specific conditions
Hello! Does anyone know how to write a macro that would highlight an
entire row if the cell value of A1 for example is 3 integers or greater than the value in D1? And, more specifically if I can also delete an entire row if the cell value in a specified column is 1 or less AND the cell value in column D is zero? Both of those conditione need to be true. ThankS! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
macro to highlight rows that meet specific conditions
On Jul 27, 5:00 am, amanda wrote:
Hello! Does anyone know how to write a macro that would highlight an entire row if the cell value of A1 for example is 3 integers or greater than the value in D1? And, more specifically if I can also delete an entire row if the cell value in a specified column is 1 or less AND the cell value in column D is zero? Both of those conditione need to be true. ThankS! Hi Try this code N = ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Row For rwIndex1 = 1 To N If Round(Cells(rwIndex1, 1).Value, 2) < Round(Cells(rwIndex1, 9).Value, 4) Then Cells(rwIndex1, 4).Interior.ColorIndex = 3 Next rwIndex1 its 2 column not match it will highlight red color on 4th column Regards Venky. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Count rows that meet 2 conditions in Excel 2007 | Excel Worksheet Functions | |||
Counting rows that meet conditions in multiple columns | Excel Worksheet Functions | |||
Hiding rows that meet multiple conditions in excel | Excel Discussion (Misc queries) | |||
display rows that meet two conditions | Excel Programming | |||
counting cells in a data range that meet 3 specific conditions | Excel Discussion (Misc queries) |