Microsoft KB Archive/102858: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 28: | Line 28: | ||
To display the list with date formats, replace the name DLIST in cell G2 with the following formula: | To display the list with date formats, replace the name DLIST in cell G2 with the following formula: | ||
<pre> G2: TEXT(DLIST, | <pre> G2: TEXT(DLIST,"m/d/yy") | ||
</pre> | </pre> | ||
Explanation: | Explanation: | ||
Line 38: | Line 38: | ||
== REFERENCES == | == REFERENCES == | ||
"Function Reference," version 4.0, pages 431-432 "Function Reference," version 3.0, pages 234-235 | |||
{| | {| | ||
Line 52: | Line 52: | ||
<br /> | <br /> | ||
<br /> | <br /> | ||
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED | THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. | ||
</blockquote> | </blockquote> | ||
<span>Last reviewed: September 12, 1996</span><br /> | <span>Last reviewed: September 12, 1996</span><br /> | ||
[[../cpyright|©1997 Microsoft Corporation. All rights reserved. Legal Notices]].<br /> | [[../cpyright|©1997 Microsoft Corporation. All rights reserved. Legal Notices]].<br /> | ||
|} | |} |
Latest revision as of 08:23, 20 July 2020
Microsoft Knowledge Base
Excel: How to Display Formatted Dates in a List Box
Last reviewed: September 12, 1996
Article ID: Q102858
The information in this article applies to:
- Microsoft Excel for Windows, versions 2.x, 3.0, 4.0, 4.0a, 5.0
- Microsoft Excel for OS/2, version 2.2, 3.0
- Microsoft Excel for the Macintosh, version 2.x, 3.0, 4.0
SUMMARY
Normally, when you display dates in a list box in a dialog box, they appear in the serial number format. To display these dates in one of the date formats, use the TEXT() function in the dialog box definition table and specify the format you want to use.
NOTE: You can also use this method to apply other number formats to values displayed in a custom dialog box.
The following sample dialog box table displays a list of dates contained in the named range DLIST (in this dialog box, dates are displayed in their serial number formats, instead of in date formats):
X Posi- Y Posi- Init/ Item # tion tion Width Height Text Result ------ ------- ------- ------- ------- ---------- ------ B1: C1: D1: E1: 254 F1: 112 G1: H1: B2:15 C2: 10 D2: 6 E2: 160 F2: 84 G2: DLIST H2:
To display the list with date formats, replace the name DLIST in cell G2 with the following formula:
G2: TEXT(DLIST,"m/d/yy")
Explanation:
The TEXT() function calls DLIST and displays the numbers in that range in the m/d/yy date format.
NOTE: the information above also applies to version 5.0 only when using version 4.0 macro language.
REFERENCES
"Function Reference," version 4.0, pages 431-432 "Function Reference," version 3.0, pages 234-235
KBCategory: kbusage Last reviewed: September 12, 1996 |