PC Review


Reply
Thread Tools Rate Thread

Automatic Charts in Excel

 
 
fredm54
Guest
Posts: n/a
 
      11th May 2004
Hello !!!

I have an external program that generates data files in CSV format
Column A contains my data and Column E contain time of day values i
24hr:min:sec format (22:12:30) The CSV gets updated every 10 second
and no 2 rows have the same time value. After the CSV is closed I nee
to do the following...

Open a worksheet (excel 2000) with a macro already loaded.
Run the macro which prompts the user to load a CSV file.
Search column E for the time value 22:00:00
If not found then select E1
Search column E for the time value 04:00:00
If not found select the last cell in column E
Create a range between these 2 cells in column E
Now offset -4 columns and create a similar range in column A
Now create a line chart (on a new sheet) with these 2 ranges wit
column E being the Category X Axis labels and column A being the dat
range.
Also the chart title needs to be the name of the CSV file that wa
loaded (without the .CSV extention)

Now for a bonus, can the worksheet be saved with just the chart sheet
I then need to email this to several recipients and all that data migh
tend to make the file quite large (not to mention it will probabl
confuse some!). I use Outlook 2000 and will send this to a persona
distribution list that I have in my address book.

If the chart can't be saved seperately then could we delete all th
other cells (except for the 2 ranges) and save the file with a modifie
name (append a character or something)?

I hope I included enough information and also that someone will se
this as any easy task!

thanks!

Fre

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
 
 
 
Tushar Mehta
Guest
Posts: n/a
 
      11th May 2004
Someone could prove me wrong, but you are more likely to get help if
you get going on the task yourself and ask for help when you get stuck.
If this is all new to you, consider hiring someone who will provide a
solution that both works and serves as a learning tool.

You can get XL to generate a lot of code through its macro recorder.
Turn it on (Tools | Macro > Record new macro...), do whatever it is you
want through the GUI, and turn off the recorder. With a few
exceptions, XL will give you starter code, which one can further
optimize / generalize.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions

In article <(E-Mail Removed)>, fredm54
<<(E-Mail Removed)>> says...
> Hello !!!
>
> I have an external program that generates data files in CSV format.
> Column A contains my data and Column E contain time of day values in
> 24hr:min:sec format (22:12:30) The CSV gets updated every 10 seconds
> and no 2 rows have the same time value. After the CSV is closed I need
> to do the following...
>
> Open a worksheet (excel 2000) with a macro already loaded.
> Run the macro which prompts the user to load a CSV file.
> Search column E for the time value 22:00:00
> If not found then select E1
> Search column E for the time value 04:00:00
> If not found select the last cell in column E
> Create a range between these 2 cells in column E
> Now offset -4 columns and create a similar range in column A
> Now create a line chart (on a new sheet) with these 2 ranges with
> column E being the Category X Axis labels and column A being the data
> range.
> Also the chart title needs to be the name of the CSV file that was
> loaded (without the .CSV extention)
>
> Now for a bonus, can the worksheet be saved with just the chart sheet?
> I then need to email this to several recipients and all that data might
> tend to make the file quite large (not to mention it will probably
> confuse some!). I use Outlook 2000 and will send this to a personal
> distribution list that I have in my address book.
>
> If the chart can't be saved seperately then could we delete all the
> other cells (except for the 2 ranges) and save the file with a modified
> name (append a character or something)?
>
> I hope I included enough information and also that someone will see
> this as any easy task!
>
> thanks!
>
> Fred
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>
>

 
Reply With Quote
 
Toby Erkson
Guest
Posts: n/a
 
      11th May 2004
I agree. That's exactly what I did just a few days ago in automating a
workbook that pulled in it's own data and then created various charts
(including positioning and overlapping). Helped me learn a little bit more
about Visual <cough> Basic (it ain't BASIC like what I grew up learning!).

This page was helpful to me in positioning:
http://peltiertech.com/Excel/ChartsH...oveAChart.html
More good chart stuff on his site here:
http://www.geocities.com/jonpeltier/...html#hdrFormat

Good luck!
--
Toby Erkson
Oregon, USA
Excel 2002 in Windows XP

"Tushar Mehta" <(E-Mail Removed)> wrote in message
news:MPG.1b0b0dad47a7d1f29897af@news-server...
....
> You can get XL to generate a lot of code through its macro recorder.
> Turn it on (Tools | Macro > Record new macro...), do whatever it is you
> want through the GUI, and turn off the recorder. With a few
> exceptions, XL will give you starter code, which one can further
> optimize / generalize...



 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      15th May 2004
Toby -

Thanks for the plug. The geocities site hasn't been updated in many
months, since I switched to a real hosting service, and all the links
point to the new site. The second link should point to this page:

http://peltiertech.com/Excel/Charts/index.html

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______

Toby Erkson wrote:

> I agree. That's exactly what I did just a few days ago in automating a
> workbook that pulled in it's own data and then created various charts
> (including positioning and overlapping). Helped me learn a little bit more
> about Visual <cough> Basic (it ain't BASIC like what I grew up learning!).
>
> This page was helpful to me in positioning:
> http://peltiertech.com/Excel/ChartsH...oveAChart.html
> More good chart stuff on his site here:
> http://www.geocities.com/jonpeltier/...html#hdrFormat
>
> Good luck!


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic update of data in excel charts shantz Microsoft Excel Misc 5 4th Jun 2010 01:46 PM
Convert linked Excel charts to embedded Excel charts in PPT 2007 Mohan Kumar Karunakaran Microsoft Powerpoint 2 26th Sep 2008 02:30 PM
link excel charts to web pages and update charts automatically Signguy Microsoft Excel Charting 1 22nd Apr 2008 08:29 PM
Automatic Update of Charts =?Utf-8?B?Q2h1Y2s=?= Microsoft Excel Charting 2 13th Oct 2004 07:21 PM
Automatic update of excel charts Gianluca Microsoft VB .NET 1 12th Sep 2003 11:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:59 PM.