How To Use SumIF in Microsoft Excel Tutorial

How to Use SUMIF Function for Automatic Accounts Management in Excel

Welcome back to another Microsoft Excel tutorial! In this guide, we will explore how to utilize the SUMIF function to create an automated accounts management system right inside your Excel worksheets. By the end of this tutorial, you’ll be able to calculate balances not just for individual cells but for entire columns of data, making your financial record-keeping a breeze.


In our sample Excel workbook, we have four worksheets: Voucher Types, Groups, Ledgers, and Daybook. The Daybook worksheet contains daily transactions, while the Ledgers and Groups worksheets are used to calculate closing balances using the SUMIF function. Let’s dive into the details and learn how to set up this automated accounting system.

Defining Names in Excel

Before we start, it’s important to understand the concept of defining names in Excel. By naming specific cells or entire columns, you make it easier to reference and use that data within your formulas. Here’s how you can do it:

  1. Select the cell range or column that you want to name.
  2. Type the name you want to apply in the Name Box, which is available just below the ribbon.
  3. Press the Enter key to save the name.

To edit or delete these names, you can use the Name Manager, which is accessible under the Formulas tab. Using named ranges and auto lists is crucial when working with the SUMIF function, as it helps ensure consistent spellings and efficient data entry.

Creating Auto Lists

Creating auto lists in Excel can save you time and maintain data consistency. You can set up auto lists for columns where you want to select data from predefined options. Here’s how to create an auto list:

  1. Select the cells or column where you want the auto list to appear.
  2. Go to the Data tab and select Data Validation.
  3. Under validation criteria, choose “List.”
  4. In the source field, type the name from which you want to fetch the list, ensuring you place an equal sign before the name.

By creating auto lists, you avoid the need to type data manually and prevent discrepancies in spelling. This is particularly important when using the SUMIF function.

The SUMIF Function

The SUMIF function is a powerful tool for calculating sums based on specific criteria. It requires three main components:

  1. Range: The data range where you want Excel to search for values.
  2. Criteria: The condition you want to apply to filter the data.
  3. Sum Range: The range containing the values you want to sum.

For example, you can instruct Excel to:

  • Examine the entire B column of the Daybook worksheet as the range.
  • Find all values equal to a specific cell in the Ledgers worksheet (criteria).
  • Sum up the values from a specific column in the Daybook worksheet (sum range).

Example of Using SUMIF

Let’s look at an example of how we use the SUMIF function in our automated accounting system:

Suppose we want to calculate the debit balance for the “Building Account” in the Ledgers worksheet. We define our SUMIF function as follows:

  • Range: Entire B column of the Daybook worksheet.
  • Criteria: Cell A2 in the Ledgers worksheet (which contains “Building Account”).
  • Sum Range: Column E in the Daybook worksheet.

Excel will search the Daybook for all entries matching “Building Account” in the Ledger worksheet and sum up the values in column E. In this case, the sum of debit amounts is $8,000.

Handling Debit and Credit Transactions

In our system, we calculate debit and credit balances, and we need to ensure that the balance does not appear as negative. To do this, we use an IF statement. The formula can be summarized as follows:

  • If the credit amount is greater than the debit amount, it subtracts the debit amount from the credit amount.
  • If the debit amount is greater than the credit amount, the closing balance is “Debit”; otherwise, it’s “Credit.”

This formula prevents negative balances and indicates whether the account is in debit or credit. It’s a handy addition to your automated accounting system.


The SUMIF function, when combined with named ranges and auto lists, can streamline your accounting processes in Excel. This tutorial has shown you the power of automating balance calculations for ledger accounts and groups. By following the steps outlined, you can create a robust accounts management system right inside your Excel worksheets.

We hope you found this tutorial informative and helpful. If you did, please consider liking, sharing, and commenting on this video. Your feedback is greatly appreciated, and we look forward to bringing you more tutorials in the future. Thanks for watching, and until next time, take care!

Download Sample Workbook For SUMIF Function

Leave a Reply