Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Don
 
Posts: n/a
Default Thorny problem graphing XAxis dates


Sorry, I'm not really sure how to state this question succinctly. I
have data in an MSAccess Db re medications and the time\date and
amounts taken. Mads are entered only in the db on days when they are
taken yet I need the graph to show ALL days including days not taken.
That is, days when the amount is inferred to be zero because no data
appears for that day. Sorry, that's probably as clear as mud.

Currently, I'm using VBA code to select the data, build a spreadsheet
and then build a graph from the spreadsheet I built. The problem is
that it (obviously) graphs only the days meds are taken, not days in
between.

I did something like this many years ago using brute force coding but
it is a torturous coding process and doesn't seem very elegant. I
think I may have seen a way to do a SQL select statement that
accomplishes what I want but my thinker is getting old and sometimes
unreliable.

Does anyone have any ideas on this?

Thank you,

Don in Redmond
  #2   Report Post  
Jon Peltier
 
Posts: n/a
Default

Don -

You need to make sure your dates are recognized by Excel as numerical
values, not as text labels. Coming from Access, it's not unlikely that
they'd be imported as text. You can use Text To Columns to try to fix a
nonnumeric column of dates.

Then you need to make sure these dates are used as the category values.
It sounds like this is not an issue in your case.

Finally, you need to make sure that your chart has a time-scale category
axis. If the dates are recognized as numeric, Excel does this
automatically, which is why I started with my first paragraph. Fix the
dates, and the axis should take care of itself. (You'll have to
specifically change the axis of an existing chart that was first made
with text labels.)

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


Don wrote:
Sorry, I'm not really sure how to state this question succinctly. I
have data in an MSAccess Db re medications and the time\date and
amounts taken. Mads are entered only in the db on days when they are
taken yet I need the graph to show ALL days including days not taken.
That is, days when the amount is inferred to be zero because no data
appears for that day. Sorry, that's probably as clear as mud.

Currently, I'm using VBA code to select the data, build a spreadsheet
and then build a graph from the spreadsheet I built. The problem is
that it (obviously) graphs only the days meds are taken, not days in
between.

I did something like this many years ago using brute force coding but
it is a torturous coding process and doesn't seem very elegant. I
think I may have seen a way to do a SQL select statement that
accomplishes what I want but my thinker is getting old and sometimes
unreliable.

Does anyone have any ideas on this?

Thank you,

Don in Redmond

  #4   Report Post  
Don
 
Posts: n/a
Default

you need to make sure that your chart has a time-scale category
axis.


Thanks Jon, it's exactly what I need. My data was of the correct data
type, but I did not select 'Time Scale' for the XAxis.

Regards,

Don

On Wed, 21 Sep 2005 07:52:26 -0400, Jon Peltier
wrote:

Don -

You need to make sure your dates are recognized by Excel as numerical
values, not as text labels. Coming from Access, it's not unlikely that
they'd be imported as text. You can use Text To Columns to try to fix a
nonnumeric column of dates.

Then you need to make sure these dates are used as the category values.
It sounds like this is not an issue in your case.

Finally, you need to make sure that your chart has a time-scale category
axis. If the dates are recognized as numeric, Excel does this
automatically, which is why I started with my first paragraph. Fix the
dates, and the axis should take care of itself. (You'll have to
specifically change the axis of an existing chart that was first made
with text labels.)

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


Don wrote:
Sorry, I'm not really sure how to state this question succinctly. I
have data in an MSAccess Db re medications and the time\date and
amounts taken. Mads are entered only in the db on days when they are
taken yet I need the graph to show ALL days including days not taken.
That is, days when the amount is inferred to be zero because no data
appears for that day. Sorry, that's probably as clear as mud.

Currently, I'm using VBA code to select the data, build a spreadsheet
and then build a graph from the spreadsheet I built. The problem is
that it (obviously) graphs only the days meds are taken, not days in
between.

I did something like this many years ago using brute force coding but
it is a torturous coding process and doesn't seem very elegant. I
think I may have seen a way to do a SQL select statement that
accomplishes what I want but my thinker is getting old and sometimes
unreliable.

Does anyone have any ideas on this?

Thank you,

Don in Redmond

  #5   Report Post  
Don
 
Posts: n/a
Default


Thanks Tushar, you understand me perfectly correctly and your
suggestion is right on.

Thank you,

Don


On Wed, 21 Sep 2005 18:56:32 -0400, Tushar Mehta
<tm_200310@tushar_hyphen_mehta_dot_see_oh_em wrote:

If I understand you correctly, after you have created the chart, select
it, then select Chart | Chart Options... | Axes tab. In there make sure
the x-axis type is 'Timescale'.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem calculating Days/Hours etc between 2 dates Paul Sheppard Excel Discussion (Misc queries) 2 August 7th 05 10:32 AM
Conditional formatting with dates formula problem. [email protected] Excel Discussion (Misc queries) 8 March 5th 05 11:47 PM
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM
due dates Niki New Users to Excel 4 January 10th 05 04:11 PM
Problem with dates Emece Excel Worksheet Functions 7 December 22nd 04 06:47 PM


All times are GMT +1. The time now is 01:59 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"