电脑教程
位置:首页>> 电脑教程>> office教程>> excel convert函数 使用教程

excel convert函数 使用教程

  发布时间:2023-01-25 00:44:09 

标签:函数,单位,度量,转换,Excel函数

CONVERT函数的功能为将数字从一个度量系统转换到另一个度量系统中。

convert函数语法是:CONVERT(number,from_unit,to_unit)。

参数:number是以from_units为单位的需要进行转换的数值;from_unit为数值number进行转换前的度量单位;to_unit则为进行转换后的度量单位。convert函数中from_unit和to_unit参数包括“距离、重量、温度”在内的十大类数十种度量单位。

如果用函数 CONVERT 进行日期或时间的转换,可以作为 from_unit 和 to_unit的是:年“yr”、日“day”、小时“hr”、分“mn”、秒“sec”。

excel convert函数还可用于度量转换。

convert函数的用途是将数字从一个度量系统转换到另一个度量系统中。

convert函数的用法是:convert(number,from_unit,to_unit)。

假如在a2单元格内存放的是以“摄氏度”表示的温度数值,我们需要在b2单元格以“华氏度”来显示,这时就可以在b2单元格使用公式:“=convert(a2,double_quotationcdouble_quotation,double_quotationfdouble_quotation)”进行转换,如果需要将温度由“摄氏度”转换成“开尔文度”,只要将上述公式改为“=convert(a2,double_quotationcdouble_quotation,double_quotationkdouble_quotation)”即可。

假如需要将表示重量的单位由“克”转换成“磅”时使用公式:“=convert(100,double_quotationgdouble_quotation,double_quotationlbmdouble_quotation)”,如果转换成“盎司”,公式则为“=convert(100,double_quotationgdouble_quotation,double_quotationozmdouble_quotation)”。公式中的“100”为需要转换的数值,代表了100克的重量。

使用convert函数可以非常方便地进行不同度量系统的转换操作,但由于convert函数支持的度量单位相当多,在使用时必须注意如下两点:

(1)度量单位名称和前缀是区分大小写的,如果输入数据的拼写有误,函数convert返回错误值#value!。
(2)进行转换的度量必须在相同的组中才能进行转换,否则函数convert返回错误值#n/a,如将度量单位由温度转换成重量单位。

0
投稿

猜你喜欢

手机版 电脑教程 asp之家 www.aspxhome.com