Function Problems

Excel SUMIFS Formula to Sum Vendor Spending by Month

Chanuka GeekiyanageChanuka Geekiyanage Nov 18, 2026 869 views

Question details

Use one formula to retrieve total spending for a specified vendor and month from a table with vendors in rows and months in columns.

Sum Vendor Spending by Month in Excel with SUMIFS
Product
Microsoft Excel
Device & OS
not provided
Scenario
Vendor names are listed in column A, month headers are in row 1, and spending amounts are arranged under each month.
Observed behavior
The desired result is the sum of amounts for the selected vendor in the selected month column.
Before you start

Check that vendor names are in A2:A100, month headers are in B1:M1, and amounts are in B2:M100. Ensure the selected month matches its header value, including the underlying date if the headers are dates.

Solution 1Recommended

Use SUMIFS with INDEX and MATCH to select the month column

Use this formula when months are separate columns and a vendor may appear in more than one row.

1
Enter the criteria

Enter the vendor name in O2 and the month to look up in O3. The month value must match a header in B1:M1.

2
Enter the formula

Select an empty result cell and enter =SUMIFS(INDEX($B$2:$M$100,0,MATCH(O3,$B$1:$M$1,0)),$A$2:$A$100,O2).

3
Check the result

Press Enter. MATCH finds the month column, INDEX supplies that column to SUMIFS, and SUMIFS adds the amounts for matching vendor rows.

4
Adjust the ranges if needed

Edit the ranges in the formula to fit your table. Keep the vendor range and amount range aligned on the same rows.

Use SUMIFS with INDEX and MATCH to select the month column
Month matching: MATCH uses an exact match and returns the first matching month header. If the formula returns #N/A, check that O3 and the header have the same underlying value.
WPS Spreadsheets

Calculate Vendor Spending by Month in WPS Spreadsheets

Open your workbook in WPS Spreadsheets and use SUMIFS with INDEX and MATCH to total a vendor's spending in the selected month column.

  1. 1. Open the workbook: In WPS Spreadsheets, choose Open and select your Excel workbook.
  2. 2. Enter the criteria: Enter the vendor name in O2 and the matching month header value in O3.
  3. 3. Add the formula: Select an empty cell and enter =SUMIFS(INDEX($B$2:$M$100,0,MATCH(O3,$B$1:$M$1,0)),$A$2:$A$100,O2).
  4. 4. Review and save: Press Enter to display the total, then choose Save or Save As to save the workbook.
Sum matching vendor rows for a selected monthOpen and edit Microsoft Excel XLSX and XLS filesUse familiar spreadsheet formulas and menusWork with a free, lightweight office suite
QA img-9

Frequently Asked Questions

Why does the formula return #N/A?

MATCH cannot find the value in O3 in B1:M1. Check for differences in spelling, spaces, or underlying date values, even if the displayed month looks the same.

What happens if a vendor appears in multiple rows?

SUMIFS adds all amounts in the selected month column for rows whose vendor name matches O2.

Can I use SUMIFS if my data has separate Vendor, Month, and Amount columns?

Yes. For example, if those columns are A, B, and C, use =SUMIFS(C2:C100,A2:A100,O2,B2:B100,O3).

What if the same month header appears more than once?

MATCH(O3,$B$1:$M$1,0) selects the first exact match. Make the headers unique or adjust the formula to target the intended column.