Issue with Graph in excel

Gautham A

Board Regular
Joined
May 25, 2020
Messages
89
Office Version
  1. 2016
Platform
  1. Windows
Hi Team,

Using the following data, I'm trying to plot a line graph with time on y axis and date on x axis. All I'm getting is a single horizontal line. Not sure what to do. Can someone help me on this?

26-10-2020​
20:30:00​
27-10-2020​
19:30:00​
28-10-2020​
19:45:00​
29-10-2020​
21:30:00​
30-10-2020​
22:00:00​
31-10-2020​
23:15:00​
01-11-2020​
23:30:00​
02-11-2020​
22:45:00​
03-11-2020​
22:54:00​
04-11-2020​
23:41:00​
05-11-2020​
16:40:00​
06-11-2020​
18:30:00​
 

Attachments

  • graph.PNG
    graph.PNG
    19.7 KB · Views: 7

Some videos you may like

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi

First thing that comes to mind is that those are not time values but strings.

Assuming cell B2 has one of the values that you posted that seem like time, try in another cell:

=ISNUMBER(B2)

You should get true if it's a time value.
 

Gautham A

Board Regular
Joined
May 25, 2020
Messages
89
Office Version
  1. 2016
Platform
  1. Windows
Hi
I'm getting TRUE when i applied that formula.
 

Attachments

  • graph 2.PNG
    graph 2.PNG
    29.3 KB · Views: 7

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi

I don't understand the chart you posted. Very strange numbers in the Y axis and all zeros in the X axis?

I just copied your values and tried a line chart and got:

cht02.jpg
 

daverunt

Well-known Member
Joined
Jul 9, 2009
Messages
1,887
Office Version
  1. 2013
Platform
  1. Windows

ADVERTISEMENT

The OPs .png shows 2 series lines. Single series data?
 

Gautham A

Board Regular
Joined
May 25, 2020
Messages
89
Office Version
  1. 2016
Platform
  1. Windows
Hi
This is how I exactly want. But all I'm getting is a flat line. Not sure where it is getting wrong in my excel
The numbers in Y axis are the time at which a file came on different days.
 

Gautham A

Board Regular
Joined
May 25, 2020
Messages
89
Office Version
  1. 2016
Platform
  1. Windows

ADVERTISEMENT

Hi daverunt,
Yes I'm getting 2 series lines. Ideally I should get only one
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi

Simply select the time values and insert line chart.
What do you get?
 

Gautham A

Board Regular
Joined
May 25, 2020
Messages
89
Office Version
  1. 2016
Platform
  1. Windows
When I select only column B(time values) I get the values correctly.
But I need the dates in X axis. When I try to include the date as well, then i get a single horizontal line
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
After you insert the time values, to get the horizontal axis values:

Select the chart.

Ribbon->Chart Tools->Design->Select Data

Click on the Edit button below the Horizontal (Category) Axis Labels

In the box enter the range of the X axis values (or select it in the sheet)
 
Solution

Watch MrExcel Video

Forum statistics

Threads
1,123,359
Messages
5,601,153
Members
414,431
Latest member
JustmemyselfandI

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top