LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Comparing 2 sheets

Put it in a module sheet in VBA
1) Alt F11
2) Insert Module from VBA menu
3) Paste Code in VBA sheet
4) From worksheet you can execute by using menu Tools - Macro - Macro


"faureman via OfficeKB.com" wrote:

I'm sorry to trouble you again...

Where do I paste this script in order to be able to execute it?


Joel wrote:
Sub compare_sheets()

With Sheets("Source")
RowCount = 1
Do While .Range("A" & RowCount) < ""
Company = .Range("A" & RowCount)
With Sheets("Original")
Set c = .Columns("A").Find(what:=Company, _
LookIn:=xlValues, lookat:=xlWhole)
If Not c Is Nothing Then
c.EntireRow.Interior.ColorIndex = 4
End If
End With
RowCount = RowCount + 1
Loop
End With
End Sub

I have combined two files into one file. I used copy/paste to enter the
contents of file 2 into a new sheet on the original file. I now have a single

[quoted text clipped - 15 lines]

How can I do this?


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200805/1




 
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
comparing 2 sheets rodchar Excel Discussion (Misc queries) 2 May 20th 09 03:38 PM
Comparing Across Sheets RJB Excel Discussion (Misc queries) 1 March 6th 08 02:23 AM
comparing 2 sheets rodchar Excel Discussion (Misc queries) 3 September 11th 07 03:55 AM
comparing 2 sheets studentcog Excel Worksheet Functions 1 February 15th 06 04:46 PM
comparing sheets Lorenzo Excel Programming 2 August 12th 03 02:22 PM


All times are GMT +1. The time now is 04:09 PM.

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

About Us

"It's about Microsoft Excel"