当前位置:网站首页>Excel method is commonly used in text function 5
Excel method is commonly used in text function 5
2022-08-08 08:34:00 【The sensible meow~~】
As a data developer, in the process of work, although the database is used in most cases, the operation of Excel is unavoidable.The text() function has powerful functions. I will share more scenes encountered in my work below, enjoy~~
I. Meaning
Excel's text function is to format the content of the selected cell through the format code, and then display it in different display methods. It is a function that converts the content into text
Second, grammar
=TEXT (value, format code)
Parameter definition:
The first parameter value is the selected cell, which is the content that you want to format as text. The content of this cell can be numeric or characterString etc.
The second parameter is the target format you want to format.
III. Common usage scenarios
1, the value display is filled with 0
Format: =TEXT(cell,"000000")
Interpretation: Fill the content of the cell with 0 in front of the six digits, for example, 100 will be formatted as 000100
Extension: If you want to display two digits after the decimal point, the less than 2 digits are filled with 0s, and more than 2 digits are filled with 0.2-digit rounding, the formula is: =TEXT(cell, "00.00").For example, 21 is formatted as 21.00; 15.135 is formatted as 15.14.
2, extract date of birth based on ID number
Format: =TEXT(MID(cell,7,8),"00-00-00")
3, standard three-segment format for phone numbers
Format: =TEXT(cell,"000-0000-0000")
4, convert a numeric date to a specific date format

(1) 00/00/0000
Format: =TEXT(cell, "00/00/0000")
(2) 0000-00-00
Format: =TEXT(cell, "0000-00-00")
(3) full name of the day of the week
Format: =TEXT(TEXT(cell,"0000-00-00"),"aaaa")
(4) Abbreviated day of the week
Format: =TEXT(TEXT(cell,"0000-00-00"),"aaa")
(5) Year of extraction
Format: =TEXT(TEXT(cell, "0000-00-00"), "yyyy")
(6) Month of withdrawal
Format: =TEXT(TEXT(cell,"0000-00-00"),"mm")
(7) Pickup Day
Format: =TEXT(TEXT(cell,"0000-00-00"),"dd")
5, conditional section judgment
Condition section, you can choose the default, two, three, four sections, or can be customized
(1) Default condition section
Three sections are used more often, of course, you can also modify it to other sections according to your needs.
Format: [>0];[<0];[=0]
(2) Custom Condition Section
Format: [Condition 1];[Condition 2];[Other parts that do not meet the condition];[Text]
The above is the common way we use the text function in Excel, I am Meow~~, I hope everyone can communicate and learn together!
边栏推荐
猜你喜欢

At the time of data intelligence, Jiuzhang Yunji DataCanvas won the "Most Investment Value Company"

Offensive and defensive world - web2

安装oracle19c时报错DBT-50000

攻防世界——leaking

Literature Learning (part33)--Clustering by fast search and find of density peaks

ES8 | async and await

优雅地处理重复请求(并发请求)

Nacos是如何实现心跳机制和服务续约以及超时剔除服务机制的?

【树莓派】在没有显示屏的情况下通过WIFI连电脑

lua --- 基本语法学习
随机推荐
数学基础(二)逆矩阵、伪逆矩阵、最小二乘解、最小范数解
PhpStudy 2016搭建-DVWA靶场
Offensive and defensive world - lottery
用于一型糖尿病血糖调节的无模型iPID控制器
正则表达式
VSCode代码格式化快捷键及保存时自动格式化
炽热如初 向新而生|ISC2022 HackingClub白帽峰会圆满举办
oracle sql语法 更改为mysql sql语法 或者代码实现
【图像分类】2021-CoAtNet NeurlPS
67:第五章:开发admin管理服务:20:开发【解冻/冻结用户,接口】;(用户状态变更后,需要刷新用户状态,即变更用户会话信息:我们一般通过“删除redis中会话信息,强制用户重新登录“来做的;)
想用sql实现两日数据对比后,对新增数据单加一列标签
ES8 | async and await
你真的了解IP地址吗?
文献学习(part33)--Clustering by fast search and find of density peaks
数据智能正当时,九章云极DataCanvas公司荣获“最具投资价值公司”
ACWing 198. 反素数 题解
你一定要看的安装及卸载测试用例的步骤及方法总结
多态案例三电脑组装
22-08-06 西安 EasyExcel实现字典表导入、导出
写在 26 岁生日