I have a spreadsheet with a few Tables i.e. Art, Drama, English etc. I want to create a dynamic chart so when I change cell B1 to Art the chart automatically picks up the table Art. Is there any way to do this?
Thanks
Not exactly what you are asking for but maybe good enough:
Set up data series as in the picture and use the filter in the graph
Related
I have problem using excel color chart. First of all I'm using color theme that I already set before.
lets say
A: Blue
B: Purple
C: Orange
D: Green
but after I'm using slicer which not include the B: purple
the color that I set before become
A: Blue
C: Purple
D: Orange
Can I somehow event using slicer still got the same color I set before?
I mean like this
A: Blue
C: Orange
D: Green
This is a known issue. Whether bug or feature is up to the beholder.
There's an article on Jon Peltier's blog, written by Jon Acampora, Pivot Chart Formatting Changes when Filtered, discussing the problem and possible workarounds. Check it out. It has a sample file to download and play around with. The essence is:
Simple Workarounds One way to prevent the formatting from changing is
to create a regular chart that references the PivotTable data. With
either of the following solutions we want to avoid the PivotChart all
together, and instead create a regular chart. Again, the regular
charts do NOT suffer from the formatting issues when filters are
applied.
Solution #1 This can be accomplished by applying the technique in
Jon’s article Making Regular Charts from PivotTables. With that
technique you basically create a regular chart and then carefully add
the data series to the chart by referencing areas within the
PivotTable. You just have to be careful with the areas you select or
reference because Excel has a tendency to want to convert the regular
chart to a PivotChart.
Solution #2 The other option is to create a new area on the worksheet
that contains a replica of the PivotTable. This area just contains
formulas that reference the PivotTable. You can either use the direct
cell references like (=C9) or the GETPIVOTDATA() function to point to
the PivotTable. You might want to use the GETPIVOTDATA function if
you only want to display a subset of your PivotTable data in the
chart.
The advantage of this technique is that once you have the formula
based PivotTable setup, you can reference the entire area of the
source data range to quickly create a chart that includes all your
series. It might save you time over having to add the series
individually as you do in solution #1.
Slicer filters the data, so Excel only sees the filtered results and applies the colour mapping to them without knowing how many results it skips, hence the strange colouring system.
One solution (but it doesn't use a slicer) is to set the data value of a pie slice to zero. This way the data is still rendered, but as a zero-width slice, and the colour count increases as normal.
Is there a way through VBA or some other excel functionality of which I'm unaware where you can update a filtered pivot chart based on keying in a value to a given cell (like a prompt) as opposed to a slicer? (Or is there some other dynamic chart option other than a pivot chart that will allow the charts to changed based on input values?)
The slicer is too visually busy for what I'm wanting to do. I've also looked into the "search box" trick, but I'd rather just update the chart based on an input value to a specific cell.
To try to add some code to help explain... If this were a (very simple) SQL query, it would look something like this with the ? prompt set to a specific cell but it would obviously return a chart (and with a time element not in the SQL) instead of a query:
SELECT A.Unit, SUM(A.Amount)*-1
FROM Table A
WHERE (A.Unit = ?)
GROUP BY A.Unit
HAVING (Sum (A.Amount) <> 0)
ORDER BY 2
As always, I apologize if this type of question has already been answered and if I just haven't found it. Any help would be greatly appreciated!
EDIT: I'm only looking to dynamically update a chart based on an input cell. I can and have used SUMPRODUCT to get the same information on another tab in a normal spreadsheet, non-chart format. I want to make a line-chart with the time element on the X-Axis, and the unit filter (as seen in the query above) be an individual input cell as opposed to a bulky slicer. I would share images if possible, but I can't without creating a link.
Not sure how complicated your data are, but could you just use SUMIFs formulas?
Cell H2 formula:
=SUMIFS(D:D,A:A,$H$1,B:B,$G2)
I have an excel file that contains 6 different sheets and every sheet contains some cells that there's text value inside them.
Now, I want to draw a chart that shows how many times a string was revealed in a larger string.
As much as I could find in google search, excel will draw charts based on numeric values,
So, I need to know is there a way that draw a chart based on text with my criteria?
Thanks in advance
UPDATE :
Assume that I have values like this:
And I need to know how many times a string appeared in B cells for every program.
And What if program name was in another sheet and string col was in someone else.?
No, Excel cannot chart anything based on text. You need numbers. In order to get these numbers you can apply different techniques, like formulas or VBA to analyse the text and produce the respective numbers. If you need more detail, provide more detail about your data.
Edit after question update: Consider this screenshot
the formula in C2 is
=ISNUMBER(SEARCH($G$1,B2))*1
The table in columns F and G is a pivot table with "Program" dragged to the rows area and "found" dragged to the values area and set to sum. This table can be used for charting.
If the program and the string are in two different sheets, you can still use formulas to construct a data source for the pivot table.
I have several data in excel sheet and I wonder if its possible (through macros or something else) to select the data and display the series needed.
I'm not quite sure if I explained the situation correctly...
But I have multiple curves, and instead of plot the average curve or single curves, I would like to have the option to plot: curve 1, curve 2, curve 3, average curve...
Kind regards,
DNA
My preferred way to do this is with a combination of a couple of ideas. In general, Excel charts are easiest to maintain if they are looking at a simple range instead of complicated named ranges. Given this, I like to create a simple column of data for the chart and then use other Excel features to modify that column of data.
Note that the steps below are for a specific case of a block of data all on one sheet. There are a ton of variations that you can do to make this work for other configurations. The idea is simple: create a new column of data for the chart and use normal formulas to get the data there. You can make the x-axis a selector as well.
For the simple case of a common x-axis with varying series for the y-axis all in one block of data, I do these steps:
Start = block of data
Add a column header off to the side which will "drive" the selection. I like to make this a Data Validation drop down so that the selection is correct. I did this in G2, selecting the column headers as the Source.
With this in place, you can use the selection there to update the data in the column below it. A simple formula for doing this uses INDEX.
Formula in G3, copied down to end of data: =INDEX($C$3:$E$25,,MATCH($G$2,$C$2:$E$2,0))
This formula works by finding the column name in the list of column headers and returning that column of data. Since the row selection is blank ,,, it relies on the relative position of the cell which works since everything is lined up.
Once this is done, you can then create the chart simply using the date and the new column of data. It will respond to changes in the selector which works nicely. If you use the column G header as the series name, that will update too which is a good effect for free. Below is the chart showing the ranges it is using.
I have a long list of schools that I would like to conditionally format. I would like each school to have a heavy border around and different color bands per school to set if apart. Can this be done in Excel? If so, how? Thank you.
Assuming your data is sorted (it will look pretty ugly if it isn't) select the columns you want to format. Go to conditional formatting > New Rule > Use a formula to determine which cells to format. In the formula field type =IF($B2<>$B1,TRUE,FALSE) and set your format to set the border beneath each school. As for the alternating row colors, depending on how many schools you have do the same steps as above but use =IF($B1="AB Elementary",mod(row(),2),FALSE) in the formula. Repeat for each unique school name.