Function Problems

Create First and Last Entry Logs Using Excel LAMBDA Functions

Kushani NimanthikaKushani Nimanthika Nov 10, 2026 869 views

Question details

The user wants to implement custom LAMBDA functions to track the first and most recent entries in a dataset for data governance purposes.

How to Create First and Last Entry Logs with Excel LAMBDA Functions
Product
Microsoft Excel
Device & OS
not provided
Scenario
Tracking changes and maintaining data quality by easily retrieving the earliest and latest records logged in a continuous dataset.
Observed behavior
A need to consistently extract the first and last entry logs using custom named formulas rather than repeatedly writing complex lookup arrays.
Before you start

Ensure your spreadsheet software is updated to a version that supports the LAMBDA function, as older versions do not have the capability to create custom named functions.

Solution 1Recommended

Define FirstEntryLog and LastEntryLog in the Name Manager

Use the Name Manager to create custom, reusable LAMBDA functions for fetching the first and last entries in your dataset.

LAMBDA functions allow you to define custom, reusable formulas without needing VBA or complex macros.

By setting up these formulas in the Name Manager, you can call them anywhere in your workbook by simply typing the names you assign, ensuring consistent entry logging and simplified data governance.

1
Open the Name Manager

Navigate to the Formulas tab on the ribbon and click on 'Name Manager'.

2
Create the FirstEntryLog Function

Click 'New'. In the Name field, type 'FirstEntryLog'. In the 'Refers to' field, input your custom LAMBDA formula designed to fetch the first entry (e.g., using INDEX/MATCH or XLOOKUP logic), and click OK.

3
Create the LastEntryLog Function

Click 'New' again. Name it 'LastEntryLog' and input the corresponding LAMBDA formula for retrieving the most recent entry in the 'Refers to' field.

4
Apply the Functions in Your Sheet

Select an empty cell and type '=FirstEntryLog(your_range)' or '=LastEntryLog(your_range)' to extract the desired log data.

Define FirstEntryLog and LastEntryLog in the Name Manager
Reusable Governance Tools: Once defined, these LAMBDA functions act exactly like native functions and can be used on any worksheet within the same workbook.
Advanced Spreadsheet Functions

Manage Complex Data Logs with WPS Spreadsheet

WPS Spreadsheet offers powerful formula management tools, allowing you to handle advanced array formulas and custom name definitions seamlessly for all your data governance needs.

  1. 1. Launch WPS Spreadsheet: Open WPS Office and load the workbook where you want to implement entry logs.
  2. 2. Access the Name Manager: Go to the Formulas tab and click on Name Manager to start defining your custom data tracking functions.
  3. 3. Define and Apply Formulas: Set up your tracking logic within the Name Manager, then apply the names directly in your cells to monitor dataset entries.
High compatibility with Microsoft Excel formulas and functionsRobust Name Manager for deploying custom data tracking logicFree, lightweight, and easy-to-navigate interface
microsoft office alternative - wps office

Frequently Asked Questions

Why is my LAMBDA function returning a #NAME? error?

This error typically occurs if your spreadsheet software version does not support the LAMBDA function, or if the function name was misspelled or not correctly defined in the Name Manager.

Can I track the exact time of the first and last entry using these functions?

Yes, if your dataset includes a timestamp column, you can structure your LAMBDA function to return the timestamp associated with the first or last entry corresponding to a specific row or item ID.

Are custom LAMBDA functions compatible between different spreadsheet programs?

LAMBDA is natively supported in newer versions of Microsoft 365. When sharing files with users on older versions or alternative software, the functions may not evaluate correctly unless the software has been updated to support modern array and LAMBDA features.