+ Reply to Thread
Results 1 to 7 of 7

Trying to update cell value based on highlight color of other cell.

  1. #1
    Registered User
    Join Date
    04-01-2015
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    10

    Trying to update cell value based on highlight color of other cell.

    Hi,

    I am new to excel macros. I want if cell in column C is highlighted green ( RGB 194,214,154) then value of corresponding cell in Column F to same as value of Cell in Column A. My macro is as follows:

    Sub CollorFill()
    IF Range.("C1:C3000").Interior.Color = RGB(194, 214,154) Then

    Range.("F1:F3000").Value = Range.("A1:A3000").Value

    End IF

    End Sub

    But it doesn't work. I tried step in and after reaching If statement , it jumps to End If.

    I am not sure what I am doing wrong.

    Please help

  2. #2
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Trying to update cell value based on highlight color of other cell.

    Please put your code in CODE tags. In the text editor, highlight your code, then press the # key in the toolbar.

    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor
    Join Date
    11-12-2014
    Location
    Nottingham
    MS-Off Ver
    2013
    Posts
    383

    Re: Trying to update cell value based on highlight color of other cell.

    Try:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-01-2015
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    10

    Re: Trying to update cell value based on highlight color of other cell.

    Hi Walruseggman,

    I tried but it is not working, it is skipping the step Range("F" & Cell.Row).Value = Range("A" & Cell.Row).Value.

    I am not sure if it matters or not but the column with green highlight has a conditional formatting. I am attaching my rough excel sheet.

    Any help is greatly appreciated.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-01-2015
    Location
    Canada
    MS-Off Ver
    2007
    Posts
    10

    Re: Trying to update cell value based on highlight color of other cell.

    Hi ARowbot,

    thanks for your help. I tried but still not working not sure what I am doing wrong. I have attached my excel. please see the reply below your post.

  6. #6
    Forum Expert
    Join Date
    08-28-2014
    Location
    Texas, USA
    MS-Off Ver
    2016
    Posts
    1,796

    Re: Trying to update cell value based on highlight color of other cell.

    Edit: Missed that you said it was conditional formatting.

    I guess conditional formatting doesn't set the .Interior.Color to anything. Will investigate how conditional formatting colors a cell. Then it should just be a matter of switching out .Interior.Color for whatever property it's using.
    Last edited by walruseggman; 04-01-2015 at 05:06 PM.

  7. #7
    Valued Forum Contributor
    Join Date
    11-22-2014
    Location
    Arizona, USA
    MS-Off Ver
    Office 365
    Posts
    973

    Re: Trying to update cell value based on highlight color of other cell.

    =COUNTIF(orders,C1)<>0 is conditionally formatting the Quotes - Conditional formatting is not considered fill, that aside just utilize that same formula for what you are trying to do and not the VBA to see colors

    Cheers
    -If you think you are done, Start over - ELeGault

+ 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: 8
    Last Post: 03-08-2015, 10:02 AM
  2. Replies: 6
    Last Post: 10-23-2014, 04:48 PM
  3. [SOLVED] Highlight row a certain color based on a character from a cell
    By ory182003 in forum Excel General
    Replies: 3
    Last Post: 05-11-2013, 06:15 PM
  4. Fill color columns based on Highlight Cell Rules
    By buntalan80 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2013, 09:34 AM
  5. [SOLVED] Update value in cell based on date and color row
    By abdulla1 in forum Excel General
    Replies: 0
    Last Post: 06-25-2012, 02:02 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