Excel stacked line chart shows transition to 0 when empty cell but I don't want it to - excel

I have 2 sets of actual data that need to be stacked. At the current month I want to show 2 sets of projected data also stacked but the transition is currently gradual as if the empty cells are treated as zeroes. I want a vertical separation between the actual and projected.
I'm using Excel (2013). I've tried:
- The Hidden and Empty cells setting... but it locked on Zero (other options greyed out)
- Using #N/A
- Changing ranges (this works when the gap is at the end but not for the Projected values.

Separate the data with the zero into two series ie either side of the zero , then plot the two series ie left part and right part.
Another way would be to have a second chart, transarent except for the second part of the data series sitting on top...
Used to do that with forecasting based on previous values, what looked like one line actually had two charts overlaid one on the other.
So, based on the comment built this:
So, you can now follow and complete the detail you need.

Related

How to recreate a bar chart of event times in Excel

Trying to recreate this first graph in excel using the data below it.
Solved this by making the times regular integers, then calculating the start to end difference for each date, widening the data to split the differences among three categories. I then highlighted only the dates and start times, pressed control, and highlighted the 3 columns with the differences.
I selected stacked bar chart, which looked like this by default.
Lastly, I selected the (blue) start time bars and chose no fill as the color. After deleting this series from the legend, the result adequately matched the requirements.

How to color data series point inside plot graph depending on data value in Excel table

On a data/line plot inside Excel, I'd like to color my data points depending on a value inside the table on the same row as the data value, however from a different column.
It's best explained with a picture:
It's essentially a line chart type with the lines removed, and the data points set to bullet type and given an increased radius for visibility. The x-axis denotes the calendar date as dd.mm, and the y-axis contains the values.
Now the Excel table also contains a row called "Time of Day", which can be mo(rning), mi(dday), ev(ening).
Can something like this be done with a line chart, or do I need to use a different type of chart, or is this generally not possible in Excel (which I doubt)?
Excel in use is: Microsoft Excel for Mac, Version 16.51 (21071101).
Here's a way to achieve this:
What I've done is:
Added three columns for the times of day (columns B, C and D). These can be hidden.
Added this formula in B2: =IF($E2=B$1,$F2,NA()) which should then be dragged to cover the next two columns and then down to cover every day.
Selected A1:D11 (it'll be more than 11 on your version)
Went to Insert > Chart > Insert Line or Area Chart > Line With Markers
At this point you have a line chart with three series (mo, mi, ev). The lines can be removed, which just leaves the markers. You can format each series separately, with different colours, shapes, sizes, etc.
As a special bonus, this automatically gives you a legend that explains the colours.

Prevent Excel from changing x-axis on a dynamic chart

I wanted to make a dynamic chart that plots out the graph of a standard curve for a bio assay we perform frequently. Often to boost the fit of the curve you may drop one or two data points on either end of the data set. So using vlookups and if statements I have a scheme that performs that data trimming, such that my data always starts in Row 1 and the column length simply shortens.
My table works great, but my xy scatter chart goes bananas on these changes. I have the plot on a log log scale, which looks fine if the full data set is present. I lose the x axis detail when I perform a trim. The x- axis then resets to range of 1 to length of my data set.
How can I prevent this?
UPDATE
I added some information. I know there are VBA ways to do this but I would prefer to keep the spreadsheet as simple as possible. I would think excel should be able to handle this.
So if I have a bad fit I may want to trim the data series either from the beginning or end of the data set. I accomplish that with the spinner buttons to dynamically change the table but the following happens
My formula that updates the columns looks like the following. Its messy.
=IF(ISNA(IF(VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1>8-($B$5-1),"",INDEX(C$4:C$11,VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1))),"",IF(VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1>8-($B$5-1),"",INDEX(C$4:C$11,VLOOKUP(F6,$C$4:$D$11,2,FALSE)+1)))
In the formulas use NA() instead of "". Filling cell with "" does not result in a true empty cell and is the reason why you are experiencing issues with your chart.
Hope that helps.
I may be missing the obvious here, but just hard-code the graph with a range of your choosing. In the sample screenshot, making the graph auto defaults the max range to 100,000. I went in and hard-coded the maximum to 50,000 (circled). Afterwards, the 5th data point is not displayed in the chart. Doesn't matter what the data shows at this point.

Excel scatterplot graph update automatically

My problem is as follows:
The user inputs two numbers between 2 and 25, these numbers are used to create a grid. Every point on the grid has (x,y) coordinates. Based on the amount of points the user chose, my excel sheet is filled up with up to 25x25 (x,y) coordinates.
Example: A 6x7 grid is chosen by the user, the table is filled with 42 (x,y) coordinates and all other values in the table are set to "".
Now I want to use a scatterplot with lines connecting each array to plot the data.
Problem 1: If I only select the 6x7 part of the table that has values in it and create the scatterplot the result is correct. Until the user specifies a different grid, for example 8x9, then the graph is obviously missing two rows and two columns of input data.
Problem 2: If I select the entire 25x25 part of the table, including all the "" values, the graph axes get messed up. The y-axis works properly, but the x-axis shows sequential values (0-7) instead of the x-coordinates.
Problem 3: If I replace all the "" values in the table to 0 or NaN and plot the entire table the axes are correct, but the lines between the scatter data get messed up.
Question:
Is there a way to automatically change the input data for the plot, or is there a way to correctly display the values on the x-axis if I select all the data?
Not sure this will work in your case, but it's worth a try, especially since no one's addressed your post in 3+ hours. I've had success with this approach: 1) charting the largest data set, 2) copying the resulting chart, and 3) trimming the data it draws from to produce all smaller data sets.
To get this to work takes a lot of thought in laying out that largest data set so that all the other plots follow as needed. To illustrate, I've somewhat mimicked your data and in the animated gif I show largest data set, plus 2 others produced by copying it. Then I demonstrate how to make the second one, including the rescaling required to make all plots scaled equally. Notice that I've arranged things so that only one set of x-values feeds all the series. If you can do this, it makes working with the Excel's interface much easier.
After wrestling with it all night I came to the following solution:
Instead of setting all the empty cells to "" or zero the cells should be be set to #N/A (not available). The graph properly ignores the #N/A cells exactly like I want it to and updates when values are entered into them.

Excel Line chart using start and end values as data

So I need to make a line chart, the columns will be split to 9 objectives, and the rows a 1-6 scale. USers are asked to rank themselves between 1 and 6 at the start and end of the course and I wish to show a line for each objective to signify the travel from point A. (start) to point B (end)Somehting like this:
I just can;t seem to make it work! Any suggestions?
In my opinion there are at least three possible approaches to this but each one has it drawbacks:-
(1) Just plot each Line separately as a Line graph and move it to a separate sheet (right-click and select Move Graph). Then you can put the graphs next to each other. The down-side is that it is rather fiddly and you may not want them to appear as separate graphs.
(2) Do the first graph as a Scatter using 1 and 2 as the x-coordinates and your first 2 points as the y-coordinates. Then do the next graph with x-coordinates 2 and 3 and use copy and paste to move it onto the same axes as the first graph (click on the line joining the points and use Ctrl-C and Ctlr-V to copy it onto the first graph). The downside is that each line copied in this way will come out in a different colour and once again it is fiddly to change it.
(3) Do the whole thing as one Scatter graph. You need to re-format the data as below to get some suitable coordinates. To get the break between the lines you need a genuine empty cell (not "" produced by a formula) so I suggest you copy the coordinates in pairs (e.g. F2:G3 to F5:G6) and leave every third pair of cells in the column empty. Then select the whole range F2:G27 and insert a Scatter with straight lines joining the points. Fix the X-axis range from 1 to 9.9 and the y-axis range from 1 to 6 and add axis labels and title as required. The downside of using a Scatter like this is that you only have numbers rather than text along the X-axis but it shouldn't matter in your case where you just need an objective number at each tick mark.
In F2:-
=INT((ROWS(F$1:F1)+2)/3)
In F3:-
=F2+0.9
In G2:-
=IFERROR(INDEX($B$2:$C$10,INT((ROWS(G$1:G1)+1)/3),MOD(ROWS(G$1:G1),3)),"")

Resources