hey

i have a table of data see image below of names of companies and then a value either +ve or -ve
I want to plot only the positive values in a pie chart. I don't want to reorder the data (unless at the end of the macro it will reorder it back again without changing the chart).

Screen Shot 2013-05-24 at 02.55.34.jpg

i have tried and tried and tried for hours and hours and hours to get this right. i am new to VB but keen to learn.

i hit on the idea of using a loop through the cells, and using the UNION function it will add to the range if it finds a positive value. Unfortunately I have had problems:
1. the top value isn't necessarily positive.
2. i want it to skip the pie chart (and complete the rest of my macro which does other stuff) if there are no positive values

the below code is fairly concise (apart from right at the end when formatting the charts which was recorded) so please please can you help and not be deterred by the length!

i would be very grateful, youve no idea how many hours ive spent trying.

thank you

note mkt is defined previously as the upper left cell in the table

Please Login or Register  to view this content.