Excel Graphs

Further to my previous post, Excel sheet linking, I am trying to generate pie charts for a myriad of questions.
LVL 7
andymacfAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
What is the question? Your previous question references yet another previous question.

If you want to make it easy for people to help you, please provide the information in this question, so we don't have to go through your question history to figure out what you need.

Please attach a file that shows the data structure you are using. This file may differ from the file you attached to your previous question.

cheers, teylyn
0
andymacfAuthor Commented:
Apologies for that, another expert has provided a solution to my first issue which was to extract data from a csv file and display it in a certain way as indicated on Sheet 'Output'.  The next task is to generate pie charts from this information.  Please see attached file.

Andy
Copy-of-Survey-Monkey-Trial-V3.xls
0
gowflowCommented:
Hi Teylyn
Hope this msg finds you well. Happens so that I am the other expert who worked on this issue if you feel you want to help further pls let me know so we are not running competition here.
Rgds/gowflow
0
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hi gowflow, no worries. You keep running with it. It's just a bit easier for other experts to help out if the context resides within the question.

cheers, teylyn
0
gowflowCommented:
absolutely agree with you. Always good to see you growing higher and higher in EE. Keep it up and good luck.
Best Regards
gowflow
0
gowflowCommented:
Hi andymacf
Is this what your looking for ?
Just activate macros and after making sure you proceeded with the creation of output with the first question then proceed to activate the graph creation.

Let me know your comments. We can fine-tune of course.
gowflow
Survey-Monkey-Trial-V3.xls
0
andymacfAuthor Commented:
Hi gowflow

This looks great, error occurred when I clicked the Graph button, see attached.  After I closed the VB window, it had created a new sheet called 'Graphs' but there was only a single chart.

Cheers Andy
Error-1.tiff
0
andymacfAuthor Commented:
The original fault for your perusal
Error2.tiff
0
gowflowCommented:
what excel version are you using ?
gowflow
0
andymacfAuthor Commented:
2010
0
gowflowCommented:
thought so. the file you posted was .xls so I presumed you had 2003 and developed accordingly.

No problem just comment out these 3 instructions.

'.PlotArea.Top = 80
 '.PlotArea.Height = 135
 '.PlotArea.Width = 135

Open in new window


Let me know
gowflow
0
andymacfAuthor Commented:
That works fine, whilst we have Office 2010, the office still insist on saving everything as xls, doc, etc.  So, I suppose saving the file as xlsx, I would not need to do anything?

Andy
0
andymacfAuthor Commented:
Oh, I meant to ask, is there a way of forcing the page breaks once you have the graphs?

Andy
0
gowflowCommented:
note
NO xlsx !!!! but xlsm !

page breaks for sure you want a page break at each start of a topic ? I was going to put that but I said maybe you need some other twiks

let me know
gowflow
0
andymacfAuthor Commented:
Hi gowflow

Would I be able to resize the graphs, if so what would I need to do?  I will need to decide how the page breaks will work as it would be too much to have one set on a page.

Would it also be possible to have a button to import the initial sheet assuming I always name it the same?

Thanks
Andy
0
gowflowCommented:

Would I be able to resize the graphs

I think this should be object of an other question as feel it need some coding to allow that and it was not part of the initial question.

What do oyu mean by


Would it also be possible to have a button to import the initial sheet

What initial sheet ?
gowflow
0
andymacfAuthor Commented:
In order to get the data, I have to take a filtered csv export from a website, this is my initial file that I copy the data from.
0
gowflowCommented:
for sure anything can be done no problem if you want you can have a button that is called Import CSV and it will open that csv and read the data into the sheet Import. then you would have the second button create output and then the third create graphs.

Let me know how I can help you further.
gowflow
0
gowflowCommented:
here is a version that will install a page break at each new topic. I know it is not ideal as it would cut in half some graphs when topic contain more than 3 graphs but that is a quick start and could work as previously advised on more specific page break as it need a question for it altogether.
gowflow

PS this version has been saved as .xlsm to work on Excel 20077 and up
Survey-Monkey-Trial-V3.xlsm
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
andymacfAuthor Commented:
Hi gowflow

Thanks for the latest post, this is fantastic and I believe we are almost there.

The single page per topic doesn't really work, I feel, with respect to the graphs, it would be a case of 'running on' e.g. continuous printing.  Because of the changing content of differing surveys, it might be more a case of adding page breaks manually as I assume this would be dificult to code.

Also, I do not necessarily want to resize them each time, it is more a case of establishing what is the 'best fit' for printing purposes and setting their size accordingly.  Maybe, if you could point to the areas within the code where I could fiddle with font/graph sizes/margins I could fiddle with them until I get 'best fit'.

Thanks
Andy
0
gowflowCommented:
no matter what you do with size font the graph height and width are fixed this is why I said it should be worked separately if you want.

At this time I do not have the answer as if I had I would hv incorporated it into the present solution.

gowflow

PAS if you want to remove the present pagebreak just comment out the instruction that has the pagebreak in it.
0
andymacfAuthor Commented:
This is a superb piece of work which aids greatly to streamline one of my processes thus making it easier for my colleagues to produce reports when necessary.  Thank you gowflow for sharing your talent to complete this task.  Your help is greatly appreciated.
0
andymacfAuthor Commented:
Hi gowflow

I have created another question as discussed for the graph resizing, New Question.

Hope you can help?
Andy
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.