+ Reply to Thread
Results 1 to 5 of 5

Copy Color Macro of a conditioned cell

  1. #1
    Registered User
    Join Date
    08-13-2015
    Location
    england
    MS-Off Ver
    Unsure
    Posts
    3

    Copy Color Macro of a conditioned cell

    I am using the following marco to copy colors in Column F in Column G

    Sub copycolors()
    Dim cell As Range, s As String
    s = "G"
    For Each cell In Range("F4:F30")
    Range("G" & cell.Row).Interior.Color = cell.Interior.Color
    Next cell
    End Sub


    The Problem is column F is a drop down menu, conditioned to be a certain color if text matches another.

    The above formula isn't picking up the color unless its filled manually, help would be greatly appreciated.

  2. #2
    Valued Forum Contributor ImranBhatti's Avatar
    Join Date
    03-27-2014
    Location
    Rawalpindi,Pakistan
    MS-Off Ver
    Office 365
    Posts
    1,784

    Re: Copy Color Macro of a conditioned cell

    Did you try the code into the worksheet_change event?
    Teach me Excel VBA

  3. #3
    Registered User
    Join Date
    08-13-2015
    Location
    england
    MS-Off Ver
    Unsure
    Posts
    3
    Quote Originally Posted by ImranBhatti View Post
    Did you try the code into the worksheet_change event?
    No, how do you do that? Sorry I'm a bit slow at all this!

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,572

    Re: Copy Color Macro of a conditioned cell

    Quote Originally Posted by uglow89 View Post
    The Problem is column F is a drop down menu, conditioned to be a certain color if text matches another.
    This portion gives me the idea that a formula could be used as a conditional formatting rule that would make use of the match. It would be a lot easier to help, whether by formula or VBA, if you could upload a sample of your file. To upload a sample workbook click on the GO ADVANCED button below the Quick Reply window and then scroll down to Manage Attachments to open the upload window.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,529

    Re: Copy Color Macro of a conditioned cell

    You can not get the color from conditional formatting.
    You will need to use the same logic used in conditional formatting to color in other cells.

+ 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. Conditioned printing macro issue
    By wixard in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2015, 11:38 AM
  2. Replies: 5
    Last Post: 08-29-2014, 08:41 PM
  3. 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
  4. [SOLVED] in need of macro to copy a row of data to another sheet based on text color of one cell
    By fredderf81 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2013, 01:11 PM
  5. [SOLVED] Macro To Find Cell Color and Copy to Sheet 2
    By trevor2524 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 06-17-2013, 06:50 PM
  6. [SOLVED] Macro: Use cell fill color to determine if to copy & paste to another cell on the same row
    By tsamuels in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-19-2013, 09:50 AM
  7. Display a multiple cells in one cell with a conditioned cell
    By brolsen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-10-2011, 11:30 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