Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 30
Default Conditional Formatting

Rows of data from two sources have been combined and sorted on one worksheet.
To identify the source of the data, the rows are 'flagged' with the acromyns
"ign" or "leg". The only reason they are appearing on this report is that
there is/are cell(s) of data that have been incorrectly entered in one of the
two records.

In this worksheet, I need to find and highlight the following:
1) If the data in Column A2 equal "ign" and Column A3 equals "leg" and
2) If columns B2 and B3 record numbers are the same then
3) Find the cells within range c2 and ae3 that are different and highlight
them.

This will be comparing two rows of cells, c2 thru ae2 and c3 thru ae3.

I have the following 'conditional formatting' formula as part of a subroutine.
Record1 = Range("$b2")
Record2 = Range(€œ$b3")
Do While Record1 < ""
If Record1 = Record2 Then
Range("$C2:$ae3").Select
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
"=AND($A1=""ign"",$A2=""leg"",$B2=$B3,C2<AE3) "
With Selection.FormatConditions(1).Font
.Bold = True
.Italic = True
End With
Selection.FormatConditions(1).Interior.ColorIndex = 40
End If
Loop

This routine identifies the records and selects the rows. But, it does not
highlight the difference cells nor does it move to the next rows of data.

Can you tell me what I am doing wrong?

phmckeever

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
sorting a range with conditional formatting renie Excel Worksheet Functions 2 June 2nd 06 10:43 PM
conditional formatting glitches Kat Excel Discussion (Misc queries) 2 May 26th 06 08:16 PM
Keeping conditional formatting when sorting Andrea A Excel Discussion (Misc queries) 0 April 4th 06 03:00 PM
conditional formatting Rich Excel Discussion (Misc queries) 2 April 1st 06 10:27 AM
cannot use ISEVEN or ISODD functions in Conditional Formatting Scott Paine Excel Worksheet Functions 6 December 6th 05 09:44 PM


All times are GMT +1. The time now is 08:03 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"