+ Reply to Thread
Results 1 to 5 of 5

Change cell colours in a worksheet if values exist in another worksheet

  1. #1
    Registered User
    Join Date
    09-14-2020
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    Change cell colours in a worksheet if values exist in another worksheet

    Hi,

    I am working on a project where the first worksheet contains details of employees, column B has the office number they work in, i.e. 7132.

    The second worksheet is a basic floor plan of an office where different cells have the office numbers in them. The floor plan cover cells from A1 to CP150.

    I am trying to highlight (red) in the second worksheet all the cells where the value appears in column B of the first worksheet. I can do it with Conditional Formatting but it only works if all the data is in one worksheet.

    There's other criteria such as Column C containing when the office was unoccupied if it's within 30 days of the today then I am trying to highlight that in yellow, because of this I am figuring VBA is the way to go, but I am really struggling to think of some script for it.

    Any help would be greatly appreciated.

    Si.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Change cell colours in a worksheet if values exist in another worksheet

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Change cell colours in a worksheet if values exist in another worksheet

    a sample sheet would help
    CF can work across sheets

    I have a sample here using countif()

    BUT your spreadsheet would be useful - with examples of results expected
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Registered User
    Join Date
    09-14-2020
    Location
    London
    MS-Off Ver
    2016
    Posts
    2

    Re: Change cell colours in a worksheet if values exist in another worksheet

    Hi and Thank you,

    I hope this demonstrates what I am trying to explain. I had to create a simplified version as there is sensitive info in the original.

    Sheet one has the employee info with column B holding the Office number.

    Sheet two has a floor plan with the office numbers in it.

    If the office number exists in both then it is highlighted in Sheet 2, if it is unoccupied but the date is with 30 days it is highlighted yellow, if it is unoccupied it remains unfilled.

    Many thanks,
    Attached Files Attached Files

  5. #5
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Change cell colours in a worksheet if values exist in another worksheet

    Try running this on Sheet1:

    Please Login or Register  to view this content.

+ 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. How can I link cell colours from worksheet to worksheet/workbook?
    By Gord Dibben in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 12:05 PM
  2. How can I link cell colours from worksheet to worksheet/workbook?
    By Evelyn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. [SOLVED] How can I link cell colours from worksheet to worksheet/workbook?
    By Gord Dibben in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 07:05 AM
  4. How can I link cell colours from worksheet to worksheet/workbook?
    By Gord Dibben in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2005, 04:05 AM
  5. How can I link cell colours from worksheet to worksheet/workbook?
    By Evelyn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. [SOLVED] How can I link cell colours from worksheet to worksheet/workbook?
    By Evelyn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 01:05 AM
  7. How can I link cell colours from worksheet to worksheet/workbook?
    By Evelyn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. How can I link cell colours from worksheet to worksheet/workbook?
    By Evelyn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 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