+ Reply to Thread
Results 1 to 6 of 6

Changing format of cells that contain multiple matches of text taken from Vlookup

  1. #1
    Registered User
    Join Date
    07-18-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    30

    Changing format of cells that contain multiple matches of text taken from Vlookup

    Hi there,


    What I am looking to have is for me to select a range THEN be able to run a macro that does the following:

    1. Find cells that have a text match for all of the first three columns of information listed in a single row of the Vlookup table. In the example attached, cell Form!A9 contains text matching the contents of A2, B2 & C2 (ie. has to be on the same row) in the Vlookup table ("CANT" & "16Jun10" & "1-5.25")

    2. On discovering a cell that matches the description in step 1, format the contents of this cell a colour.

    3. The colour decribed in Step 2 is determined according to the designation of the 4th column of data in the VlookUp table which has possible values [F,S,M]. F should result in RED green coloured text, S should result in GREEN coloured text and M should result in BLUE coloured text. Rating "F" would apply to the contents in Form!A9 as it is in Vlookup table row 2(this is the row in which text in A2, B2, C2 were all to be found in FORM!A9).

    Other points: a) Vlookup sheet data is does not have a single unique identifier on which to order it with; and b) The cells of interest in 'Form' worksheet often contain combinations of numbers and letters.

    If anyone can work that one out, I would be very grateful.

    Thanks

    Trent
    Attached Files Attached Files
    Last edited by fallwire; 07-19-2010 at 10:18 AM. Reason: Title change

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Changing format of cells that contain multiple matches of text taken from Vlookup

    Give this a try:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-18-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Changing format of cells that contain multiple matches of text taken from Vlookup

    Thank you very much for the reply Jerry. Maybe my instruction regarding the three-way match was not clear and not sure if what you have created includes that type of a match rule...? I am only wanting that Colour Code designation to be actioned upon after the cell in FORM! has been found to contain text matches for all three pieces of information contained in columns A,B,C (in the same row) on the Vlookup table. Does your coding already incorporate that? Thanks, Trent.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Changing format of cells that contain multiple matches of text taken from Vlookup

    Quote Originally Posted by fallwire View Post
    Does your coding already incorporate that?

    General rule of thumb is to try the solutions offered on a copy of your data and then respond on the forum as to your results.

    Yes, it matches all 3 values before applying a color.

  5. #5
    Registered User
    Join Date
    07-18-2010
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Changing format of cells that contain multiple matches of text taken from Vlookup

    It worked. Cannot thank you enough. Solved my entire problem with your single reply. Fantastically ordered and easy to edit code.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Changing format of cells that contain multiple matches of text taken from Vlookup

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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