+ Reply to Thread
Results 1 to 4 of 4

Match cell colors and text between sheets

  1. #1
    Registered User
    Join Date
    01-09-2018
    Location
    San Diego
    MS-Off Ver
    2010
    Posts
    2

    Match cell colors and text between sheets

    Hello!

    Version: Excel 2010

    Context: I have a workbook for my job as a staffing manager. At my company, each department is allotted a certain number of employees, with each employee filling a specific job number (e.g. Marketing Dept is allotted 50 employees, John Doe is assigned to Job #12 in Marketing Dept). The workbook has one sheet dedicated to each department whose staffing I control. Each sheet has two columns dedicated to the "current manning status" of the department: one column that lists the Job # from 1-50, and the adjacent column is either formatted with green or red fill (and sometimes text/value for amplifying information, like a date, if necessary): green if the job is filled by an employee and red if not. The last sheet consolidates the info from all departments, meaning the two columns from each sheet are copied to the last sheet.

    Request: I would like to add a macro that matches the fill color and text of a cell within a "department" sheet with the associated cell in the "consolidated" sheet. If there is no text/value within the copied cell, leave the matching cell blank as well.

    Any pointers?

    -scurvyderp

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Match cell colors and text between sheets

    Instead of assigning colors manually, why not use conditional formatting? If the cell is blank format it as red. If it is not blank format it as green. Then copy over the cells to the summary sheet and apply the same conditional formatting there.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    01-09-2018
    Location
    San Diego
    MS-Off Ver
    2010
    Posts
    2

    Re: Match cell colors and text between sheets

    Sorry, I should have clarified. A red cell won't always be blank, and a green cell won't always be not blank, which is why I can't use conditional formatting in this case. Text/values are used only as amplifying information, not as any source or root to determine a cell's color.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Match cell colors and text between sheets

    My apologies for the delay in the response. I've been away for a number of days. I think this will go better with a sample workbook. It will help me fit the code to your needs better.

    Attach a sample workbook. 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.

+ 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: 16
    Last Post: 12-12-2014, 06:19 AM
  2. Replies: 1
    Last Post: 02-19-2014, 10:04 PM
  3. Change bar chart fill colors to match the color of a random cell
    By gwbe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-03-2014, 08:12 PM
  4. [SOLVED] Two Excel sheets trying to match text data and return the match from the second column!
    By bankcott in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-02-2013, 02:17 PM
  5. Can I change the color of labels in a 3D pie chart to match cell colors?
    By Macphersonian in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-01-2013, 12:07 PM
  6. [SOLVED] Nested loop to match cell text for two columns in different sheets
    By lottidotti in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2012, 10:48 AM
  7. Replies: 2
    Last Post: 01-27-2012, 09:40 PM

Tags for this Thread

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