3

I am using histogram and correlation functions in Analysis Toolpak and need the results to be updated as I change my input data or references. Is this possible in some way?

thanks

2 Answers 2

2

Yes, you can do this with the Frequency function. Run the Histogram tool once to set up the bins and initial frequencies. You probably want a chart, so make sure to check the Chart Output option.

Now, select the frequencies and type (for example) =FREQUENCY(D1:D41,H3:H9). Replace the first argument with the range that contains your data, and the second argument with the range of your bins. The output of Frequencyis an array, so you need to select all of your frequencies before enter the function and then use Shift+Ctrl+Enter to enter the function.

This will dynamically update the frequency counts based on the initial bins. If you want, you could also calculate the bin ranges using some formula that creates them using a suitable methodology.

You can create your own histogram chart using the same bins and frequencies. Just calculate them as above, and then create a Column chart of the frequencies with the bins as the x-axis labels. This way you don't rely on the Histogram tool at all.

2
  • thanks. is it possible not to specify bins in frequency function and have it compute bins similar to what histogram does if bins are not specified
    – user236215
    Commented Feb 19, 2012 at 1:03
  • No, you always have to group the data somehow. If you didn't then your histogram would have one column for each data point with a frequency of 1 for each of them. In other words, it wouldn't contain any useful information. The Histogram tool has some algorithm by which it chooses the bins if you don't specify them. If you want an automatically updating histogram, then you have to use the Frequency function or roll your own formula.
    – Tim Mayes
    Commented Feb 19, 2012 at 7:07
0

Instead of using the Analysis Toolpak, you can use a pivot table (and PivotChart) to create a histogram:

1) Put your data into both the "Rows" and "Sum" areas of the pivot table.

2) Click somewhere in the pivot table column that has your row data (not the count of your data) and select "Group".

3) Use the "Group" dialog box to set your bin parameters.

Note: with this solution, your data is not exactly updated automatically. You need to click within the PivotTable, then select "Analyze > Refresh".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.