Managing volatile utility costs is challenging, especially when trying to isolate peak demand periods from standard billing data. While monthly utility bills provide a basic overview, utilizing targeted Excel formulas grants energy managers the precise, granular insights needed to identify peak-shaving opportunities. This analysis stipulates that your interval data is consistently formatted with clear timestamps. For example, using the formula =AVERAGEIFS(Consumption_Range, Time_Range, ">=13:00", Time_Range, "<=17:00") effectively isolates a 1 PM to 5 PM peak window. Below, we will step-by-step explore how to configure this formula to optimize your load profiling.
Managing and analyzing energy consumption is a critical task for facilities managers, sustainability officers, and homeowners looking to optimize utility costs. Many electric utilities charge premium rates-known as Time-of-Use (TOU) or peak tariffs-during periods of high demand. Typically, these peak hours occur during late afternoon and early evening, when grid strain is at its highest.
To identify cost-saving opportunities or evaluate the impact of energy efficiency measures, you need to isolate and analyze your energy usage during these specific periods. Microsoft Excel is an exceptional tool for this task. By leveraging formulas such as AVERAGEIFS, FILTER, and time-stripping mathematical operations, you can easily calculate your average energy consumption during peak hours. This comprehensive guide will walk you through setting up your data, building the formulas, and troubleshooting common time-formatting issues in Excel.
Before writing formulas, your raw data must be structured correctly. Typically, smart meters and energy monitoring systems export data in intervals (e.g., 15-minute, 30-minute, or hourly intervals) consisting of timestamps and consumption metrics (measured in kilowatts, kW, or kilowatt-hours, kWh).
Let's assume a standard dataset with the following structure:
2023-10-24 14:00).For our examples, we will define Peak Hours as 13:00 (1:00 PM) to 19:00 (7:00 PM).
---If your dataset already separates the Date and Time into distinct columns, or if you are working with a single day's cycle where only time matters, the AVERAGEIFS function is the most straightforward tool to use.
The syntax for AVERAGEIFS is:
=AVERAGEIFS(average_range, criteria_range1, criteria1, [criteria_range2, criteria2], ...)
Assume your time values are in Column B (formatted as Time) and your consumption values (kWh) are in Column C.
=AVERAGEIFS(C2:C100, B2:B100, ">=13:00", B2:B100, "<=19:00")
C2:C100 where the corresponding time in B2:B100 falls between 1:00 PM and 7:00 PM, inclusive.Hardcoding times into formulas is generally not recommended because peak windows can change seasonally. Instead, reference specific cells containing your peak start and end times:
13:00)19:00)Use this dynamic formula:
=AVERAGEIFS(C2:C100, B2:B100, ">="&F1, B2:B100, "<="&F2)
---
Most industrial meters export date and time merged into a single cell (e.g., 10/24/2023 14:30). Because Excel stores dates as whole numbers and times as decimal fractions (e.g., 12:00 PM is represented as 0.5), a direct AVERAGEIFS comparison against simple time values like 13:00 will fail.
To solve this, we can extract the time component using the MOD function or utilize helper columns.
Adding a helper column simplifies complex calculations and keeps your spreadsheet running fast, especially with large datasets spanning months or years.
A2, enter this formula in your helper column (cell B2):
=MOD(A2, 1)
Note: The MOD function with divisor 1 removes the integer portion (the date) and leaves only the decimal remainder (the time).
AVERAGEIFS formula referencing this new column:
=AVERAGEIFS(C2:C100, B2:B100, ">=13:00", B2:B100, "<=19:00")
If you are using a modern version of Excel and prefer not to use helper columns, you can use the dynamic array function FILTER paired with MOD to perform the calculation on the fly:
=AVERAGE(FILTER(B2:B100, (MOD(A2:A100, 1)>=TIME(13,0,0)) * (MOD(A2:A100, 1)<=TIME(19,0,0))))
How this works:
MOD(A2:A100, 1) extracts the time components from the entire timestamp range.*) acts as an AND condition, ensuring that only rows meeting both conditions (after or at 13:00 AND before or at 19:00) are returned.FILTER isolates those consumption values, and AVERAGE computes their mean.Many commercial energy tariffs only apply peak-hour rates on weekdays (Monday through Friday). To accurately calculate your average peak consumption, you must filter out weekend entries.
You can achieve this easily by incorporating the WEEKDAY function into your worksheet.
C2 (assuming your timestamp is in A2), enter:
=WEEKDAY(A2, 2)
Note: Setting the return type to "2" maps Monday to 1 and Sunday to 7. Therefore, any value less than or equal to 5 is a weekday.
AVERAGEIFS formula to check this weekday status:
=AVERAGEIFS(Consumption_Range, Time_Range, ">=13:00", Time_Range, "<=19:00", Weekday_Range, "<=5")
This ensures your resulting average is an accurate reflection of weekday operational costs, preventing weekends from artificially lowering your peak analysis average.
---When working with energy data exports, you are likely to run into data type mismatches. Here are the most common issues and how to fix them:
If your AVERAGEIFS formula returns a #DIV/0! error, Excel likely isn't recognizing your times as numeric values. To test this, use the formula =ISNUMBER(A2). If it returns FALSE, your dates/times are text.
If your smart meter records data precisely on peak transitions (e.g., 13:00:00), decide whether to include or exclude that boundary. Adjust your comparison operators accordingly: use ">" (greater than) instead of ">=" (greater than or equal to) if you need strict boundary isolation.
By mastering these Excel formulas, you can quickly analyze utility interval data to pin down average consumption metrics during expensive peak demand periods. Whether using a simple AVERAGEIFS, an advanced FILTER array, or helper columns with the MOD and WEEKDAY functions, isolating high-cost windows allows you to make informed decisions about energy curtailment, battery storage scheduling, or shifting operations to off-peak periods.
Disclaimer:
The documents and templates provided on this page are for informational and illustrative purposes only. They do not constitute professional, legal, or financial advice, and should not be relied upon as such. Because individual circumstances and regulatory requirements vary, these materials may not be suitable for your specific needs. We recommend consulting with a qualified professional before adapting or using any of these examples for official or commercial purposes.