EXCEL common expressions

1) Extract the value of the specified symbol position

For example: GH98-01510A is listed

= left (A1, FIND ("-", A1) -1) The result is: GH98

= Right (A1, LEN (A1) -FIND ("-", A1)) The result is: 01510A

2) Extract the value in the symbol

Such as: GH (98) -01510A

=mid(A1,FIND("(",A1)+1,FIND(")",A1)-FIND("(",A1)-1)  结果是:98

 3) The maximum value of the same value in multiple lines

For example, if the unit price of your product has multiple values, and you want to take out the maximum value, use the following formula

=MAX(IF(A:A="b",B:B))

Then use the three-key combination ctrl + shift + enter, the formula should not be placed in column A or B , or it will not be circularly referenced, "B" can be changed according to your needs, or you can directly refer to the cell.

vlookup not be used here because it is not applicable to an array, to only take . 1 numerical value .

4) Multi-cell numerical merge (two methods)

Method 1: = A1 & B1 & C1 ,,,,,,, and so on

Method 2: = phonetic (A1: A4) is the column where your value is.

5) Randomly select any time period from 00 o'clock to 08:00

= TEXT (RANDBETWEEN (600,800) / 100/24, "hh: mm")

If it is 17: 00 ~ 19: 00, it will be changed to 1700 and 1900 and so on.

6) Multi-condition sum

Method 1: SUMPRODUCT ((A2: A7 = " Second Class ") * (B2: B7 = " Male ") * (C2: C7)) is to meet the statistics of the class as the second class and the gender as the male.

Method two: sumifs (statistical column value, object column, meet the condition, object column 2, meet the condition 2)

7) Use the current date to display the day of the week

=textA1"aaaa"

=text(weekday(a1,1),"aaaa")

8) Capitalization

Small to big: upper (a1)

Large to small: lower (a1)

The first digit is the size: proper (a1)

 9) Remove the preceding space:

=trim(a1)

=substitute(a1,"   ","" )

 

 

 

 

Published 22 original articles · praised 7 · 100,000+ views

Guess you like

Origin blog.csdn.net/qyx0714/article/details/54644747