+ Reply to Thread
Results 1 to 3 of 3

Using Macro to change cell color based on reference cell value in different sheet

  1. #1
    Registered User
    Join Date
    11-23-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    1

    Post Using Macro to change cell color based on reference cell value in different sheet

    Hi there,

    I have a problem with the Macro of my file that's quite urgent.
    Please help me with this if you do know how to solve it.

    I have two columns (say Column A & Column B) in sheet 1, and I need to display the value of Column B in my sheet to for reporting purpose. However, I need to color the cells (say value>1, red; value<1, green etc.) based on the repective value in Column A.
    E.g. I need to display cells in Columns B on sheet1: B1,B2.....etc. as Column A on sheet2. And I want to color the column A on sheet 2 based on the value of Column A on sheet 1:A1,A2....etc.

    Is there anyway to do it with Macro?


    Thanks a lot.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Using Macro to change cell color based on reference cell value in different sheet

    Why macro?
    Use conditional formatting with a rule based on formula
    select your column B go into conditional formatting-> new rule-> use fiormula ...
    and something like
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    and use formatting cell fill as green
    (note that cell address is relative one (no dollar signs).
    Best Regards,

    Kaper

  3. #3
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,616

    Re: Using Macro to change cell color based on reference cell value in different sheet

    Of course if for some reason macro is needed you can do it with macro, like:
    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. [SOLVED] EXCEL NEWB.....Change cell color based on text in a cell on another sheet
    By anon1988 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-27-2014, 12:16 AM
  2. Macro to change cell text color based on darkness of cell fill color
    By cincyshirm61 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 12:11 PM
  3. Replies: 3
    Last Post: 12-16-2012, 12:49 PM
  4. VBA / Macro help needed to change the barchart color based on Cell Color
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2012, 09:15 AM
  5. [SOLVED] Macro to change multiple sheet tabs color based on a cell value
    By greywu1f in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-19-2012, 10:31 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