Traditional Culture Encyclopedia - Almanac inquiry - How to automatically display the day of the week of the current date in the perpetual calendar compiled by excel? For example, if I select C6 cell with the mouse, the current date will become 65438+Fe

How to automatically display the day of the week of the current date in the perpetual calendar compiled by excel? For example, if I select C6 cell with the mouse, the current date will become 65438+Fe

How to automatically display the day of the week of the current date in the perpetual calendar compiled by excel? For example, if I select C6 cell with the mouse, the current date will become 65438+February 3rd. You must use VBA to activate and change the contents of one cell by selecting another.

This function does not judge the selected operation.

Right-click the worksheet tab to view the code.

Just paste the following code into the code window.

Private worksheet _ selection change (byval target as range)

If the target. Then Count = 1

If the target < > "and then _

【E22】=【E2】& amp; "Year"&; 【G2】& amp; "Month"&; Target. Value and value. "day"

If ... it will be over.

End joint