See if it helps , but Scop of this macro is only only Worksheet.

 

Sub matchValue()

' Short CUt Key Shift + CTRL + M

Application.ScreenUpdating = False

 

Dim F_range As Range

Dim S_range As Range

On Error Resume Next

Set F_range = Application.InputBox("Please Select 1st Range", , , , , , , 8)

Set S_range = Application.InputBox("Please Select 2nd Range", , , , , , , 8)

Dim r As Integer

Dim c As Integer

r = F_range.Rows.Count

c = F_range.Columns.Count

Dim cc As Integer

Dim rc As Integer

For cc = 1 To c

For rc = 1 To r

'For Each cell In F_range.Cells

If F_range.Cells(rc, cc).Value = S_range.Cells(rc, cc).Value Then

'F_range.Cells(rc, cc).Interior.ColorIndex = 32

'S_range.Cells(rc, cc).Interior.ColorIndex = 32

Else

F_range.Cells(rc, cc).Font.Bold = True

F_range.Cells(rc, cc).Color = 2

F_range.Cells(rc, cc).Interior.ColorIndex = 31

S_range.Cells(rc, cc).Font.Bold = True

S_range.Cells(rc, cc).Interior.ColorIndex = 31

End If

'Next cell

Next rc

Next cc

Application.ScreenUpdating = True

Range("A1").Select

End Sub

 

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Rajendra prasad yadav
Sent: Tuesday, August 09, 2011 12:01 AM
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Help needed. compare two wxcel files

 

Hi friends,

 

I am not good at excel. I have a requirement now, Can some one please give
the macro to compare two worksheets in diferent workbooks and display the
differences.

 

Regards,

Rajendra

8147524172

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to