If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
Graphing an Array
Hi all,
I have stored a bunch of numbers in an array through VBA. I would like to turn this array into a graph. I have managed to save the array to a text file and import that file into Excel from where I can graph it. Unfortunately this is cumbersome - I would like to automate the process. Any ideas how........ Thanks Kenny |
#2
|
|||
|
|||
Graphing an Array
Kenny,
I suggest a different approach to what you are doing! If you need to store the numbers permanently, they need to be stored in a table. You can then use a query to return the specific numbers you need and easily graph the numbers in Access. If the numbers already exist in your database, you need to create a query that returns the specific numbers you need and then again easily graph the numbers in Access. -- PC Datasheet Your Resource For Help With Access, Excel And Word Applications www.pcdatasheet.com Kenny wrote in message ... Hi all, I have stored a bunch of numbers in an array through VBA. I would like to turn this array into a graph. I have managed to save the array to a text file and import that file into Excel from where I can graph it. Unfortunately this is cumbersome - I would like to automate the process. Any ideas how........ Thanks Kenny |
#3
|
|||
|
|||
Graphing an Array
Hi PC,
Thanks. You may be right, although I will have to go experiment a bit. To give you more background......... The numbers are already stored in a table. They are the number of hours worked each day by employees. The array is used to calculate a moving total of any number of days. So for example, I can have a moving total of how many hours a guy has worked over the last 7 days. So if a guy has worked 1 hour a day, after 7 days his total is 7 hours. The array then takes each day from day 1 in the database and looks back 7 days to see what his total is. Then it goes to day 2, and 3 and so on. If I get what you are saying............I might have to have an additional column that will carry that figure, instead of trying to calculate it from existing data? Ok thanks let me know your thoughts. Kenny |
#4
|
|||
|
|||
Graphing an Array
Kenny,
You don't need an extra field in your table for the running total. You can use a query and calculate it on the fly and then graph the numbers returned by the query. Steve PC Datasheet Kenny wrote in message ... Hi PC, Thanks. You may be right, although I will have to go experiment a bit. To give you more background......... The numbers are already stored in a table. They are the number of hours worked each day by employees. The array is used to calculate a moving total of any number of days. So for example, I can have a moving total of how many hours a guy has worked over the last 7 days. So if a guy has worked 1 hour a day, after 7 days his total is 7 hours. The array then takes each day from day 1 in the database and looks back 7 days to see what his total is. Then it goes to day 2, and 3 and so on. If I get what you are saying............I might have to have an additional column that will carry that figure, instead of trying to calculate it from existing data? Ok thanks let me know your thoughts. Kenny |
#5
|
|||
|
|||
Graphing an Array
Hi Steve,
I get what you are saying........I am just not sure I could generate such a complex query. It is not a running total as such........more of a moving total. The query would have to add 1 days' figures to the total and then subtract another days' figures(as it falls outside the period). On top of this the query would have to examine every date, not just dates for which there is data. Is it possible to write the array to a table and then query and graph the table? Ok. Thanks for the help. Kenny |
#6
|
|||
|
|||
Graphing an Array
Hi Steve,
I get what you are saying........I am just not sure I could generate such a complex query. It is not a running total as such........more of a moving total. The query would have to add 1 days' figures to the total and then subtract another days' figures(as it falls outside the period). On top of this the query would have to examine every date, not just dates for which there is data. Is it possible to write the array to a table and then query and graph the table? Ok. Thanks for the help. Kenny |
#7
|
|||
|
|||
Graphing an Array
Hi Steve,
I get what you are saying........I am just not sure I could generate such a complex query. It is not a running total as such........more of a moving total. The query would have to add 1 days' figures to the total and then subtract another days' figures(as it falls outside the period). On top of this the query would have to examine every date, not just dates for which there is data. Is it possible to write the array to a table and then query and graph the table? Ok. Thanks for the help. Kenny |
#8
|
|||
|
|||
Graphing an Array
Kenny,
Look at MS Knowledge Base Articles 208714 and 290136. Steve Kenny wrote in message ... Hi Steve, I get what you are saying........I am just not sure I could generate such a complex query. It is not a running total as such........more of a moving total. The query would have to add 1 days' figures to the total and then subtract another days' figures(as it falls outside the period). On top of this the query would have to examine every date, not just dates for which there is data. Is it possible to write the array to a table and then query and graph the table? Ok. Thanks for the help. Kenny |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Comparing ARRAY elements with RANGE data and created a 2nd array | JimP | Worksheet Functions | 2 | March 10th, 2004 07:29 PM |
Array reference from current row to bottom of column | JM | Worksheet Functions | 0 | February 26th, 2004 01:09 PM |
Question on Array Formula | John | Worksheet Functions | 1 | February 21st, 2004 05:40 PM |
Excel Array Formula | John Telly | Worksheet Functions | 3 | February 21st, 2004 01:16 PM |