PC Review


Reply
Thread Tools Rate Thread

compare column color row

 
 
SangelNet
Guest
Posts: n/a
 
      23rd Jul 2010
Hi guys,

Hope i can get some input on this. the scenarios is this:

sheet 1 column b
sheet 2 column a

for each row in sheet 2 col B compare with each row sheet1 col A. IF
row equal, then change color for the equal row in sheet 2 col A.

Thnx
 
Reply With Quote
 
 
 
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      23rd Jul 2010
On Jul 23, 9:30*am, SangelNet <upslavazq...@gmail.com> wrote:
> Hi guys,
>
> Hope i can get some input on this. the scenarios is this:
>
> sheet 1 *column b
> sheet 2 column a
>
> for each row in sheet 2 col B compare with each row sheet1 col A. IF
> row equal, then change color for the equal row in sheet 2 col A.
>
> Thnx


"If desired, send your file to dguillett @gmail.com I will only look
if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results."
 
Reply With Quote
 
ManicMiner17
Guest
Posts: n/a
 
      23rd Jul 2010
On 23/07/2010 15:30, SangelNet wrote:
> Hi guys,
>
> Hope i can get some input on this. the scenarios is this:
>
> sheet 1 column b
> sheet 2 column a
>
> for each row in sheet 2 col B compare with each row sheet1 col A. IF
> row equal, then change color for the equal row in sheet 2 col A.
>
> Thnx


Hi SangelNet,


Sub CmPare()
Dim i As Long
Dim lastRow As Long
lastRow = Sheets("Sheet1").Cells(Rows.Count, "B").End(xlUp).Row

For i = 1 To lastRow
If Sheets("Sheet1").Range("B" & i) = Sheets("Sheet2").Range("A" & i) Then
Sheets("Sheet2").Range("A" & i).Interior.ColorIndex = 3
End If
Next i

End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
compare and color cells with similar values in a column using vba noname Microsoft Excel Programming 5 11th Jan 2011 12:05 PM
compare data in column A with column B to find duplicates George Microsoft Excel Misc 8 6th Feb 2009 03:53 PM
compare cells in column to criteria, then average next column cell Bradwin Microsoft Excel Worksheet Functions 2 21st Jul 2008 08:37 PM
compare data from one column with another and compare result to yet another Matt Williamson Microsoft Excel Programming 1 25th Sep 2003 08:54 PM
compare data from one column with another and compare result to yet another Matt Williamson Microsoft Excel Worksheet Functions 1 25th Sep 2003 08:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:34 PM.