VBA Chart - X Axis To Appear As Dates?
Jun 5, 2012
I have a simple piece of code that creates a chart using the the values in column A as the x-axis and the values in column E as the y-axis. The values in Column A are all dates in this format: mm.dd.yyyy. However, when I collect the x-values they always appear as numbers (1,2,3). Even if I format the axis to Dates, they appear as 1.00.1900, 1.02.1901, etc.
Here is the code (also, I would like a VBA solution but if this is with excel's chart tools, so be it).
Code:
Sub Macro2()
ActiveSheet.Shapes.addChart.Select
ActiveChart.ChartType = xlXYScatter
ActiveChart.SeriesCollection.NewSeries
ActiveChart.SeriesCollection(1).Name = "=""Rate of Productivity"""
ActiveChart.SeriesCollection(1).XValues = "='Sheet1'!$A$2:$A$4"
ActiveChart.SeriesCollection(1).Values = "='Sheet1'!$E$2:$E$4"
End Sub
View 4 Replies
ADVERTISEMENT
Oct 31, 2012
I am trying to create a chart with dates from the past 6 weeks (one week at a time). The horizontal axis shows the dates from my data page correctly until I make one of the other data fields a secondary axis and then my dates change from the actual dates on the data page to 1-Jan-00, 2-Jan-00, through 6-Jan-00.
When I do the select data and look at the dats in the Horizontal Axis labels box, it shows the real dates. Why won't they show up on the chart as actual dates?
View 2 Replies
View Related
Feb 15, 2008
Using Excel 2007. Would like to format X-Axis values to display 1st month and 13th month as Feb 2, '08 for example. I would like the other 11 tick marks to remain. Sample attached ( Saved in 2003 format, I .xlsx was invalid file type)
4th micro chart uses F1:F13 for values for x axis
View 6 Replies
View Related
May 12, 2013
I want to draw a chart in Excel, in X axis Dates and in Y axis some other data. The dates which fall Saturday and Sunday will show in RED colour. Other dates will show in default colour.
View 7 Replies
View Related
Jun 2, 2014
I got a problem with displaying my dates correctly on the X-axis of my combined column - line graph. For some reason X-axis labels appear as consecutive numbers with regards to number of data points. Please see attached.
Also, why does the indent change as seen in this screenshot?
Last but not least, how can I prevent my secondary axis label from coinciding with the labels as seen here?
May_Daily_and_Total_Revs_by_date.xlsx
View 4 Replies
View Related
Aug 24, 2012
I am working with the Ganntt chart and horizontal bar charts but can't seem to figure out a way to force the X-Axis to behave properly.
In Excel 2007, I am trying to get the X-Axis to show major units of Months. However, in my chart options I can only change the Y-Axis to be Date/Monthly.
Changing my data layout (from the below) to be a vertical format produces the same problem, just in the other direction.
My data looks as follows:
System
Blocker
Production
Migrataion
Retired
Sys1
1/1/2012
780
Sys2
1/1/2012
400
60
90
Sys3
2/1/2013
30
5
1
The Blocker column is formatted as "No Fill" in order to cover a portion of the time-scale.
My X-Axis displays as random dates throughout the period and all of my data displays properly in terms of the scale on the grid.
What is NOT working is that the dates shown on the X-Axis really need to be based on a Monthly scale instead of the randomly selected dates Excel is using.
20120823.xlsx
I can't seem to find the right combination of options to make that happen or force a scale on the X-Axis.
View 1 Replies
View Related
Mar 1, 2014
I have a spreadsheet with golfers handicaps, golfers names down the left in column A in rows 3-35. Row 2 has the event numbers titles 1 to 18 (18 events in a year). i need a graph that has the person as the vert axis and the horizontal axis needs to be the event numbers, so i can read down for the person and across to see how there handicaps change from each different event. i have attached the data below.
View 1 Replies
View Related
Apr 20, 2007
I have some numeric data that has to be put on a log chart. but there is no option for log charts. so i converted my data to log and then drew a chart but i am unable to edit the axis intervals and starting axis value. whenever i change the value it gets back to its default value,ie 1. can anyone tell me how to draw log chart or how to edit axis intervals and starting axis value?
View 6 Replies
View Related
Sep 27, 2006
how to incorporate another category and value axis to my existing chart.
1. I need to add a rank axis derived from my data column (C6-C15). This column should rank from highest to lowest and create a tie if any number is repeated. I have arranged the rank column in cells B38:L38 as they would appear. I would like this to appear on the top or bottom of the bar graphs.
2. Second I need to add the frequency of hits which = 3 derived from cell J1 This should appear on the chart were it is currently titled. This should create another bar graph colored green and labeled 3.
3. Lastly the numbers axis can remain the same as it appears on the chart or if it would be better to align as shown in cells B43:L43.
View 5 Replies
View Related
Jan 26, 2008
What is the best way to have both horizontal and vertical axis as value axis?
View 2 Replies
View Related
Apr 18, 2013
How can I add missing values to the axis in a pivot chart line chart? I have a numerical X-axis with values such as 0,1,5,8,14, etc. I have another set of Y values that correspond to the X values. If this was an XY-scatter plot I'd be able to plot X vs. Y and connect the dots for "gaps" in the X values. Since it's a pivot chart I cannot use an XY-scatter plot, I can only use a line chart. The line chart doesn't give me the ability to add the "missing" values, so it gives the impression that my data is more closely packed than it is. The data source is external to my spreadsheet, so I cannot add the values before creating the pivot table/chart.
View 1 Replies
View Related
Aug 1, 2007
I got a set of data which is only 2 colums collecting data problems. The output i get is a time stamp and a fault. Im looking to set a chart up with the time been on the X - axis and number of problems per hour on the Y - axis.
View 7 Replies
View Related
May 17, 2007
I have some simple data and i want to create a horisizontal bar chart with 2 axis (X axis) the top one showing number of stocks number up to 270 and the bottom with Market Cap up to 1,200. (See attached). I set up the chart and it looks fine but it has only one axis so in order to create a second axis i right click on the blue series (no of Stocks) and go through the motions of setting up a secondary axis. However when i do that it ends up looking like the chart to the right with the Bars Cojoined (which is not what i want) I cannot seem to achieve 2 axis with separated bars
View 3 Replies
View Related
Apr 7, 2014
a_Y-Axis auto scale.zip
How to autoscale chart using VBA, so i can maximize the viewable area without using the default format axis on chart each time i paste new data to the table,
View 5 Replies
View Related
Aug 13, 2002
I would like to make a graph with an x, y and z axis. All of the choices that excel gives me are only x,y graphs. How can I plot a 3-axis graph?
View 9 Replies
View Related
Jan 4, 2008
i want 0 values to start at x and y axis.
basically i want time in secs on x axis starting a 0 upto 4.4 secs
View 9 Replies
View Related
Apr 16, 2008
I have a dataset that looks like this ....
View 9 Replies
View Related
Jun 30, 2006
I am trying to create a column chart/graph with "Days Past Due" on the x-axis and "Quantity" on the y-axis. In other words, data from one column needs to make up the x-axis and data from another the y-axis where the bars will rise to meet that quantity. I was wondering if this is possible. I have not been able to find a way to make it work so far. I know there is a way to do it for a line graph through XY scatter, but I need a column chart.
View 6 Replies
View Related
Oct 4, 2006
Probably is in the wrong forum, let me ask a question to justify it being here. How can I force the y-axis min & max to be a particular number. If that isn't possible, how can I add a straight line to indicate the min & max?
View 2 Replies
View Related
Jul 31, 2007
How can I turn this into a dual axis chart whereby it shows the number of current stores open (like it does right now) as a bar chart. But also as a line chart shows the store potential (%) - so for example, PSUN has 960 current stores and has a 96% store penetration rate.
View 9 Replies
View Related
May 6, 2014
Please see the attached workbook.
I would like to create a bar chart which is linked to a drop down box (from data validation) that allows me to choose of the 3 sets of data to show in the x axis.
So if i choose "HALF YEAR", the bar chart will have two bars (one is "jan-jul" the other is "jul-dec") with the green section data if i choose "QUARTER YEAR", the bar chart will have four bars ("jan-mar", "apr-jun", "jul-sep", "oct-dec") with the blue section data if i choose "INDIVIDUAL MONTHS" i have twelve bars....with the red section data.
View 2 Replies
View Related
Feb 26, 2014
I have excel file and need to create a chart with X axis to be scalable, by selecting (from drop down menu) - start and end dates.
View 3 Replies
View Related
Aug 5, 2014
the y-axis break between 0 and 0.8.
View 3 Replies
View Related
Feb 20, 2009
I'm using Excel 2007 and I want to plot data vs dates. Furthermore I want the dates on the dates axis to increment by month not by a certain number of days. So something like this:
1-Jan-09
1-Feb-09
1-Mar-09
...
There's the Major/Minor Units on the Axis Options screen but I cannot type in a constant number since the number of days for each month is different.
View 12 Replies
View Related
Aug 2, 2013
I created a bubble chart whose x-axis and y-axis show every 10th value between 0 and 100 (i.e. 0, 10, 20, 30...). The axes intersect at (50, 50) to create 4 quadrants.
I want to erase/hide the values on the axes (i.e. the axes will no longer show 0, 10, 20, 30... and at the same time, the bubbles will still be in the same place) to create 4 blank quadrants and make my bubble chart easier to look at.
View 4 Replies
View Related
Jun 1, 2009
The attached file has a scatter chart in which all of the data is properly displayed except the X axis. How can I get my X axis to reflect the data I have selected?
View 2 Replies
View Related
Nov 18, 2011
So I added a x-y scatter series to a line chart (in order to add a vertical line to the chart) and now I'm having a problem with the x-axis. It lets me select the start and end date, but when I put it on auto is starts 1 day before the data does. For example, if my data starts on 5/1/2011, the x-axis starts on 4/1/2011 and the there is no data point at that date.
I could manually change this, but the data is dynamic so the start date changes. Since I can do formulas in the format axis tab (date+1).
View 9 Replies
View Related
Jan 10, 2012
Using the table, draw a stacked chart that has both the project name (A, B etc) and Month on the x-axis (below all the projects). the stacked chart should contain the count for cat1, cat2, cat3 and cat 4 for each project (in different but consistent numbers for each month).
I need this for a presentation today,
OctoberNovemberDecemberProject Cat. 1 Cat. 2Cat. 3Cat. 4Cat. 1 Cat. 2Cat. 3Cat. 4Cat. 1 Cat. 2Cat. 3Cat. 4A
00236111110001B
C
D
E
F
0012230182600425G
H
I
02114001602210J
K
L
View 2 Replies
View Related
Aug 12, 2012
I am trying to create a horizontal bar chart with a product code data set. The number of codes will increase over time. For each product code there may it may not be a sales value and that sales value will increase over time. I am trying to plot the product codes on the y axis and sales value in the x axis.
View 3 Replies
View Related
Nov 21, 2012
How do I select all of the series on my chart and flip them over to the secondary axis? I can't seem to find an answer via google... Either VBA or straight Excel would be fine.
For the record, this is part of a larger question. I've been creating a chart using a couple for loops to work through a 2D array (VBA, clearly). At first I would just set each series to the second axis as it was created, but I've found that if I use collapseable groups to turn off different values...well, if I collapse the first series it all dissapears (still shows up in the legend, but the lines are gone.)
If I leave them on the primary axis I have no prolblem. So now I'm working on the theory that it's the way they are being added. So I'm looking for another way to put them on the other axis.
how do you put all series in a graph on the secondary axis all at once. Either an Excel based or VBA answer is fine (I can turn the Excel into a Macro if push comes to shove.)
View 1 Replies
View Related