+ Reply to Thread
Results 1 to 6 of 6

Click on a cell in sheet1 and find matching record on sheet2

  1. #1
    Registered User
    Join Date
    09-17-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Click on a cell in sheet1 and find matching record on sheet2

    I have been lost for day and I'm hoping that you can help.

    I have a workbook (attached). I want to click on a score in Column F (Sheet1) and have it do a match between Column B (Customer Name Sheet1) to Column C (Customer Name Sheet2). If it finds a match I want to highlight the row in yellow. If it doesn't find a match I want the message "no record" to pop up in a box. Once I choose another record I want the process to start all over and clear the highlighting from any old record previously highlighted in yellow.

    Thanks so much for any help you can provide.
    Attached Files Attached Files
    Last edited by vbacheck; 09-17-2013 at 12:13 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Click on a cell in sheet1 and find matching record on sheet2

    Hi

    I have a solution for you:-


    This code is sheet specific and looks for a double click in column F and then kicks off the main program.

    Please Login or Register  to view this content.
    This is your main code:-
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-17-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Click on a cell in sheet1 and find matching record on sheet2

    Hi - Thanks so much for your response!!!

    I'm getting a "sub or function not defined" error on the "double click" code

    Call Highlighter(Cells(Target.Row, 2).Value)

    Thx

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Click on a cell in sheet1 and find matching record on sheet2

    If there is no match, does it meant that as the code loops the msgbox appear for each unmatched row?
    I do not know how you want the msgbox to appear.

  5. #5
    Registered User
    Join Date
    09-17-2013
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Click on a cell in sheet1 and find matching record on sheet2

    Found out what I was doing wrong - dumb mistake - it work now.

    Amazing!!!!!

    Thanks

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Click on a cell in sheet1 and find matching record on sheet2

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 11-30-2012, 02:59 AM
  2. Record Data from sheet1 to sheet2 using name as the criteria
    By city in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-29-2012, 06:02 AM
  3. Find matching words of (sheet1)cell in (sheet2) cells.
    By ali84pk in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-28-2010, 01:06 PM
  4. find sheet1 D3 in sheet2 B, and select cell
    By magicaldean in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2009, 01:48 AM
  5. Launching macro needed - Click a cell on sheet1 and find/run program on sheet2
    By teacher5th in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2007, 03:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1