I have data which I want to display on an Excel column chart. It represents the number of sales per week, where the date is the first day of the week:
If I leave the dates as dates then Excel interprets this as data for one day out of seven, so I get thin columns with large gaps:
I can resolve this by formatting the dates as text, which gives me the style I want:
However, I want a date scale where only the first of each month is labelled, which I think requires a date formatted axis.
Basically, I want to achieve this in Excel instead of paint:
Any ideas on how (if) this can be done?
What you could do is make a line chart on the date axis, add and format error bars, then hide the lines and markers. Use the Minus option for the error bars, with no End Caps, and a Percentage Value of 100%, so the error bar reaches the horizontal axis. Format the error bar lines to simulate a thicker bar.
I had to do this recently and the way I got around it was to create a second set of values using the =Text(A1,"MMM YY") formula.
Instructions on your actual sample data:
Insert a column between Week beginning and Sales (For the purpose of this we will assume Week beginning is in column A)
In the new column B row 2 enter this formula:
=IF(TEXT(A2,"MMM YY")<>TEXT(A1,"MMM YY"),TEXT(A2,"MMM YY"),"")
Here we are telling it only to list if it is the first instance of the new month
Copy it down as far as column A has data
Highlight the data in column B and C
Create a column chart
Your chart will now look how you wanted it
Edit: I just noticed you have "Week beginning" but I assume you want your chart to be week ending for the titles?
If so then make the B2 formula
=TEXT(A2+5,"MMM YY")
and then make the B3 one
=IF(TEXT(A3+4,"MMM YY")<>TEXT(A2+4,"MMM YY"),TEXT(A3+4,"MMM YY"),"")
And drag down, I have added 4 on the assumption your week closes on Friday (Monday + 4 Days) but you can adjust that accordingly
Related
Software: MS Excel 2016
Link to files: GitHub Repository
Sheet2 of month.xlsx has table
When I select it and Insert Scatterplot, Chart1 of month.xlsx is the result. No matter what I try, I cannot get the X-Axis to display in Months (right now it displays Month's number).
Help!
You can not make scatterplots using a category. Scatterplots assume both axes are numerical to enable you to have fractional values on x and y axis. You will have to change month onto numbers such that they scale correctly. I'd suggest the day of the year. February 5 would be day 36, for example. Or use the month number but beware of the differences in the number of days in a month.
The problem is most likely the way you have your months stored. By the looks of things I would hazard to guess they are actually text and not numbers formatted to display the name of the month in full. In order to get the months to display in your graph, you will either need to enter the months as a serial date which Excel can understand as a number, or create a dummy column to hold this same information which you can latter hide.
once you have your months in a serial date that excel can handle, you can then select the X-axis and set the format style. Select custom as the category, and then use mmm or mmmm as you custom format to display just the name of the month. Alternatively you could show the whole date using date formats.
Two ways to enter a date serial are to simply enter the numeric date format that matches your regional settings or use the following formula:
=DATE(year,month,day)
Where year, month and day are all integer, or formulas that evaluate to acceptable integers
I'm trying to make a line graph in Excel that combines multiple series into ONE line. All I've been able to create so far is one graph with multiple lines on the same y axis. Is it possible to combine multiple data points from multiple series together in chronological order?
For context: I'm trying to make a graph that shows monthly temperatures between 1880-2017. January, February and so on, are each a separate series. I can make a bar graph that shows each year with each month chronologically but is there a way to convert this into a line graph without it producing multiple lines for each month, but instead one line that combines all the month data points together nicely?
Thanks!
If there no gaps in the data you described,
and you have a table
of (2017-1880+1)=138 rows by 12 columns.
Here it is one way to make a one-line graph of the data
(some random imaginary data used in the example).
Unfortunately, standard Excel data functions can handle only
dates not older than January 1, 1900,
see for example, http://www.exceluser.com/formulas/earlydates.htm.
But you are lucky as all you need is just a year and a month numbers.
In this case the dates along the x-axis
can be presented with numbers, which integer part is the year,
and fractional part is a fraction of the year that represents a month.
Assuming that the table is in Sheet1!A2:M139,
select Sheet2 , type in a formula
=1880+FLOOR((ROW()-2)/12,1)+MOD(ROW()-2,12)/12
in the cell A2, and copy it down to A1657 by any means you like.
For example, select A2, press Ctrl+C,
click in the Name box input field,
type A2:A1657 range in it and press
Ctrl+V.
That's it, this will create all the
x-axis date values for the one-line graph.
Next step is to fill the range B2:B1657
consequently with monthly data from the Sheet1.
Select cell B2 and type in a formula
=TRANSPOSE(INDIRECT(ADDRESS(2+LEFT(A2,4)-1880,2,,,"Sheet1")&":"&ADDRESS(2+LEFT(A2,4)-1880,13)))
select range B2:B13,
click at the end of the formula and press
Ctrl+Shift+Enter.
The range B2:B13 is now filled with the T data from Jan to Dec of 1880,
and it is still selected.
Press Ctrl+C to copy this range,
then select B14:B1657 and press Ctrl+V.
That's it, all the readings from the table
will be lined in the range B2:B1657.
Edit
There is even simpler solution for the second part:
fill the range B2:B1657 with formula
=INDEX(Sheet1!$B$2:$M$139,FLOOR((ROW()-2)/12,1)+1,MOD(ROW()-2,12)+1)
It just converts a linear x coordinate of the current point,
based on the subsequent row number ((ROW()-2)) into corresponding row, column pair
in the table and extracts the table value with INDEX() function.
My date data in x axis is in this format: 11/15 (without year).
How to show dates in a chart from 15Nov to 29Apr in Excel?
Below chart is not correct. The first dates have moved to end.
I converted dates to text using: =TEXT(B2,"mm/dd") for all of rows.
Excel will add a default year (current year) for you when you enter just the month and day. so 15-Nov is actually 15-Nov-2017, and 29-Apr will also be 29-Apr-2017. So the 29-Apr will be assumed sooner than 15-Nov. I know you want 15-Nov for previous year and 29-Apr for next year but excel does no know your meaning..
So, you have to add the year part to your dates (even manually or using an formula) to specify exact order of dates and then use a format string to hide year in your cells like as mmm/dd.
I have a problem with analyzing data measurement in Excel. Here is my issue.
In column A input is time (day.month hour), in column B it is day in year. From column C to I are numbers from measurement analyzer.
As you can see from the Excel Prnt Scrn, in single day we measured values in different time. I have to calculate average of all values (from value 1 to value 7) for specific day.
Example: average of values in Time 1.1.2012 (average values 1.1.2012 at 0:59, 1:59, 2:59 ….).
The problem is that I have more than 9000 rows with different time steps. I tried with Filter function, but I only manage to get time from older to newest!
Appreciate for any useful advice.
First, assign a value for all cells in the Day column using the Date number type. You will need to use Find and Replace to change all the "." to "/" in your Time column for this to work (i.e. DD.MM.YY HH:MM becomes DD/MM/YY HH:MM). Copy the Time column into the Day column. Highlight the Day column, right click, and select Format Cells. Change the format to Date, and it will cut off the time values. If you want a number for Julian Day and not the date, insert a new column and see this article for calculating day of the year: http://inanecoding.co.uk/2012/10/converting-excel-date-to-julian-day-of-year-number/
Second, use the Subtotal function under the Data tab to average each day's values. The this will work with date or Julian Day (or any column containing more than one unique value). This will change the appearance of the sheet but all the base data will still be there. However, for convenience of switching between raw and averaged data, I'd make a copy of the sheet before proceeding. Click Subtotal and in the dropdown menu "For each change in:" select which column (Date or Day) you want to use as a grouping. For the "Use function" menu, select Average. Below, check the columns you want to find averages for (Value 1-7). Click okay.
Since you have 9000 records, this may take a few seconds. Play around with the 1,2,3 boxes in the upper left corner to see the level of detail you want in the resulting spreadsheet.
I'm having trouble putting data on 2 different types of data on my x-axis from the data in my table. How can I get the month and year data from my table to a line graph like this?
Like in the graph shown, I want all to group the x-axis by year range (2001-2002, 2002-2003, etc). And then within each year range, I want the values for each month to show for that year from August to May. And repeat this again for each year interval.
What should I select on select data source to make it look like the graph shown?
In Excel, you can arrange your data this way (I've only included 3 years):
Every cell that seems blank is really blank, that is, it doesn't contain a formula or a space or anything that doesn't appear. The "XXX" in the second cell of the second column is temporary. Create your line chart with this data, then delete the "XXX" and format the chart.
Recommend combining the month and year dimensions into a single month-year column and making the values line up in a single column. Then put month-year on the x axis and values on the y axis.