+ Reply to Thread
Results 1 to 5 of 5

Macro to fill cell based on another cell background color

  1. #1
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Czech Republic
    MS-Off Ver
    MS 365
    Posts
    260

    Macro to fill cell based on another cell background color

    Hi all,

    I have one quick question or asking for a help actually.

    I;m in the end of my macro and what I need is to fill cell based on backgroud color of other cell.

    Example: In Sheet "Report" I have in cell "C9" cell with color index 3. What I need is to write in Sheet "Detailed Summary" to Cell "E4" number 1.
    or if color index is 50, than write 3?


    Is there anybody who could help? I would be able to modify macro but not sure, how to start to write it

    Thanks
    Andy

  2. #2
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Re: Macro to fill cell based on another cell background color

    What i dont understand is the logic dobracik.

    You want to display in cell E4 of sheet Detailed Summary number 1?? And if the color index is 50 write 3??

    Could you let us know what are the conditions?
    1 Or 0, that is the question.

  3. #3
    Forum Contributor amartinez988's Avatar
    Join Date
    05-04-2015
    Location
    Miami
    MS-Off Ver
    Office 2010
    Posts
    183

    Re: Macro to fill cell based on another cell background color

    As per you logic this code should work. Give a try and let me know.

    Please Login or Register  to view this content.
    Thanks,

  4. #4
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Czech Republic
    MS-Off Ver
    MS 365
    Posts
    260

    Re: Macro to fill cell based on another cell background color

    Hi,

    I've modify that macro as per my needs and add one more argument to Else IF, however it doesn't work.

    Example:

    Please Login or Register  to view this content.
    Last Elseif doesn't work. I'm not receiving any error, however I know, that in Cell "J9" I have color background "6". What works is only when I change code as below:

    Please Login or Register  to view this content.
    But as I have to replicate it 15 times, macro will be tool long. Do you know, where is an issue with ma macro?

    thanks,
    Andy

  5. #5
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Czech Republic
    MS-Off Ver
    MS 365
    Posts
    260

    Re: Macro to fill cell based on another cell background color

    Hi all,

    So I found out, that "OR" functions is doing my mess. Is there a way to fix it?
    There should be only one condition met in ma macro, so I can't use function "AND".

    Thank you

+ 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: 4
    Last Post: 04-06-2015, 12:51 PM
  2. Replies: 4
    Last Post: 04-06-2015, 12:51 PM
  3. [Solved]
    By XionicFire in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-02-2015, 01:17 AM
  4. 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
  5. Macro Based on Cell Background Color
    By Kinchen in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-06-2011, 02:11 PM
  6. Fill Color / Background change based on cell input
    By ganderson in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-10-2009, 10:50 AM
  7. Macro to Change Cell Background Color From White to No Fill
    By emcdemc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-06-2009, 08:55 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