+ Reply to Thread
Results 1 to 8 of 8

Cell Colour Help

  1. #1
    Registered User
    Join Date
    06-07-2016
    Location
    Glenrothes
    MS-Off Ver
    2010
    Posts
    7

    Question Cell Colour Help

    Hi there, this is my first post so hopefully I give enough detail.

    I have a sheet with cells that change colour whether they are online or offline. (green online, red offline). what I am trying to do is when these cells are changed to either offline or online (colours also) then I want another cell representing that cell to change to the same colour also. I have tried but keep failing with the macros.

    So basically when a cell turns red or green the other cell on the other sheet changes to match it automatically. If anyone can help I would really appreciate it as I have been stuck on this for weeks now and cant seem to find anything online that works.

    If I haven't put enough info I can add more if required. Also I am using Excel 2010 if that helps also. Or if it would be easier I can upload a template of what I am trying to do as I cannot upload the real file

    Thanks in advance

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Cell Colour Help

    Need more specific details:
    1. What is the sheet name and range of cells that change colors?
    2. How do they change colors ? If using Conditional formatting, what is the formula or rule? If from another macro, can you post the code?
    3. What is the "other" sheet name and range of cells do you want to change?
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    06-07-2016
    Location
    Glenrothes
    MS-Off Ver
    2010
    Posts
    7

    Re: Cell Colour Help

    Hi there I have attached an example of what I am trying to achieve. Its not so much the sheet name or cells as I can change them its the coding itself I am getting no where with.

    On the file attached on the front sheet when a pump goes down someone changes it to offline. What I am trying to do is when they change it to offline and it goes red I want it to mirror on another sheet so it updates the other sheet automatically to match so at no point will one sheet say something different from the other so no confusion is caused. When I am finished work I can create a copy and go into more detail and supply more info as well. Apologies if this is making no sense but ill try when I am not working. Thanks for the quick response though.
    Attached Files Attached Files

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Cell Colour Help

    Hello jodyjohnstone,

    Add this macro to "Fronsheet". See the instructions below.

    Please Login or Register  to view this content.
    How to Paste a Macro into a Worksheet
    1. Copy the macro with Ctrl+C.
    2. Right Click the Sheet Tab at the bottom of the worksheet.
    3. Click View Code
    4. Paste the macro into the module with Ctrl+V.
    5. Save the macro using Ctrl+S
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  5. #5
    Registered User
    Join Date
    06-07-2016
    Location
    Glenrothes
    MS-Off Ver
    2010
    Posts
    7

    Re: Cell Colour Help

    Thank you. Works perfect. Very much appreciated

  6. #6
    Registered User
    Join Date
    06-07-2016
    Location
    Glenrothes
    MS-Off Ver
    2010
    Posts
    7

    Re: Cell Colour Help

    Sorry to be a pain. If I was only using the colours and green represented being online instead of having the word online in the cell and just the colour would this be possible ?

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Cell Colour Help

    Hello jodyjohnstone,,

    That is an easy change. You only need to remove one line from the code. Here is the new version.
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-07-2016
    Location
    Glenrothes
    MS-Off Ver
    2010
    Posts
    7

    Re: Cell Colour Help

    Thanks for the quick replies. I have this working now and just have one more little snag though.
    If I had say 2 cells which where either green or red can you specify or point to a specific cell to look at ? Instead of the online / offline bit in the code like if cell A1 was red then copy that colour to a specific cell? If A1 was green then copy that cells colour to the other sheet to a specific cell on the other sheet.

    Just in case I have to add more if that makes sense. Thank you very much for helping as I am stuck at this last hurdle.

+ 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: 6
    Last Post: 04-11-2016, 09:48 AM
  2. [SOLVED] Search cells based on student name, cell background colour and return a tally for colour
    By drof_06 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-26-2016, 04:31 AM
  3. Replies: 2
    Last Post: 02-13-2015, 03:06 PM
  4. Replies: 1
    Last Post: 09-12-2013, 02:09 PM
  5. Replies: 2
    Last Post: 06-07-2011, 07:00 AM
  6. Colour change column chart based on cell colour
    By Alice21 in forum Excel General
    Replies: 11
    Last Post: 04-05-2011, 10:10 AM
  7. Replies: 3
    Last Post: 07-15-2009, 06:13 AM

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