How to Get Last Working Day In Month in Excel

Learn multiple Excel methods to get last working day in month with step-by-step examples and practical applications.

excelformulaspreadsheettutorial
11 min read • Last updated: 7/2/2025

How to Get Last Working Day In Month in Excel

Why This Task Matters in Excel

Every payroll clerk, project manager, and financial analyst eventually confronts the same calendar‐driven question: “What is the last working day of this month?” Pay slips need to be dated on the last business day, invoices must reference the final trading day, cash flow forecasts rely on business‐day cut-offs, and project deadlines are often tied to the final weekday rather than the literal end‐of-month date. Without a quick, reliable way to find this date in Excel, teams risk late payments, inaccurate accruals, and compliance issues.

Imagine you run payroll for an international company. Salaries must hit employee bank accounts on the final weekday. If the month ends on a Saturday, you cannot wait until Monday because that becomes the following month. Equally, corporate treasuries forecast cash balances against the last trading day to report accurate liquidity. In supply‐chain planning, purchase orders closing on a weekend trigger confusion with suppliers, whereas anchoring deadlines on the final working day keeps shipments on schedule.

Across industries—banking, manufacturing, professional services—Excel serves as the de-facto calendar engine. Its date system, combined with built-in business-day functions, means you can compute the required cut-off once and reuse the formula across models, dashboards, and templates without resorting to external tools. By mastering this single skill, you reinforce broader competencies: date arithmetic, financial modeling best practices, and error‐proof workflow automation. Overlooking the distinction between calendar and business days leads to misaligned KPIs, late filings, and damaged credibility. Therefore, knowing how to get the last working day in a month is both a tactical and strategic Excel proficiency.

Best Excel Approach

The most reliable technique combines two powerhouse functions—EOMONTH and WORKDAY—to zero in on the final business day regardless of weekends or custom holiday calendars.

Logical flow:

  1. EOMONTH returns the actual month-end date.
  2. Add one day, shifting to the first calendar day of the next month.
  3. Ask WORKDAY to step backward one business day from that position.
    Because WORKDAY counts forward when given a positive integer and backward when given a negative integer, −1 brings you to the last working day in the prior month.

Syntax for the flagship approach:

=WORKDAY(EOMONTH(A1,0)+1,-1,Holiday_List)
  • A1: Any date inside the target month
  • 0: Offset in months (0 keeps the same month, 1 moves one month ahead, −1 goes one month back)
  • +1: Moves to the first day of the next month
  • −1: Steps back one working day
  • Holiday_List (optional): Range of company holidays to skip

Why it’s best

  • Handles month length variability (28–31 days) automatically.
  • Reads your regional weekend definition via WORKDAY.INTL, so it adapts if your weekend is Friday–Saturday instead of Saturday–Sunday.
  • Accepts a dynamic holiday list, ensuring true “working” day precision.

Alternative if you need custom weekends:

=WORKDAY.INTL(EOMONTH(A1,0)+1,-1,"0000011",Holiday_List)

The “0000011” weekend code marks Saturday and Sunday as non-working. Change the pattern to suit local calendars.

Parameters and Inputs

  • Input date: Any valid Excel date serial number or date‐formatted value residing in cell A1 (or another cell you choose).
  • Holiday_List: An optional range such as [Holidays!A2:A20] holding non-working days like national holidays, company shutdowns, or ad-hoc closures. The range can be vertical or horizontal; WORKDAY/WORKDAY.INTL auto-detect orientation.
  • Weekend pattern: Only for WORKDAY.INTL. Use the predefined weekend string or numeric code. Example string “0000011” reads left to right, Monday through Sunday, where 0 means working and 1 means weekend.
  • Data preparation: Ensure the input cells are genuine dates, not text. Apply a “Short Date” or “Long Date” format to confirm.
  • Validation: Restrict user inputs with Data Validation > Date, requiring a start date between [1/1/1900] and [12/31/9999] to match Excel’s date system.
  • Edge cases:
    – If the actual month-end is itself a weekday and not on the holiday list, the function returns that exact date.
    – If the month ends on a holiday, WORKDAY automatically skips backward to the previous valid business day.
    – Passing an empty holiday list argument still works; Excel just ignores holidays.

Step-by-Step Examples

Example 1: Basic Scenario

You manage a small consultancy and want salary payments to post on the last business day every month.

  1. Sample data setup
  • Cell A2: 3/15/2025 (any random date in March 2025)
  • Cell B2: Holiday list header “Holidays”
  • [B3:B5]: 3/31/2025 (Easter Monday), 4/18/2025 (Good Friday), 12/25/2025 (Christmas)
    Format column B as Date.
  1. Formula entry
  • In C2, label header “Last Working Day”.
  • In C3, enter:
=WORKDAY(EOMONTH(A2,0)+1,-1,$B$3:$B$5)
  1. Explanation of results
    – EOMONTH(A2,0) returns 3/31/2025, a Monday.
    – Add 1 day: becomes 4/1/2025.
    – WORKDAY backs up one weekday ignoring weekends and any holiday in [B3:B5]. Since 3/31/2025 is actually listed as a holiday, the formula jumps to 3/28/2025 (Friday).
  2. Visual check
    Highlight C3 and apply “Long Date” format; you should read “Friday, March 28, 2025”.
  3. Common variations
    – Remove the holiday list to see the output change back to Monday if not a weekend.
  4. Troubleshooting
    – If you see a #VALUE! error, confirm dates are genuine. Selecting the cell and checking the formula bar should show a numeric serial like 44863.

Example 2: Real-World Application

A multinational bank closes its books on the last trading day, where the trading week runs Sunday–Thursday, and it observes both public holidays and regional market holidays.

  1. Data layout
    Sheet: “Calendar”
  • A2:A13: Twelve dates representing the first day of each month in fiscal year 2026.
  • B2:B13: Formula placeholder titled “Last Trading Day”.
    Separate sheet “Holidays” lists holiday dates in [Holidays!A2:A40].
  1. Weekend pattern
    In the Middle East, Friday and Saturday are weekends. The corresponding WORKDAY.INTL code string is “0000110” (Friday=1, Saturday=1).
  2. Enter formula in B2 and copy down:
=WORKDAY.INTL(EOMONTH(A2,0)+1,-1,"0000110",Holidays!$A$2:$A$40)
  1. Walk-through for April 2026 (row 4)
    – EOMONTH returns 4/30/2026 (Thursday).
    – +1 becomes 5/1/2026 (Friday).
    – WORKDAY.INTL steps back one business day. Friday is weekend, so it lands on Thursday 4/30/2026. If that Thursday matches a holiday in the list (e.g., Eid), WORKDAY.INTL backtracks until it lands on Wednesday or earlier.
  2. Business impact
    Automation of month-end ledger closures saves hours of manual checking across nine subsidiaries. A centralized holiday table refreshed yearly suffices for every formula, ensuring regulatory filings are stamped correctly.
  3. Performance
    A monthly schedule for an entire fiscal year (12 rows) recalculates instantly. Even if you scale to 10,000 dates—one per account or product—the calculation time remains negligible.

Example 3: Advanced Technique

You oversee revenue recognition for a global software company. Quarterly reports must reference the last US working day, except if the parent company decides to accelerate revenue to the second-to-last working day when quarter-end falls on a Friday (to avoid late evening cut-offs).

Create a more flexible function using LET and LAMBDA (Microsoft 365) to parameterize the Nth working day from month end.

  1. Insert in Name Manager:
  • Name: NthWorkdayMonthEnd
  • Refers to:
=LAMBDA(Date_In_Month, N, Holidays,
  LET(
    MonthEnd, EOMONTH(Date_In_Month,0)+1,
    WORKDAY(MonthEnd, -N, Holidays)
  )
)
  1. Usage in sheet
    – Cell A2: 6/17/2025
    – Cell B2: 1 (for last working day)
    – Cell C2: Named range Holidays2025 [Holidays!A2:A20]
    – Formula in D2:
=NthWorkdayMonthEnd(A2,B2,Holidays2025)
  1. Conditional logic
    – Another column E flags if the result falls on Friday:
=IF(TEXT(D2,"ddd")="Fri",NthWorkdayMonthEnd(A2,2,Holidays2025),D2)

This instantly updates to the second-to-last business day whenever required, removing manual overrides.
4. Professional tips
– Encapsulating logic inside LAMBDA keeps worksheets clean, reduces risk of typos, and propagates uniformly across departments.
– LET binds intermediate variables, improving readability and performance for large-scale calculations.
5. Error handling
– Defend against negative or zero N by wrapping N in MAX(N,1).
– If Holidays range is omitted, supply an empty two-cell range [Z1:Z2] to avoid #VALUE!.

Tips and Best Practices

  1. Centralize Holiday Lists: Maintain a single worksheet “Holidays” with future years stacked vertically. Name the range dynamically using OFFSET so formulas auto-extend.
  2. Use Named Ranges: Reference names like MonthEndHolidays rather than hard-coding coordinates. It prevents breakage when sheets expand.
  3. Prefer WORKDAY.INTL Over WORKDAY: The INTL version covers every possible weekend configuration without helper formulas.
  4. Combine With TEXT for Readability: Wrap the final date in TEXT(…,\"ddd, mmm d\") in report headers so managers instantly see the weekday.
  5. Dynamic Arrays for Audit: Spill the last ten working days with SEQUENCE and FILTER to validate month-end logic quickly.
  6. Document Assumptions: Place a visibly formatted note near the holiday range saying “Weekend pattern = Friday–Saturday”. Auditors love clear assumptions.

Common Mistakes to Avoid

  1. Treating Holidays as Text: Typing “1 Jan 2026” left-aligned creates text. Import using Data > From Table or pre-format as Date to avoid #VALUE! errors.
  2. Forgetting to Add One Day Before WORKDAY: Inputting WORKDAY(EOMONTH(A1,0),0,…) returns the next month’s first business day, not the last of the current month. Always +1, then −1.
  3. Wrong Weekend Code Order: In WORKDAY.INTL, the string starts with Monday. Misplacing 1s and 0s flips the weekend logic. Double-check pattern visuals.
  4. Fixed Holiday Range: Hard-coding [A2:A15] means 2027 dates will be out of range. Convert to structured tables or dynamic named ranges.
  5. Copy/Paste Without Absolute References: Relative ranges shift row-by-row, causing missing holidays. Lock ranges with $ signs or names.

Alternative Methods

MethodProsConsBest Use Case
WORKDAY + EOMONTHSimple, Excel 2007+ compatible, no custom weekend support required if Sat–Sun standardWeekend hard-coded Sat–SunWestern calendars with few variations
WORKDAY.INTL + EOMONTHHandles any weekend, holiday input, Excel 2010+Slightly longer syntaxGlobal organizations, non-standard weekends
NETWORKDAYS + EOMONTHWorks when you need count rather than date; can back into the date via INDEXTwo-step, less intuitiveWhen you already use NETWORKDAYS elsewhere
Power Query Calendar TablePoint-and-click GUI, refreshableRequires loading to sheet or data model, not volatile inlineData models feeding Power BI or pivot tables
VBA UDFUltimate flexibility (Nth working day, fiscal calendars)Requires macro-enabled file, security promptsLegacy models, custom fiscal calendars

Performance is similar for first three approaches at normal scale. Power Query suits heavy ETL pipelines, whereas VBA should be a last resort given security overhead.

FAQ

When should I use this approach?

Use it any time a due date, payment date, or reporting date must land on a legitimate business day. Typical scenarios: payroll cut-offs, accounts payable runs, regulatory filings, and project milestone planning.

Can this work across multiple sheets?

Yes. Reference the input date on one sheet and the holiday range on a second. Example: `=WORKDAY(`EOMONTH(Data!B2,0)+1,-1,Calendar![A2:A40]). External workbook links also operate, though you must keep source files open or update links on opening.

What are the limitations?

WORKDAY and WORKDAY.INTL cap at Excel’s date limit (31-Dec-9999). They do not consider half-days or partial trading sessions. For markets with ad-hoc early closes you must add those dates to the holiday list.

How do I handle errors?

Wrap formulas with IFERROR: `=IFERROR(`WORKDAY(…), \"Check Input\"). For debugging, verify each intermediate piece: confirm EOMONTH returns a date, the +1 shift works, and the holiday list contains valid date serials.

Does this work in older Excel versions?

WORKDAY is available since Excel 2003. EOMONTH required the Analysis ToolPak in 2003 but became native in 2007. WORKDAY.INTL needs Excel 2010 or newer. Users on 2003 must enable the ToolPak or migrate to newer versions.

What about performance with large datasets?

WORKDAY family functions are lightweight. One million calculations finish in a fraction of a second on modern hardware. Still, turning off automatic calculation during bulk data loads and using named ranges instead of volatile OFFSET ranges ensures smooth performance.

Conclusion

Mastering the “last working day of the month” unlocks smoother payroll runs, cleaner financial closes, and more credible schedules. By combining EOMONTH with WORKDAY or WORKDAY.INTL—and optionally wrapping the logic inside reusable LAMBDA functions—you gain a bulletproof, refresh-proof date engine. This technique exemplifies Excel’s power to translate calendar rules into automated intelligence. Continue exploring dynamic arrays, structured tables, and Power Query to elevate your entire date-driven workflow. With these skills in hand, you’ll never again manually count days on a wall calendar.

We use tracking cookies to understand how you use the product and help us improve it. Please accept cookies to help us improve.