Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Marking found records in Workbook A from Target List in Workbook B

From Target List in Workbook B column A, (Activity ID),
I need to yellow shade column A (Activity ID), in workbook A
for any matching Activity ID's.
..
Detail : Workbook B, has first to be cleaned up by deleting the first
5 rows and deleting
any remaining rows that have empty cells in column A, through the last
row.
..
Workbook A : fields definition (Maximum 2,000 records)
A B C
Activity ID Activity Description Other data
..
Target List in Workbook B : fields definition (Maximum 50 records)
A B
Activity ID Status
..
Help appreciated
..
J.P.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 140
Default Marking found records in Workbook A from Target List in WorkbookB

Hi JP

Run this code from Workbook B, this is important. It assumes you have
Book A open at the time you run it. Also does not clean up the file
just looks at the filled range in WorkbookB col A and finds matches
from this point.

Take care

Marcus

Sub CheckMatches()

Dim RngCell As Range
Dim IsMatch() As Variant
Dim res As Variant
Dim lw As Long
Dim lr As Long
Dim X As Range
Dim wb As Workbook
Dim ws As Worksheet

lr = Range("A" & Rows.Count).End(xlUp).Row
Set wb = Workbooks("Book1.xls")
Set ws = wb.Sheets("Sheet1")
IsMatch() = Range("A2:A" & lr).Value
lw = ws.Range("A" & Rows.Count).End(xlUp).Row

Set X = ws.Range("A2:A" & lw)
For Each RngCell In X
res = Application.Match(RngCell.Value, IsMatch, 0)
If IsError(res) Then
'No Match
Else ' Match
RngCell.Interior.Color = vbYellow
End If
Next RngCell

End Sub
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
Target Workbook Dialog Robert H Excel Programming 0 June 23rd 09 07:03 PM
Target workbook dialog Robert H Excel Programming 0 June 23rd 09 03:49 PM
Marking records with mismatched data johan Excel Programming 2 May 13th 07 07:08 AM
Copy marked records from Workbook to Workbook Robert Excel Programming 4 March 5th 07 05:20 AM
Marking all lines with same value when a second value is found Jdull Excel Discussion (Misc queries) 2 July 5th 05 08:14 PM


All times are GMT +1. The time now is 10:47 PM.

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"