+ Reply to Thread
Results 1 to 9 of 9

Copy data based on three colors

  1. #1
    Registered User
    Join Date
    09-26-2011
    Location
    DE
    MS-Off Ver
    Excel 2003
    Posts
    38

    Copy data based on three colors

    Hi,

    Please see attached.
    I have the following code to copy data from one sheet to another. However, I need to amend the code in order to take into consideration colored cells so I only copy the cells that are green-liked.


    Please advice how I progress from here.

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy data based on three colors

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy data based on three colors

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy data based on three colors

    Maybe :
    Please Login or Register  to view this content.
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  5. #5
    Registered User
    Join Date
    09-26-2011
    Location
    DE
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Copy data based on three colors

    Thanks, Karedog. We are almost there...

    1) When I copy the data I do not want to have the gradient color with me but only the values
    2) Also, given the number in B2 (2, 4 or 7) I only need to copy those green-colored cells in the datarange and I could potentially have >20 green-colored cells.
    3) My data is staring in row 13

    Please see attached.

    Appreciate your feedback.
    Attached Files Attached Files
    Last edited by Jabj; 01-06-2017 at 06:08 AM.

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy data based on three colors

    You are welcome. Change the last line to :
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-26-2011
    Location
    DE
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Copy data based on three colors

    Thanks, Karedog. We are almost there...

    2) Given the number in B12, E12, H12, K12 (2, 4, 7... etc) I only need to copy those green-colored cells in the datarange and I could potentially have >20 green-colored cells.
    3) My data is staring in row 13

    Please see attached.

    Appreciate your feedback.
    Attached Files Attached Files

  8. #8
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Copy data based on three colors

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    09-26-2011
    Location
    DE
    MS-Off Ver
    Excel 2003
    Posts
    38

    Re: Copy data based on three colors

    Hi Karedog,

    Thank you for the feedback.
    I am struggling a bit on how to make this more dynamic as I have several "ranges" I need to run this macro on... So in essence I will need to have the above macro to be called in various sub's but I need to pass the contents of the different search ranges (rngSrc) and target ranges (rngTgt).

+ 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. Changing cells and column chart colors based on cell colors
    By HDeuce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2016, 11:43 AM
  2. [SOLVED] Conditional formatting to change colors of Columns based on data entered in Column E
    By JJFletcher in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 02-13-2016, 01:27 PM
  3. Replies: 3
    Last Post: 10-21-2015, 03:51 PM
  4. ActiveWorkbook.Colors (Trying to store value based on data in cells
    By NewYears1978 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2015, 12:52 AM
  5. [SOLVED] Copy/Paste rows based on certain criteria (drop down or colors)
    By jholiday78 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-26-2014, 08:15 PM
  6. Set bar chart colors based on data?
    By JessT in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 05-14-2011, 09:52 PM
  7. Replies: 2
    Last Post: 08-01-2007, 07:00 PM

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