当前位置:网站首页>How much do you know about excel formula?
How much do you know about excel formula?
2022-07-07 11:30:00 【51CTO】
Afternoon 5 At halfpastten, I got a rush job after work , Lead the statement file downloaded from the third-party system , I need to import it into a system database .
Don't rush to write programs .
By right excel There are some foundations for operation , that , adopt excel Directly generate the required insert sentence , Then send it to the operation and maintenance department for execution , Maybe faster !
The raw data are as follows :
Next, we need to generate the values of the fields in the data table .
First , To generate a unique document number . The rule is PD+yyyyMMdd+8 Sequence number of bit length .
First create a new column I Column , The first line is 1, Double click to get the sequence number of each line .
And then with the help of excel The formula places the generated document number in H Column :="PD"&SUBSTITUTE(A3,"-","")&RIGHT("00000000"&I3,8)
Next , According to the modification time , Build creation time . The rule is : The creation time is earlier than the modification time 1~100 second .
With the help of excel The formula puts the creation time of the generation on J Column :=TEXT(F3-TIME(0,0,ROUND( RAND()*100,0)),"yyyy-mm-dd hh:mm:ss")
among ,
- RAND Function to generate random numbers , The generated is 0~1 Decimal between .
- ROUND Functions are rounded , Round here .
- TIME The decimal value returned by the function is 0 ( zero ) To 0.99999999 Value between , For from 0:00:00 (12:00:00 AM) To 23:59:59 (11:59:59 P.M.) Time between . Grammar is TIME(hour,minute,second). For example, a cell =TIME(0,0,5), When formatting cells to time , It is shown that 0:00:05.
- TEXT Function doesn't know what it means , It seems to be quite powerful on the Internet . I told a little sister about the operation , I was told .
Next , Basically there's no difficulty . Directly click each cell to generate the final insert OK .
="INSERT INTO t_business_airorders"&RIGHT(LEFT(H6,8),6)&"
(OrderId,OrderNo,OrderSt,PayMentSt,BusinessType,MerCode,MerName,ZFDate,ModifyDate,OrderAmoun
t,CreatDate,HKStatus,PayType,KBCode,OrgCode,soncode,CounterFee,validityNum)VALUES('"&H6&"','"&B
6&"','YWC','YWC','','9001004221',' McDull
Pocket ','"&F6&"','"&F6&"','"&E6&"','"&J6&"','YJS','25','"&H6&"','LD_YS_1_2','','0.00','15');"
The final excel Long like this :
Put these insert sentence copy come out , Put it in the Notepad , Send it to the operation and maintenance department for execution in the production warehouse , Confirm no mistake ,6:30 Finish work .
If you are writing a program now , I'm afraid it will be slower than this . I have a hammer in my hand , Everything you see is a nail . Programmers , The job responsibility is to write code , No matter what demand you encounter , The first reaction is naturally to write a program to realize . I remember once in a certain East time , There is also a need to hear such import data , The intern who just became a regular said that it was necessary to write the program 1 God . If he knew excel If you can make a job faster , Isn't that liberating the productive forces . Programmers know some common excel Operation is necessary .
边栏推荐
- 普通测试年薪15w,测试开发年薪30w+,二者差距在哪?
- STM32入门开发 NEC红外线协议解码(超低成本无线传输方案)
- 请查收.NET MAUI 的最新学习资源
- [question] Compilation Principle
- Apprentissage comparatif non supervisé des caractéristiques visuelles par les assignations de groupes de contrôle
- 测试开发基础,教你做一个完整功能的Web平台之环境准备
- The opacity value becomes 1%
- 從色情直播到直播電商
- RationalDMIS2022阵列工件测量
- Multithreaded application (thread pool, singleton mode)
猜你喜欢
Verilog realizes nixie tube display driver [with source code]
Avoid mutating a prop directly since the value will be overwritten whenever the parent component
关于SIoU《SIoU Loss: More Powerful Learning for Bounding Box Regression Zhora Gevorgyan 》的一些看法及代码实现
自动化测试框架
The annual salary of general test is 15W, and the annual salary of test and development is 30w+. What is the difference between the two?
RationalDMIS2022阵列工件测量
對比學習之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
数据库同步工具 DBSync 新增对MongoDB、ES的支持
Socket socket programming
Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]
随机推荐
The post-90s resigned and started a business, saying they would kill cloud database
Vscode 尝试在目标目录创建文件时发生一个错误:拒绝访问【已解决】
《论文阅读》Neural Approaches to Conversational AI(1)
基于STC8G1K08的0.96寸IIC液晶屏驱动程序
使用MeterSphere让你的测试工作持续高效
Hash / (understanding, implementation and application)
After the uniapp jumps to the page in onlaunch, click the event failure solution
从色情直播到直播电商
一度辍学的数学差生,获得今年菲尔兹奖
Electron adding SQLite database
Network foundation (1)
Socket socket programming
From pornographic live broadcast to live broadcast E-commerce
VIM命令模式与输入模式切换
Vuthink proper installation process
R语言使用quantile函数计算评分值的分位数(20%、40%、60%、80%)、使用逻辑操作符将对应的分位区间(quantile)编码为分类值生成新的字段、strsplit函数将学生的名和姓拆分
聊聊SOC启动(十一) 内核初始化
创意信息获2家机构调研:GreatDB 数据库已在9地部署
Zhou Yajin, a top safety scholar of Zhejiang University, is a curiosity driven activist
Process control (creation, termination, waiting, program replacement)