## Tuesday, May 27, 2014

### Creating an Automatically Updating Histogram in 7 Steps in Excel With Formulas and a Bar Chart

This is one of the following two articles on creating Histograms in Excel

Creating a Histogram With the Histogram Data Analysis Tool in Excel

Creating an Automatically Updating Histogram in 7 Steps in Excel With Formulas and a Bar Chart

# Creating an Automatically Updating Histogram in 7 Steps in Excel With Formulas and a Bar Chart

A histogram ultimately provides the count of observations in each bin. These bin counts can be obtained using Excel formulas as follows:

(Click on Image to See an Enlarged Version)

There are two formulas that will provide the bin counts. The COUNTIFS() formula works in Excel versions 2007 and later. The SUMPRODUCT() formula works in previous Excel versions and the current version as well.

Cell J4 contains the following formula:

=COUNTIFS(\$F\$4:\$F\$29,”>-2.5”,\$F\$4:\$F\$29,”<=-1.5”)

The COUNTIFS() formula counts the rows in the given range that all of the listed criteria are met. In this case the COUNTIFS() formula will count all rows from 4 to 29 in which the data in F4:F29 is both greater than –2.5 and less than or equal to –1.5. The syntax for the formula is the following:

COUNTIFS(range 1, criteria 1, range 2, criteria 2, ….)

The ranges must all have the same rows.

(Click on Image to See an Enlarged Version)

In this example the following histogram bar chart will be created from the X-Y data in cells I4 to J8 that contain the bins counts.

(Click on Image to See an Enlarged Version)

### Step 1 – Highlight the Y Data

Select the data in cells J4 to J8.

### Step 2 – Select Chart Type

Make the following selections:

Insert tab / Column / 2-D Clustered Column

(Click on Image to See an Enlarged Version)

This produces the following basic bar chart:

(Click on Image to See an Enlarged Version)

### Step 3 – Insert X-Axis Data

Right-click anywhere in the chart and choose Select Data as follows:

(Click on Image to See an Enlarged Version)

This brings up the following dialogue box. Under the label Horizontal (Category) Axis Labels on the right side, select the Edit button.

(Click on Image to See an Enlarged Version)

This brings up a blank Axis Labels dialogue box as follows:

(Click on Image to See an Enlarged Version)

Select the X-Axis data in cells I4 to I8 as follows:

(Click on Image to See an Enlarged Version)

This produces the following labels for the X-Axis:

(Click on Image to See an Enlarged Version)

Format these labels by right-clicking on the X-Axis, select Bold, and then set the font size in the cell font dialogue box as follows:

(Click on Image to See an Enlarged Version)

This produces the following X-Axis:

(Click on Image to See an Enlarged Version)

### Step 4 – Delete the Legend

Select the legend and delete it.

(Click on Image to See an Enlarged Version)

### Step 5 – Insert Chart Title

Click anywhere on the chart to bring up the Chart Tools menu. Choose the Layout tab / Chart Title / Above Chart as follows:

(Click on Image to See an Enlarged Version)

This creates up the following basic chart title:

(Click on Image to See an Enlarged Version)

Highlight the text and type in the correct title as follows:

(Click on Image to See an Enlarged Version)

### Step 6 – Insert X-Axis Label

Right-click anywhere on the chart to bring up the Chart Tools menu. Choose Layout tab / Axis Titles / Primary Horizontal Axis / Title Below Axis as follows:

(Click on Image to See an Enlarged Version)

Highlight the basic X-Axis label that appears. Type in the correct X-Axis text, select Bold, and select the correct font size as follows:

(Click on Image to See an Enlarged Version)

### Step 7 – Insert Y-Axis Label

Right-click anywhere on the chart to bring up the Chart Tools menu. Choose Layout tab / Axis Titles / Primary Vertical Axis / Horizontal Title as follows:

(Click on Image to See an Enlarged Version)

After correcting the Y-Axis label by typing in the correct text, making it Bold, and setting the correct font size as was just done for the X-Axis label, the final bar graph will appear as follows:

(Click on Image to See an Enlarged Version)

Excel Master Series Blog Directory

Statistical Topics and Articles In Each Topic

• Histograms in Excel
• Bar Chart in Excel
• Combinations & Permutations in Excel
• Normal Distribution in Excel
• t-Distribution in Excel
• Binomial Distribution in Excel
• z-Tests in Excel
• t-Tests in Excel
• Hypothesis Tests of Proportion in Excel
• Chi-Square Independence Tests in Excel
• Chi-Square Goodness-Of-Fit Tests in Excel
• F Tests in Excel
• Correlation in Excel
• Pearson Correlation in Excel
• Spearman Correlation in Excel
• Confidence Intervals in Excel
• Simple Linear Regression in Excel
• Multiple Linear Regression in Excel
• Logistic Regression in Excel
• Single-Factor ANOVA in Excel
• Two-Factor ANOVA With Replication in Excel
• Two-Factor ANOVA Without Replication in Excel
• Randomized Block Design ANOVA in Excel
• Repeated-Measures ANOVA in Excel
• ANCOVA in Excel
• Normality Testing in Excel
• Nonparametric Testing in Excel
• Post Hoc Testing in Excel
• Creating Interactive Graphs of Statistical Distributions in Excel
• Solving Problems With Other Distributions in Excel
• Optimization With Excel Solver
• Chi-Square Population Variance Test in Excel
• Analyzing Data With Pivot Tables
• SEO Functions in Excel
• Time Series Analysis in Excel
• VLOOKUP