General Question

Sinxposed's avatar

Is this possible to do in Visual Basic?

Asked by Sinxposed (11points) November 14th, 2009

Ok. I’m going to try to explain this the best that i can.

I have an excel 2007 spreadsheet, Column A is a list of Names, Column B is their X coordinate, Column C is their Y coordinate. (simple coordinates, from 1 to 125, whole numbers only)..

I do not like the scatter map in excel, i need something better.

My idea is to make a VB program, so i can load the excel file, and then have it use, say sheet2, to plot those points accordingly, and by plotting all i would want to do is change the cell color to red or something, so when i zoom out, i can see it easily. I would also like to have it automatically insert a comment, with the info from Column A into it.

I’m not sure the best way to go about this, if VB is even the best way. I really just need a program that will take excel info and put it into a scatter map that is better than what comes with excel.

Any ideas, is it possible, is that the hard way?

Observing members: 0 Composing members: 0

5 Answers

prasad's avatar

Well, there’s Excel VBA that you can try.

There are some tricky ways to change the appearances of scatter charts; or you may try other chart types. If you don’t like scatter chart, let me know what exactly you like it to be.

About making the cell colour change based on certain conditions can be done using conditional formatting in Excel. There are many new such conditional formats available in Excel 2007.

Let me know if you want something more or you can upload the file somewhere.

Edit: If you know what you want to do manually, just record the macro. It will generate the code for you. You may then go and tune in to your needs.

You may check these out for conditional formatting: one, two, three.

Shuttle128's avatar

You want to plot points by coloring cells in a worksheet? Seems like a huge step backwards from the great scatter plot function that already exists in Excel.

This seems like what you’re looking for.

Auto Custom Labels

Sinxposed's avatar

@Shuttle128 well that does look a little better than how i played with it, maybe i’ll try tweaking it to see if i can get it to work for me.. the main thing is when i have it show the gridlines, the points fall on the exact line itself, i want them to fall inside of squares.

@prasad here are a few images that i uploaded to my website so everyone can kinda get an idea of what i mean..

http://www.lucrativeillusions.com/images/exceldatamap.jpg

http://www.lucrativeillusions.com/images/exceltrialmap.jpg

If anyone is familiar with the game Evony i’m basically trying to map out the alliance’s that we’re at war with so we can get a greater visual of everything.

prasad's avatar

This can be done through VBA, scatter chart and colouring some cells and inserting comments into the coloured cells.
But, I still don’t understand what you’re looking for or what you want. There should be some condition based on which the colours of cells can be changed.

DrBill's avatar

It is a bit of work, but I wrote a spreadsheet program in basic, so all the VB functions are available to the data.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther