Excel 2013 Chart X-axis Date Labels - excel

Is there a way to increment date labels by the start of every month in an excel chart?
i.e. Axis values should start in DD/MM/YY:
1/1/16, 1/2/16, 1/3/16....

It depends on the type of chart you use. In line and column charts, you can set the X axis to a date axis and let the major unit be 1 Month.
XY Scatter chart work differently. Here you will need to hide the X axis labels and use a data series to place the markers and add data labels, then format the series to no line and no markers. In the screenshot the series is still visible.

Right click the dates on the x-axis and select "format axis".
Under "Axis Options" you can make the major unit 'fixed' at 1 month. It will then increment by the 1st of each month.
Setting a "minimum" date, will allow for setting the day which it starts (eg, if you wanted it to increment on the 3rd of each month, input 3-Jan-2016. I think the default is the first date in the data set.).
Make sure the category is set to "date" if excel doesn't recognise your date column. "format axis" -> "number" tab, or 'right click' -> 'format cells'.

Related

Scatter Chart in Excel

I have data in excel:
I want to have a scatter chart where I see the data as dots.
The issues is that, for example, for Product A, it will show me two dots, one at 3 and the other one at 5.
I would like to see it as one dot with coordinates (3,5) as my x-axis should be the "Price" (Column D in Chart Data sheet) and the y-axis the "Suitability" (Column E in Chart Data sheet).
If I do not select the product column in the chart data source, then I get the results (see sheet Chart 2) but then I do not have the information that which product a dot signifies.
Could you please provide a solution that shows the dots (with a label showing against each dot as to what product it signifies).
Generate the chart as in your second example
Select the data points in the chart and right-click on them
From the popup menu, select "Add Data Labels -> Add Data Labels"
Select the Data Labels and right-click on them
From the popup menu, select Format Data Labels
From the Label Options, uncheck "Y Value" and "Show Leader Lines" and check "Value From Cells"
Once you have check "Value From Cells", a dialog box appears, use it to select column A as the source of data labels
The final result:

add a vertical line on an excel chart

I have a line chart in excel with data already set; I need to add a vertical line that moves according to the X values (month dates). For example for this month the line will move on the X value of "Jul-20"
Below I have attached the screenshot of the chart and the chart data. I have never had my hands on excel chart up until now and this chart has not been made by myself. Any help would be appreciated.
UPDATE 1
Thanks to #Steven Pomponio
when I try to add the new series for the vertical line, I do not have the "Y" values; see screenshot
UPDATE 2
added a new data source with values as 01/072020 and /01/07/2020 in cells J182 and K182; now I see a black dot on the left between the £10.0m and £ 20.0m Y values. If I change the verttical line data source chart type to be "Scatter with straight lines" then I do not even see the point.
If I change teh entire chart to be of Scatter with straight lines then I do see the Series Y Values but the whole chart change design and I do not want to do this.
UPDATE 3
Thanks to #Steven Pomponio I did it
Choose two cells in which you will have your target x value where the vertical line will appear, for this example I'll be using cells (E1) and (E2). Within cell (E1) you'll want to type in the formula =TODAY()-DAY(TODAY())+1 in order to get the first date of the current month. Cell (E2) can just be =E1.
In two cells, preferably next to them you will need to enter in the minimum and maximum bounds of one of your axes (Since you are already using a dual axes). It is important that these numbers are the same as what you set for the axis min & max bounds as this allows for you the line to properly span across the entire chart. Don't leave them on Auto.
Next, right click on your chart and click Select Data -> Add -> and add in the two dates (cells (E1) and (E2)) into the Series X Values, and the min and max bounds into the Series Y Values.
The final step is to make sure that the Chart type for this newly added series is selected as Scatter with Straight Lines and plotted on whichever axis you set the bounds equal to.

Plot graph using the last 10 values in MS Excel

So I got Sheet1 with a table containing some data. To simplify let's say there's a column 'x' with some data and a column 'y' with some data. Every now and then more values are manually added to the table.
On Sheet2 I need Excel to automatically plot a graph only using the last 10 values in the table. So when more values are added the graph changes automatically to the new last 10 values. Is this possible?
Furthermore, let's say there's a third column 'z' that's always a constant value (for example to show some kind of a maximum for 'y' in the graph). How to make Excel automatically fill the cell with the number when the according 'x' and 'y' cells are filled? I know I could manually fill the 'z' column all the way down but I suspect that would screw up with plotting the last 10 values.
I'm using MS Excel 2013.
Thank you very much!
You'll need to create a chart using dynamic named ranges as the series data.
Start by setting up the data table with headings x, y and z.
Select x heading and click Insert > Table, make sure "My table has headers"
is checked then click OK
In column z, to set 20 as the autofilled value, add formula =20
Put your data in columns x and y
Create your chart based on columns x and y. This example creates a XY Plot.
Assuming you've only got one table in your workbook, it will be named "Table1".
Go to Formulas > Name Manager > New
xPlot: =OFFSET(Table1[[#Headers],[x]],COUNTA(Table1[z])-9,0,10,1)
Also create:
yPlot: =OFFSET(Table1[[#Headers],[y]],COUNTA(Table1[z])-9,0,10,1)
Right click on your chart and click Select Data...
Remove the Series that is there
Create a new Series
If your workbook was called Chart Example.xlsx, then set:
Series X values: 'Chart Example.xlsx'!xPlot
Series Y values: 'Chart Example.xlsx'!yPlot
Click OK and try adding more data.

How to create chart in MS Excel for unique key sequence?

I have a data something like below,
data set #1
A 1
B 2
C 3
A 10
B 20
C 30
A 50
B 60
C 70
It is not properly row-column formatted, so the generated chart is not as expected.
I know it will be easier if it is formatted like below.
data set #2
A 1 10 50
B 2 20 60
C 3 30 70
But how to generate a line chart for my data set #1 that should look similar to data set #2's chart?
[I have a huge set of data, it can't be transformed by hand]
here I explain how to make a pivot chart of your data, as suggested by #Riverside
lets label your data: put "label" in cell A2, "value" in cell B2
in your table, go to cell C3 and type the following formula: =COUNTIF($A$3:A3,A3)
drag the bottom right corner to auto-fill the rest of the rows. Lets call this column:"order" (put in cell C2)
now select cells A2:C11 and click on: insert -> pivot table -> pivot chart. Under "Choose where you want the PivotTable.." select the radio button which says: "Existing worksheet" and put E2 in the box. click ok.
in the pivot table Field list pannel on the right drag the "label" field from the top panel into "legend fields", "order" into "axis fields" and "value" into "values".
on the top left of the ribbon, click "change chart type" and select "line"
you can close the pivot table dialog boxes and style your chart as normal.
if you wish to hide the pivot table data, you can simply hide the columns it is in (select columns , right click, hide)
The data would have to be transformed to get a chart like data-set #2. For transformation you could either use pivot tables like #Riverside mentioned, or you could use some simple formulas. Check out this excel which does what you are trying to do.
All you have to do is paste your data, however large it may be, in the first two columns (A and B), and the data is instantly transformed into the 2D set. I've already defined a chart, so you only have to redefine the chart ranges by dragging.
In case the link for the file doesn't work, use this link (Dropbox). Note that if you view it on dropbox itself, some formulae don't work, so I'd suggest downloading and viewing.
Put two labels on top of your data.
Then select all data, select insert Line chart in your excel.
Excel automatic see your labels as labels and the rest as data. Your line chart should be fine now.

Dynamic Charts with Variables on Two Axes

I'm trying to utilize the Range Names feature in Excel to create a chart that will automatically update once new data is appended. I've successfully done this with two variables (i.e. Date and Temperature) but I'm unable to get it working with 3 or more variables.
Within a tab titled, 'Dynamic', I have a Date (value in A1) column with these values: 4/1/2013, 4/2/2013, 4/3/2013, 4/4/2013, 4/5/2013 (Value in A6).
I also have a Temperature (value in B1) column with these values: 55, 60, 62, 65, 61 (Value in B6).
Within the Name Manager (within Formulas tab) I created a Named Range with a Name of "Date" and a Refers to value of:
=OFFSET(Dynamic!$A$2,0,0,COUNTA(Dynamic!$A:$A)-1)
I created another Named Range with a Name of "Temperatues" and a Refers to value of:
=OFFSET(Dynamic!$B$2,0,0,COUNTA(Dynamic!$B:$B)-1)
I then selected the range A1:B6 and inserted a Clustered Column chart. Clicking on one of the bars yields this formula:
=SERIES(Dynamic!$B$1,Dynamic!$A$2:$A$6,Dynamic!$B$2:$B$6,1)
If I insert my Named Ranges in the above formula like so:
=SERIES(Dynamic!$B$1,Dynamic!Date,Dynamic!Temperatures,1)
and it will allow me to add a new row of data and it automatically updates the chart.
This is great! But when I attempt to add another variable I can't get it to work. I add Rainfall (value in C1) to the spreadsheet with these values: 1, 2, 0.5, 0, 1. I create a Name Range with a Name of "Rainfall" and a Refers to value of:
=OFFSET(Dynamic!$C$2,0,0,COUNTA(Dynamic!$C:$C)-1)
I then select A1:C6, insert a Clustered Column chart. Clicking on one of the Temperature bars I change the formula to:
=SERIES(Dynamic!$B$1,Dynamic!Date,Dynamic!Temperatures,1)
When I attempt to change the formula for the Rainfall bars I try this:
=SERIES(Dynamic!$C$1,Dynamic!Date,Dynamic!Rainfall,2)
but when I hit enter it won't do anything. So, I'm left with a chart that won't update automatically.
Assuming I could get this to work, I'd like to move the Rainfall data onto a secondary axis and change the chart type to a line chart (so that it all fits nicely onto the same chart area).
Can you tell me what I need to do to get this example to work? Thank you!
I couldn't get this to work either, using the SERIES formula. Then again, I suppose it is considered an undocumented feature.
However, if you edit using the Select Data dialog then it works.

Resources