Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
bxc2739
 
Posts: n/a
Default Need Quick Macro Help!


I have _two_sheets__*1* & *2*. I’m to *match* customer from sheet 2 to
1.

I want to match by *zip code and by name*. If zip AND name of row(x)
in sheet 2
Matches with zip AND name of _ANY_of the 5000+ row(s) in sheet 1 then
highlight row(x) in sheet2. (to indicate a match)
If no match are found, then do nothing, and move on to next row of
sheet2 until all rows of sheet2 are finished comparing to the sheet1.

Basically *I need to compare TWO fields simultaneiously*, (double
match)
_per_row_to_the_respective_TWO_fields_with_the_sec ond_sheet_I_am_comparing_too._
*If both criteria are meet then it is a match. * Otherwise it is left
alone/ignored. I want to do this for all 35000+ rows in my sheet2 which
will take a long time without the help of a macro. Both the sheet to be
worked on (sheet 2) and the sheet that exists only for comparison
(sheet1) are huge and have many entries.

If anyone can help with the code that would be great!


Thanks
Bo


--
bxc2739
------------------------------------------------------------------------
bxc2739's Profile: http://www.excelforum.com/member.php...o&userid=32538
View this thread: http://www.excelforum.com/showthread...hreadid=535657

  #2   Report Post  
Posted to microsoft.public.excel.misc
bxc2739
 
Posts: n/a
Default Need Quick Macro Help!


Additionally:

I have already succeeding in comparing ONLY the zip code.

Here is the code:

Option Explicit

Sub CheckExists()
Dim c As Range, cl As Range, rSearch As Range, rStart As Range

Set rSearch = Worksheets("Siebel").Range("s1",
Worksheets("Siebel").Range("s65536").End(xlUp))
Set rStart = Worksheets("Work").Range("B1",
Worksheets("Work").Range("b65536").End(xlUp))
With Application
.ScreenUpdating = False
.Calculation = xlManual

For Each cl In rStart
With rSearch
Set c = .Find(cl.Value, LookIn:=xlValues)
If Not c Is Nothing Then
cl.EntireRow.Interior.ColorIndex = 3
End With
Next cl

.Application.ScreenUpdating = True
.Calculation = xlCalculationAutomatic
End With
End Sub

royUk at ozgrid gave me this code and it works wonderfully

What I need to do now is the *second step*:
_How_do_I_compare_AT_THE_SAME_TIME_both_the_ZIP_CO DE_(numeric)_AND_the_CUSTOMER_NAME_(string/character/word)_of_sheet2_to_the_Zip_and_Name_of_sheet1.??_

Do I need a nested FOR LOOP or a seperate for Loop after the first
one??
How shall I go about coding this? I've tried a lot of things but it
never works..


--
bxc2739
------------------------------------------------------------------------
bxc2739's Profile: http://www.excelforum.com/member.php...o&userid=32538
View this thread: http://www.excelforum.com/showthread...hreadid=535657

  #3   Report Post  
Posted to microsoft.public.excel.misc
bxc2739
 
Posts: n/a
Default Need Quick Macro Help!


Here is a picture for clarity:

http://www.freewebs.com/bxc2739/help.bmp


+-------------------------------------------------------------------+
|Filename: help.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=4687 |
+-------------------------------------------------------------------+

--
bxc2739
------------------------------------------------------------------------
bxc2739's Profile: http://www.excelforum.com/member.php...o&userid=32538
View this thread: http://www.excelforum.com/showthread...hreadid=535657

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
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


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