You want to define the month or the
day for a specifi c date automatically in
a work sheet.
Use the Excel function “TEXT()”.
It converts numeric values into text
outputs. Excel internally saves a date as
a numeric value. You can infl uence the
text output using the formatting sign and
can for instance determine the week day
for a particular date. The function has
two parameters: the numeric value to be
converted and the formatting sign with
inverted commas on both sides.
An example explains the process: the “A1” cell has a date. You now want to display the week day for this date in the adjoining cell “B1”. For this, enter the following formula in the “B1” cell: - TEXT(A1, “tttt”)
The formatting sign “tttt” coverts the specifi ed date into a week day. If you only require an abbreviation of the week day, you can use the “ttt” format, for instance. The time can be displayed in the 12-hour format with an identifi er for mornings (am) and afternoons (pm). For this, add the desired identifi er “AM/PM”, “am/ pm”, “A/P” or “a/p” after the time format, separated by a space.
These different formatting signs can also be combined. If, for instance, you want to display the exact time without the seconds, you can use =TEXT(A1,“hh:mm”).
If the time is in the 24-hour format, and Excel needs to display it in a 12-hour format, then you can use =TEXT(A1, "hh. mm am/pm"). The table (above) lists the possible formatting signs and their functions for date and time output. Pay attention to the upper and lower cases here.
An example explains the process: the “A1” cell has a date. You now want to display the week day for this date in the adjoining cell “B1”. For this, enter the following formula in the “B1” cell: - TEXT(A1, “tttt”)
The formatting sign “tttt” coverts the specifi ed date into a week day. If you only require an abbreviation of the week day, you can use the “ttt” format, for instance. The time can be displayed in the 12-hour format with an identifi er for mornings (am) and afternoons (pm). For this, add the desired identifi er “AM/PM”, “am/ pm”, “A/P” or “a/p” after the time format, separated by a space.
These different formatting signs can also be combined. If, for instance, you want to display the exact time without the seconds, you can use =TEXT(A1,“hh:mm”).
If the time is in the 24-hour format, and Excel needs to display it in a 12-hour format, then you can use =TEXT(A1, "hh. mm am/pm"). The table (above) lists the possible formatting signs and their functions for date and time output. Pay attention to the upper and lower cases here.
0 comments:
Post a Comment
please write your comment
Note: Only a member of this blog may post a comment.