当前位置:网站首页>Excel application of office software series 4

Excel application of office software series 4

2022-06-09 08:45:00 Lang Xiaolin

1 Introduce
Pick up 【 Office software series And excel application 1】 The content introduced in the blog .

2 problem
This time it is csv The problem of time format in the file , Examples are as follows :
 Insert picture description here
We still want to convert to a common data format as required :yyyy-mm-dd hh:mm:ss

3 step
Use identifier separated form to separate into different cells , Then the text is assembled into one piece according to the splicing method ; Such as :
 Insert picture description here
The previous date here may not be in accordance with yyyy-mm-dd The format of , It is yyyy-m-d, Then you can do the following transformation :
 Insert picture description here
Finally, the date and time are spelled into a string form .

4 function
Text function : Converts a number to text according to the specified numeric format .
after Text The number set by the function will be converted to text format , And in the 【 Format cell 】 After formatting in the dialog box, the value in the cell is still a number .
usage :TEXT( data , Format code )

 Use cases :
(1) The date changes to a week :
 Enter the formula  =TEXT(A2,"aaaa")2)Excel The values in the worksheet are converted to percentages :
 Enter the formula  =TEXT(A2,"0%")3) Value for conditional judgment :
 Enter the formula  =TEXT(A2,"[>=80] good ;[>=60] pass ; fail, ")4) Time to sum :
 Enter the formula  =TEXT(SUM(A2:A30),"[h]:mm:ss")5) The two timestamps are sooner or later :
 Enter the formula  =TEXT(B2-A2,"[h] when m branch ")

Conditional function :
Single conditional judgment :=IF( Judge the condition , Returns the true value when the condition is met , Returns a false value if the condition is not met )

 Enter the formula  =IF(A2>=60," pass "," fail, ")

“ And ” Condition judgment of :

 Enter the formula  =IF(AND(A2>85,B2>=80)," good ","")

“ or ” Condition judgment of :

 Enter the formula  =IF(OR(A2>85,B2>=80)," good ","")

SUMIF function : Sum according to specified conditions
usage :=SUMIF( Conditional region , Specified summation conditions , The region of summation )

COUNTIF function : Count the number of qualified
usage :=COUNTIF( Conditional region , Specified conditions )

 Enter the formula  =COUNTIF(A2:A30,">=60")

Choose() function :
Choose() The function selects the corresponding data from the parameter list according to the sequence number . The grammatical structure is :Choose(index_num,value1,[value2],……)
 Insert picture description here

原网站

版权声明
本文为[Lang Xiaolin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/160/202206090820323992.html