设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 4725|回复: 5
打印 上一主题 下一主题

[函数/公式] [原创]TEXT函数用法大全

[复制链接]
跳转到指定楼层
1#
发表于 2006-8-2 23:19:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
先来一个官方版本的,HEHE。。。

TEXT
  
Converts a value to text in a specific number format.

Syntax

TEXT(value,format_text)

Value   is a numeric value, a formula that evaluates to a numeric value, or a reference to a cell containing a numeric value.

Format_text   is a numeric format as a text string enclosed in quotation marks. You can see various numeric formats by clicking the Number, Date, Time, Currency, or Custom in the Category box of the Number tab in the Format Cells dialog box, and then viewing the formats displayed.

Remarks

Format_text cannot contain an asterisk (*).

Formatting a cell with an option on the Number tab (Cells command, Format menu) changes only the format, not the value. Using the TEXT function converts a value to formatted text, and the result is no longer calculated as a number.

   A              B
1  Salesperson Sales
2  Buchanan    2800
3  Dodsworth    40%

Formula Description (Result)
=A2&" sold "&TEXT(B2, "$0.00")&" worth of units." Combines contents above into a phrase (Buchanan sold $2800.00 worth of units.)
=A3&" sold "&TEXT(B3,"0%")&" of the total sales." Combines contents above into a phrase (Dodsworth sold 40% of the total sales.)


这样看起来,这个函数似乎没有什么用处。其实不然,这个函数的用处可大着呢,相当于好多个函数的集成,不信,请COPY下面的实例我用的是英文的OFFICE2003,暂不肯定中文的是否能行)

公式                                                                                   值
=TEXT("2006-7-31","DD")                                           31
=TEXT("2006-7-31","DDD")                                          MON
=TEXT("2006-7-31","DDDD")                                         Mondy
=TEXT("2006-7-31","YY")                                           06
=TEXT("2006-7-31","YYYY")                                         2006
=TEXT("2006-7-31","MM")                                           07
=TEXT("2006-7-31","MMM")                                          Jul
=TEXT("2006-7-31","MMMM")                                         July
="Sheet printed on" & TEXT(NOW(),"MMMM DD, YYYY at H:MM AM/PM")   Sheet printed on August 02, 2006 at 1:47 PM




[此贴子已经被作者于2006-8-2 15:24:32编辑过]

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享分享 分享淘帖 订阅订阅
2#
发表于 2006-8-3 06:12:00 | 只看该作者
这个EXCEL函数本来就很像ACCESS中的FORMAT()函数
3#
发表于 2006-8-4 01:45:00 | 只看该作者
ge shi hua

dui mou yi ge shu ju

thanks
4#
发表于 2006-8-4 03:42:00 | 只看该作者
中文2003也可以。
5#
发表于 2011-6-22 01:34:08 | 只看该作者
好贴,收藏了

点击这里给我发消息

6#
发表于 2016-12-4 22:04:26 | 只看该作者
好贴,
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-7 07:38 , Processed in 0.118541 second(s), 29 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表