Results 1 to 12 of 12
  1. #1
    3 Star Lounger
    Join Date
    Jul 2005
    Location
    Bahrain
    Posts
    373
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Copy and paste cell value based on fill color

    hi all,

    Is there a way to copy and paste cells values based on cell fill color.
    Say i have a range A1:Y300, the cells are either single or merged. The range has variety of fill color.
    I want to copy and populate the cell values for only cells filled with green color under a column that has heading cell filled with green color.

    Last edited by dubdub; 2015-06-11 at 06:30.
    TIA
    dubdub

  2. #2
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    dubdub,

    Are the colors applied using conditional formatting or not?

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    And which version of Excel?
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    ..and what do you mean by "copy and populate"?

  5. #5
    3 Star Lounger
    Join Date
    Apr 2007
    Location
    Lancashire, United Kingdom
    Posts
    264
    Thanks
    32
    Thanked 5 Times in 5 Posts
    You could add a filter, filter by colour and the populate all those that are visible.

    Alan

  6. #6
    3 Star Lounger
    Join Date
    Jul 2005
    Location
    Bahrain
    Posts
    373
    Thanks
    1
    Thanked 0 Times in 0 Posts
    First, my apology for late reply,

    Secondly, attached is the template I have with no values. The excel version is 2010. The values will be extracted from the cell and populated under its equivalent headings color, something similar to what is in column PB, PC & PD.
    Attached Files Attached Files
    TIA
    dubdub

  7. #7
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi dubdub

    In Excel, we can do anything, no matter how weird the request is.

    see attached file.
    I added some more test data.
    I added additional colour-columns i.e. PB, PC, PD, PE, PF, PG, PH
    I used a [temp] sheet.

    Click the button to get your required results.
    You should be able to adapt the code to meet your needs.
    Does this do what you want?

    zeddy
    Attached Files Attached Files

  8. The Following User Says Thank You to zeddy For This Useful Post:

    Maudibe (2015-06-20)

  9. #8
    3 Star Lounger
    Join Date
    Jul 2005
    Location
    Bahrain
    Posts
    373
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Perfectly done dear Zeddy,
    I will give it a try with the real things, and i need your patinet if somthing pop up.
    TIA
    dubdub

  10. #9
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    perfectly done sounds good to me.

    please let us know if it worked on your real data.
    Don't forget to copy the sheet named [temp] as well as the vba code

    zeddy

  11. #10
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    Nicely done Zeddy! Pea green doesn't suit me well. Can you change me to purple?

  12. #11
    WS Lounge VIP
    Join Date
    Mar 2002
    Location
    Newcazzle, UK
    Posts
    2,826
    Thanks
    136
    Thanked 482 Times in 459 Posts
    Hi Maud

    ..I changed both you and RG to red hot

    zeddy
    Attached Files Attached Files

  13. #12
    Gold Lounger Maudibe's Avatar
    Join Date
    Aug 2010
    Location
    Pa, USA
    Posts
    2,637
    Thanks
    115
    Thanked 650 Times in 592 Posts
    Beautious!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •