Introduction
In Excel, there are many situations where you want to automatically show a date when text is entered into a certain cell. I recently had a request to display the current date in column B whenever a name or data was entered in column A. I researched how to do this and implemented it.
What I want to achieve
I wanted to achieve the following behavior using Excel functions:
- Display today’s date in column B if any text is entered in column A.
- Display nothing in column B if column A remains empty.
Functions used: Combination of IF and TODAY
The actual function used is as follows:
=IF(A1<>"", TODAY(), "")
Enter this formula in cell B1, for example. If text is entered in cell A1, today’s date (generated by the TODAY function) will be displayed. If A1 is empty, nothing will be displayed (an empty string).
Explanation of the formula structure
A1<>””
This means that cell A1 is “not empty.” It checks whether any text or value is present in the cell.
TODAY()
This is a function that returns today’s date. It displays only the date, not the time.
IF(Condition, Value if True, Value if False)
In this case, it is set up as: “If there is a value in A1, show today’s date; otherwise, show nothing.”
Notes and supplements
The TODAY() function updates the date every time you open the file. Therefore, it is not suitable if you want to fix the date to the day you entered the data.
If you want to keep the date fixed when the entry was made, it is better to use VBA to create a system that automatically inputs the current date.
However, if your purpose is simply to visually check “whether it has been entered or not,” this function is sufficient.
Summary
In Excel, you can easily create a mechanism to “display the date upon entry” just by combining the IF function and the TODAY function.
This is a convenient method that can be used in various situations, such as work logs, attendance management, and application checks. It is a lightweight method using only one formula, so please try it out.
