Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count rows that meet 2 conditions in Excel 2007 Jason Stearns Excel Worksheet Functions 4 October 1st 09 12:21 AM
Counting rows that meet conditions in multiple columns belleinhell Excel Worksheet Functions 3 July 21st 08 06:50 PM
Hiding rows that meet multiple conditions in excel KBV Excel Discussion (Misc queries) 1 July 4th 06 10:14 PM
display rows that meet two conditions owl527[_21_] Excel Programming 1 January 16th 06 10:47 AM
counting cells in a data range that meet 3 specific conditions bekah7 Excel Discussion (Misc queries) 3 October 1st 05 06:21 AM


All times are GMT +1. The time now is 08:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"