Deduct Vacation Hours from a Balance with an Excel Formula
Question details
Calculate a remaining vacation balance by deducting eight hours for each V recorded on a calendar.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- An employee or period is identified by a calendar column header, and vacation days are marked with V in the cells below it.
- Observed behavior
- The desired balance should update as V entries are added or removed from matching calendar columns.
Confirm that I2 contains the starting balance in hours, H2 contains the employee or period to match, and B1:E1 contains the corresponding calendar headers. The calendar entries should be in B2:E28, with each V representing eight vacation hours.
Use SUMPRODUCT to deduct hours from matching calendar columns
Use this formula when calendar column headers identify the employee or period and each V represents eight hours.
Click a blank cell such as J2 for the remaining balance. Keep the starting balance in I2 so the formula does not refer to itself.
In J2, enter =I2-SUMPRODUCT(($B$1:$E$1=H2)*($B$2:$E$28="V")*8) and press Enter.
Enter V in a cell under a header matching H2 and confirm that the result decreases by eight hours. Adjust the header and calendar ranges to fit your workbook.

Track remaining vacation hours in WPS Spreadsheets
Use WPS Spreadsheets to subtract eight hours for each V in an employee's calendar column. Open an Excel workbook, enter a COUNTIF formula, and save the updated balance.
- 1. Open the workbook: Open WPS Spreadsheets and select File > Open to choose your Excel workbook.
- 2. Identify the employee column: Find the employee's calendar column, such as B2:B28, and enter the starting balance in I2.
- 3. Calculate the balance: Click J2, enter =I2-COUNTIF(B2:B28,"V")*8, and press Enter. Change B2:B28 to the employee's calendar range.
- 4. Save the workbook: Select File > Save or Save As to keep the formula in the workbook.

Frequently Asked Questions
How do I calculate the balance for one calendar column?
If the starting balance is in I2 and the employee's entries are in B2:B28, enter =I2-COUNTIF(B2:B28,"V")*8 in a blank cell.
What if a vacation day is not eight hours?
Replace 8 in the formula with the number of hours represented by each V. If vacation entries have different durations, record their hours separately and sum those values instead.
Can the calendar and balance be on different worksheets?
Yes. Prefix the calendar ranges with the sheet name. For example, use Calendar!$B$1:$E$1 and Calendar!$B$2:$E$28 when the calendar is on a sheet named Calendar.
Why doesn't the balance update after I add a V?
Check that the V is inside the formula's calendar range and under a header matching H2. In Excel, also check Formulas > Calculation Options and select Automatic.




