Mikee_likes_excel
New Member
Greetings,
I am looking for VBA code to change color of multiple shapes in sheet2 automatically based of the result of a pivot table. I have some code written but it fails to perform as required. My goal is to name every shape based on table in sheet1 and as you change the filter on the pivot table any body part that appears in the pivot table when filtered will turn red if it is not a result in the pivot table the body part stays green. I have named several body part shapes such as Head, Neck, Chest, Shoulderright, etc. I would like it ... so if we use the pivot table filter to sort for “Jan” all body parts filtered will turn red otherwise stay green. Same when selecting any month or all months. I hope you can help as I have spent hours searching for some code that would work. I may be approaching this wrong and if pivot table is a problem I am open to any other method such as range names and formulas if required. I have uploaded a sample file and have VBA code attached with a "Worksheet_SelectionChange" sub as well. Password is "safety"
Thank you for your kindness and expertise.
----------------------------------------------------------------------------
Mod edit: Question moved to VBA forum
I am looking for VBA code to change color of multiple shapes in sheet2 automatically based of the result of a pivot table. I have some code written but it fails to perform as required. My goal is to name every shape based on table in sheet1 and as you change the filter on the pivot table any body part that appears in the pivot table when filtered will turn red if it is not a result in the pivot table the body part stays green. I have named several body part shapes such as Head, Neck, Chest, Shoulderright, etc. I would like it ... so if we use the pivot table filter to sort for “Jan” all body parts filtered will turn red otherwise stay green. Same when selecting any month or all months. I hope you can help as I have spent hours searching for some code that would work. I may be approaching this wrong and if pivot table is a problem I am open to any other method such as range names and formulas if required. I have uploaded a sample file and have VBA code attached with a "Worksheet_SelectionChange" sub as well. Password is "safety"
Thank you for your kindness and expertise.
----------------------------------------------------------------------------
Mod edit: Question moved to VBA forum
Attachments
Last edited by a moderator: