+ Reply to Thread
Results 1 to 3 of 3

Compare two sheets columns and if true change row color

  1. #1
    Registered User
    Join Date
    01-28-2015
    Location
    Peoria, Illinois
    MS-Off Ver
    2013
    Posts
    23

    Compare two sheets columns and if true change row color

    Hi, and thanks for the assistance!

    I need to compare each cell in Book_1 wooksheet under ITEMNO column to each cell in Book_2 worksheet under IDENTNO column
    and if a cell is TRUE in Book_2, then select the compared row in Book_1 and change the row color to whatever, say yellow.

    The reason I am doing this is I have a build to do and I want to compare the parts needed versus a master parts list of what is available in the building, so I know what I have to order off-site.
    The above is my primary objective. However, I could go above and beyond and copy the location cell in Book_2 to column "G" in book_1 showing where the part is located.

    Any help is, of course, greatly appreciated!
    Thanks!!
    Troy
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Compare two sheets columns and if true change row color

    You can do this with conditional formatting. Highlight A2:E7 and use the following CF formula:

    =MATCH($B2,Book_2!$B:$B,0)>0

    Pick your fill color and you're good to go.

  3. #3
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Compare two sheets columns and if true change row color

    To return the location, put the formula below in F2 of sheet 1 and copy it down:

    =INDEX(Book_2!$E:$E,MATCH($B2,Book_2!$B:$B,0))

    EDIT: For a cleaner version, use this:

    =IFERROR(INDEX(Book_2!E:E,MATCH(B2,Book_2!B:B,0)),"")

+ 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. [SOLVED] Function to change the color of the font if the formula is true
    By Root River Hardwoods in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-16-2015, 12:03 AM
  2. [SOLVED] Excel 2003 Compare 2 columns and change color
    By Vagelisr in forum Excel General
    Replies: 6
    Last Post: 11-10-2014, 09:18 AM
  3. [SOLVED] Compare 3 concatenated columns with another and update if true
    By m4k3n5h1 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2014, 05:40 PM
  4. [SOLVED] if it is true then change the row color
    By pedjvak in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-14-2012, 04:26 AM
  5. Compare 3 columns, if true delete row
    By jsteinmetz in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-22-2010, 06:08 PM
  6. [SOLVED] how do i get a TRUE value in a formula to change the color of the.
    By blopreste3180 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-14-2005, 01:06 PM
  7. Want to change the color of a true/false logical statement with i.
    By gregspainting in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-19-2005, 03:06 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