How to create chart in MS Excel for unique key sequence? - excel

I have a data something like below,
data set #1
A 1
B 2
C 3
A 10
B 20
C 30
A 50
B 60
C 70
It is not properly row-column formatted, so the generated chart is not as expected.
I know it will be easier if it is formatted like below.
data set #2
A 1 10 50
B 2 20 60
C 3 30 70
But how to generate a line chart for my data set #1 that should look similar to data set #2's chart?
[I have a huge set of data, it can't be transformed by hand]

here I explain how to make a pivot chart of your data, as suggested by #Riverside
lets label your data: put "label" in cell A2, "value" in cell B2
in your table, go to cell C3 and type the following formula: =COUNTIF($A$3:A3,A3)
drag the bottom right corner to auto-fill the rest of the rows. Lets call this column:"order" (put in cell C2)
now select cells A2:C11 and click on: insert -> pivot table -> pivot chart. Under "Choose where you want the PivotTable.." select the radio button which says: "Existing worksheet" and put E2 in the box. click ok.
in the pivot table Field list pannel on the right drag the "label" field from the top panel into "legend fields", "order" into "axis fields" and "value" into "values".
on the top left of the ribbon, click "change chart type" and select "line"
you can close the pivot table dialog boxes and style your chart as normal.
if you wish to hide the pivot table data, you can simply hide the columns it is in (select columns , right click, hide)

The data would have to be transformed to get a chart like data-set #2. For transformation you could either use pivot tables like #Riverside mentioned, or you could use some simple formulas. Check out this excel which does what you are trying to do.
All you have to do is paste your data, however large it may be, in the first two columns (A and B), and the data is instantly transformed into the 2D set. I've already defined a chart, so you only have to redefine the chart ranges by dragging.
In case the link for the file doesn't work, use this link (Dropbox). Note that if you view it on dropbox itself, some formulae don't work, so I'd suggest downloading and viewing.

Put two labels on top of your data.
Then select all data, select insert Line chart in your excel.
Excel automatic see your labels as labels and the rest as data. Your line chart should be fine now.

Related

Scatter Chart in Excel

I have data in excel:
I want to have a scatter chart where I see the data as dots.
The issues is that, for example, for Product A, it will show me two dots, one at 3 and the other one at 5.
I would like to see it as one dot with coordinates (3,5) as my x-axis should be the "Price" (Column D in Chart Data sheet) and the y-axis the "Suitability" (Column E in Chart Data sheet).
If I do not select the product column in the chart data source, then I get the results (see sheet Chart 2) but then I do not have the information that which product a dot signifies.
Could you please provide a solution that shows the dots (with a label showing against each dot as to what product it signifies).
Generate the chart as in your second example
Select the data points in the chart and right-click on them
From the popup menu, select "Add Data Labels -> Add Data Labels"
Select the Data Labels and right-click on them
From the popup menu, select Format Data Labels
From the Label Options, uncheck "Y Value" and "Show Leader Lines" and check "Value From Cells"
Once you have check "Value From Cells", a dialog box appears, use it to select column A as the source of data labels
The final result:

Summarize Amount with 2 matching data

i have a excel table like the following:
Amount
Debit
Credit
500
153100
279000
100
153100
251100
150
153100
279000
20
155100
279000
At the end i need a sum of this table like:
650 - 153100 to 279000
100 - 153100 to 251100
20 - 155100 to 279000
For every Debit i want the sum the matching Credit columns. (In this example 500 + 150 are sumarized because both come from 153100 and go to 279000)
Can i do this in excel (without VBA)?
You could use a pivot table to get the result you need (without going into the construction of the pivot table) ...
https://support.microsoft.com/en-us/office/create-a-pivottable-to-analyze-worksheet-data-a9a84538-bfe9-40a9-a8e9-f99134456576
Specific options on your pivot table need to be ...
Right click on each field and go to Field Settings..., go to the Layout & Print tab and check the box labelled Repeat item labels
Select a cell within the pivot table and go to the Design tab in the ribbon and select Report Layout -> Show in Tabular Form
You'll also want to turn off your subtotalling for the Debit and Credit columns by right clicking and unselecting the subtotal option directly within the context menu.
Just make sure you drop in the rows/columns/value like shown in my screenshot.
If you have Excel 365, you can use a combination of the UNIQUE function with SUMIFS ...
Cell E1 = =UNIQUE(B1:C5)
Cell G2 = =SUMIFS(A:A,B:B,E2,C:C,F2) (Fill Down and I've been lazy on the bounds of the lookup, I just selected the entire column because it was easier to demonstrate)
There's always someone smarter than me out there that will likely come up with a better solution but either of those options should work for you.

How to find the value of column name and row name when a value at the intersection is matching a condition

How to find the value of column name and row name when a value at the intersection is matching a condition
I have this data
TC1 TC2 TC3
TC1 100 87 95
TC2 88 100 99
I need to return the combinations where value is greater then 95 like:
TC1,TC1 TC1,TC3 TC2,TC2 TC2,TC3 and so on.
Can anyone help here?
This is for Excel 2016.
So, you've got your data:
Highlight it, and then click 'Format as Table' from the Styles Group in the Home ribbon. (yes, your table has headers)
With this table in focus, navigate to the 'Data' ribbon, and click 'From Table/Range' in the 'Get & Transform Data' group. This will open the query editor. If you're not used to it, don't worry. Although it can get quite complex in here, we're going to be pretty straightforward.
Highlight columns TC1, TC2, TC3 (Hold down [control] and click each column header). Go to the Transform ribbon, and click on 'Unpivot Columns' in the 'Any Column' group. Look at what happens, it's awesome.
Now, click the arrow next to the Value column. Go to 'Number filters' on the drop down. Pick, 'greater than equal to.' A 'Filter Rows' dialog opens. next to 'is greater than or equal to' put in 95.
Click OK. Your data set is filtered. Yes! Go back to the home tab, click 'Close & Load'
Admire your gorgeous list of tuples for values greater than 95.
Good luck! Hope it helps.

Display of the table data in pivots or non-pivotal forms

And my future report should contain as below.
Region --> Filter list of Regions
If I select North America
I should be able to display
Country Name
List of states down from here
(non-Null data should be displayed)
( i tried with pivot tables but results are not in expected format)
Here is a guide to using Powerquery to complete the task
1) Turn your source data into an Excel table. Select a cell in the data area and then press Ctrl+ T. Remember to select my table has headers.
2) Go to Get And Transform 2016 or PowerQuery tab (you have to install add-in pre-2016) > New query from table
3) Highlight third column hold down Shift key and then select the end column to highlight all States columns then right click > unpivot columns
4) Select Attribute column > right click > Remove column then select Value column and rename as State
5) Then select Region column > Transform tab > Any Column > Fill > Fill Down
6) Repeat for Country column
7) Top left corner > Close and load to . Here you have number of options which include (there are more ways to create the final pivot):
a) You could create connection only and tick the add to data model check box and then use Power pivot to directly access the new table for a pivot
b) You can close and load to a new worksheet choosing to view as a Table
I will show you option b.
You end up with a flat table in a new worksheet
8) Select a cell within the table and press Alt + N + V to create a new pivottable.
noting the different options you could use for setting up this pivottable.
9) Arrange pivottable as required
No nulls need to be removed in this case. However, you could have selected the down arrow next to the column header of interest and then selected Remove Empty.

Plot graph using the last 10 values in MS Excel

So I got Sheet1 with a table containing some data. To simplify let's say there's a column 'x' with some data and a column 'y' with some data. Every now and then more values are manually added to the table.
On Sheet2 I need Excel to automatically plot a graph only using the last 10 values in the table. So when more values are added the graph changes automatically to the new last 10 values. Is this possible?
Furthermore, let's say there's a third column 'z' that's always a constant value (for example to show some kind of a maximum for 'y' in the graph). How to make Excel automatically fill the cell with the number when the according 'x' and 'y' cells are filled? I know I could manually fill the 'z' column all the way down but I suspect that would screw up with plotting the last 10 values.
I'm using MS Excel 2013.
Thank you very much!
You'll need to create a chart using dynamic named ranges as the series data.
Start by setting up the data table with headings x, y and z.
Select x heading and click Insert > Table, make sure "My table has headers"
is checked then click OK
In column z, to set 20 as the autofilled value, add formula =20
Put your data in columns x and y
Create your chart based on columns x and y. This example creates a XY Plot.
Assuming you've only got one table in your workbook, it will be named "Table1".
Go to Formulas > Name Manager > New
xPlot: =OFFSET(Table1[[#Headers],[x]],COUNTA(Table1[z])-9,0,10,1)
Also create:
yPlot: =OFFSET(Table1[[#Headers],[y]],COUNTA(Table1[z])-9,0,10,1)
Right click on your chart and click Select Data...
Remove the Series that is there
Create a new Series
If your workbook was called Chart Example.xlsx, then set:
Series X values: 'Chart Example.xlsx'!xPlot
Series Y values: 'Chart Example.xlsx'!yPlot
Click OK and try adding more data.

Resources