Excel chart shows wrong data when zero-length string "" is in data - excel

I am trying to make a scatter plot in Excel for Mac which should look like this:
I am using an IF formula which returns "" when my x-data is negative or 0 and then using this new column to make the plot. However, all the x-values in the plot turn out to be very different as here:
When I manually delete all the "" from the column, I get the correct plot. If I just add one "" in the column all the x-values change in the plot. I see the correct x-values in the spreadsheet column.
How can I get Excel to ignore the "" when plotting or plot the values that are shown? What is causing this error?

You can replace "" with NA() in your IF formula to avoid plotting these values. Excel charts ignore #N/A cells. In your case, assuming your x-values are in column A, the formula in the new column (for plotting) is
=IF(A2<=0,NA(),A2).

Related

How can I convert a string (YYYY.MM) to a date format (MM/YYYY) that excel will understand for graphing purposes?

Currently my excel sheet has columns of strings in the Date column (example of 1871.01, 1871.02 etc). I would like to convert these to MM/YYYY date format so that I may chart the data in a time series format. I've tried this
=(RIGHT(A9,2)&LEFT(A9,4))
but it just spits out mmyyyy and not in a date format. When I try to format the new cell as a date it does nothing. Any help?
Excel cannot represent dates before 1900. That's why some clever person has used the text format 1871.01 to represent January 1871. You can use this in charts to plot the date in a category (not a date) axis.
If you do want to use a time axis you may want to approach it like this:
extract the year part and add 100
extract the month part and build a date that is 100 years after the date shown
plot the data with the new date in a scatter chart (not a line chart)
in the worksheet, generate a range of dates for the date range of the chart and corresponding 0 values
create a helper cell for labels that show the 1800 equivalent date as text in the desired format
add the helper series to the chart
remove the chart x axis labels
add labels to the helper series with "Values from cells" and position "below"
format the helper series to have no line and no marker (still visible in the screenshot.
With this method you can place as many or as few fake X axis labels as you like, by creating or removing values in the helper for label cells in the grid.
It is a bit more setup than plotting dates after 1900 in a timeline, but it can totally be done.

How do i use Specified Data as an axis in excel

I have a question about doing a graph in excel, i im trying to make a representation of an accelerometer. in this i have 4 values X,Y,Z and time between measurements.
X=1,039 Y=8,743 Z=4,747 TIMEms=4
I have 600+ value sets like this and i want to make 3 graphs for X,Y,Z with TIMEms as the distance between each datapoint on the horizantal axiz. How can i do this?
I tried using the values of TIMEms but this just gives me a horizontal axis consisting of 5's with the default distance of 1 between them.
If you currently have a sheet with columns X, Y, Z and TIMEms, you'll need to add a new column to the end to roll-up all the time differences.
Let's assume you have this sheet, and TIMEms is column D. In column E, label it "Time" in cell E1, and in E2 set this equal to zero. E3, set to the formula:
= E2 + D2
Copy/paste this formula down the column (assumes the time quoted in column D is the time since the last observation, rather than time until next observation). You should now see time increase down this column as a "milliseconds since recording began".
Next you'll need to insert a scatter chart (whichever flavour you prefer), setting the X-values to be the values in column E, and the Y values to be whichever of the X/Y/Z values you want to plot. On the "Insert" ribbon, in the "Charts" area, look for the graph looking like a bunch of unconnected points - hover over it and it should say "Insert scatter (X,Y) or Bubble chart" - select one of the scatter charts.
When you have the chart object, you need to wire up the data correctly with the "Select Data" UI you get access from when right-clicking on the chart object. Click "Add" and you get a dialog prompting you for the series name, the X-values and the Y-values - enter appropriate ranges in those boxes, for example X-values would be "=E2:E600", and Y-values "=B2:B600", to plot the actual Y values.
You can also add more series to the chart to get each of X, Y and Z on the same chart, if you so desire.

excel fix value for chart

i have some data in excel 2007 and draw a line chart with them, so i have two series: one for data and a series for average to compare data with average. now i want to add a fix value for series 2(average) to draw average line in chart.
series 2(average) value ={Sheet3!$I$18,Sheet3!$I$18,Sheet3!$I$18}
the average value is in i18 cell
but it has error about "the formula you typed contains an Error"
any body to help me to draw average line?
my data are in d24:d26 cells
and average is in i18
if i use const number it's working like below:
series 2(average) value ={5003,5003,5003}
but i want read the series value from cells, which on change the average number(i18 cell) the charge series(average line) change too.
In cell G24 enter
=$I$18
Copy to cells G25 and G26.
Now select cells G24 to G26 and copy. Select the chart and use Paste Special. Accept the defaults. The chart now has the average line.
By definition, a line needs at least two data points, beginning and end. You could leave cell G25 empty, but then you must tell Excel to connect the line between empty cells. That setting is in the Select Data dialog behind the button "Hidden and empty cells". With that approach you can avoid duplicating the average value for each data point.
Here is a screenshot with such a setup.
Edit: It can be done with just one cell but it's a lot more preparation.
Add the single cell to the chart as a new series.
Change that series to XY Scatter
Edit the series values, set X to 1, set Y to the cell value
add horizontal error bars to the average series, with settings being Plus, No Cap, Fixed value (count the number of data points in the line and enter that as the fixed value)
format the error bar line as desired and format the data marker to be invisible. Here is how this can look:

How do I modify series values for charts in Excel

So if I have the numbers 1 through 5 in cells A1 through A5, when I select series values for a chart in Excel, how do I plot A1:A5 as -1 through -5?
How can I modify:
='All Data'!$A$1:$A$5
without creating cells on my spreadsheet?
Put a hyphen in A1 before 1, copy A1, select A2:A5 Paste Special, Values with Operation Multiply.
"How can I modify [the input data] without creating cells on my spreadsheet?"
Excel plots worksheet data. It sounds like A1:A5 contains your Y values and you want X values of -1 to -5. The most efficient way to do this is to put these values into a worksheet range, and using the Edit Data dialog, set this range as your X values.
You can use an array of values, which seems great but is harder to maintain, and you are limited to how large an array you can use.
If you plot your Y values, you get a series formula like this (select the chart series and look at the formula bar):
=SERIES(,,Sheet1!$A$1:$A$5,1)
There are no entries for series name, so Excel just calls it Series1, nor for X values, so Excel uses 1,2,3,4,5.
Edit the series formula to this:
=SERIES(,{-1,-2,-3,-4,-5},Sheet1!$A$1:$A$5,1)
Note: If you make an XY Scatter chart, this array will be used as numerical X values, and by default -5 will be furthest left.
If you make a line chart, the line will be unchanged, but the array entries will be used as text (non-numeric) labels in the left-to-right order in which they appear in the array.

Plot graph and calculate average from the same range ignoring non numeric data (not plotting zeros!) in excel

Excel graph will not plot null cells and NA() (#N/A). Blank cells (="") for some odd unknown reason will plot as zeros! On the other hand, AVERAGE ignores both, null and blank cells! It does not consider blank as zeros! Which is the expected right behavior!
Graph:
Ignore: null, =NA() (#N/A)
Plot as zero: blank (="")    // WHY Microsoft? Why!!!??
AVERAGE(), or any other formula:
Ignore: null or blank ("")
Error: =NA() (#N/A), or any other non numeric data!
So, how to use the same column to plot a graph not plotting any non numeric and also calculate the average?
I know that I can just add an auxiliary column to plot, that checks if a value is blank, and replace with =NA(). But, in my case, that will require a lot of auxiliary columns, and I don't want that.
My data comes from formulas. So I can't have null/empty cells, only blank "".
"A lot of auxiliary columns".. 1 is a lot? If data is in column B.
=IF(&B1 = "", NA(),&B1)
And drag it down.
On topic for your problem :
There is an option, change it like that (French sorry):
Change it TO the last choice instead of zeros and it will link your data accordingly.
See this for more information on these options.
Edit 1
If you want to make an Average including N/As:
=AVERAGEIF(A1:A5,"<>#N/A")

Resources