excel fix value for chart - excel

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:

Related

EXCEL: Conditional Formatting Using Row Not Working

I have an Excel Sheet that I need to conditionally format so I can tell how close numbers in the cells are to the midpoint of a range. These are the rules:
Blanks = WHITE
Values outside of my desired range (Rows B and C) = RED
Values inside of my desired range will scale with the midpoint = GREEN and the outer points = YELLOW
Format Rules
If I make a separate condition on every row, it is CORRECT and looks like this:
Correct
But that would take an insane amount of time to create rules for every row.
If I make the following formula to try to speed things up, it calculates correctly for the first row and then incorrectly for the remaining rows (only using the numbers from the first row).
3-Color Scale Example:
Minimum =INDIRECT("B"&RIGHT(ADDRESS(ROW(),COLUMN(),4,1),LEN(ROW())))
Midpoint =(INDIRECT("B"&RIGHT(ADDRESS(ROW(),COLUMN(),4,1),LEN(ROW())))+INDIRECT("C"&RIGHT(ADDRESS(ROW(),COLUMN(),4,1),LEN(ROW()))))/2
Maximum =INDIRECT("C"&RIGHT(ADDRESS(ROW(),COLUMN(),4,1),LEN(ROW())))
Incorrect:
Color scales don't accept relative references in the value formulas. You'll have to bite the bullet and use absolute references and adjust the row number for each row.

Excel slope calculation with offset defined names

This formula isn't working for me ... can anyone hep?
The data is arranged:
Period cell values ranging from 1-10
The data within EnglandStat is complete and cell values ranging between 1000-2500.
The need for the defined names with offset were so a chart could automatically be updated using two named cells - Shift and Series.
i.e. Series defines that 10 period are displayed on the chart. Shift defines to move the offset range on by 1 data point.
I have two defined names:
Period=OFFSET(DATA!$A$13,COUNTA(Sheet1!$B:$B)+0-Shift,0,Series,1)
EnglandStat=OFFSET(DATA!$C$13,COUNTA(DATA!$C:$C)-13-Shift,0,Series,1)
I basically want to calculate the slope using:
=SLOPE(EnglandStat,Period)
I am getting a #REF error

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.

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.

Change the Point Color in chart excel VBA

I have this chart in which if any point in graphs exceeds specific limit then its color should change.
can anyone suggest me how to get the chart in VBA and then apply this kind of condition e.g i want to change the color of highest point in the above graph . Any help would be highly appreciated.
Using: ActiveWorkbook.Sheets("Sheet1").ChartObjects("Chart1").Chart.SeriesCollection(1)
Color of each point is .Points(PointNumber).Interior.Color
The number of points you have to cycle though is .Points.Count
The value of each point is .Points(PointNumber).Value
colors of the markers themselves (Applies only to line, scatter, and radar charts):
.Points(PointNumber).MarkerBackgroundColor = RGB(0,255,0) ' green
.Points(PointNumber).MarkerForegroundColor = RGB(255,0,0) ' red
.Points(PointNumber).MarkerStyle = xlMarkerStyleCircle ' change the shape
Let's take another approach, which does not require any code.
Assume your data is in columns A (sequence number or time) and B value, starting in A2 and B2, since your labels are in A1 and B1. We'll add a series to the chart that includes any deviant values from column B. This series will draw a marker in front of any deviant points so the original point will still be present, and instead of reformatting this point the new series displays a point.
In cell C1, enter "Deviant".
In Cell C2, enter a formula that detects a deviant point, something like:
=IF(AND(B2>upperlimit,B2
This puts the value into column C if column B exceeds upper and lower limits, otherwise it puts #N/A into column C, #N/A will not result in a plotted point.
Copy the data in column C, select the chart, and Paste Special as a new series. Format this series to have no line and whatever glaring marker you want to use to indicate an out of control point.

Resources