博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SharePoint Calculated Fields Use Excel Formulas.
阅读量:5301 次
发布时间:2019-06-14

本文共 12410 字,大约阅读时间需要 41 分钟。

转自:

SharePoint Calculated Fields Use Excel Formulas.

 
I was recently tasked with resolving a date issue for a Global Portal. People outside the US were complaining about the date format (MM/DD/YYYY)... I've long been a proponent of ISO dates (YYYY-MM-DD) and 28 day months... OK maybe 28 day months wouldn't be so fun for savants to calculate. Anyway the solution was obviously to include the month name. My first reaction was to change FLDTYPES.xml, then to create a custom field type, and finally it soon became obvious a calculated field should do the trick.
So I searched a minute for a formula to render the date with the month name in the middle... I didn't find any so I created it. It is a piece of cake to do it in VB and C#, but what does a calculated field provide? As it turns out quite a lot. Everybody knows your classic [Today], LTrim, etc... but what I didn't know it that it supports a lot of Excel functions (not the VBA ones).
Before we get to the list of functions, here's how to write the month name formula:
=TEXT([DateField],"dd") &"/"& TEXT([DateField],"mmm") &"/"& TEXT([DateField],"yyyy") or =DAY([DateField]) &"/"& TEXT([DateField],"mmm") &"/"& YEAR([DateField])
or better
=IF(NOT(ISBLANK([DateField])),DAY([DateField])&" "&TEXT([DateField],"mmm")&" "&YEAR([DateField]),"") Now here's probably what your here for, a list of SharePoint Calculated Field/Column functions: source (http://office.microsoft.com/en-us/excel/HP100791861033.aspx)

Date and time functions

Function Description
Returns the serial number of a particular date
Converts a date in the form of text to a serial number
Converts a serial number to a day of the month
Calculates the number of days between two dates based on a 360-day year
Returns the serial number of the date that is the indicated number of months before or after the start date
Returns the serial number of the last day of the month before or after a specified number of months
Converts a serial number to an hour
Converts a serial number to a minute
Converts a serial number to a month
Returns the number of whole workdays between two dates
Returns the serial number of the current date and time
Converts a serial number to a second
Returns the serial number of a particular time
Converts a time in the form of text to a serial number
Returns the serial number of today's date
Converts a serial number to a day of the week
Converts a serial number to a number representing where the week falls numerically with a year
Returns the serial number of the date before or after a specified number of workdays
Converts a serial number to a year
Returns the year fraction representing the number of whole days between start_date and end_date

Information functions

Function Description
Returns information about the formatting, location, or contents of a cell
Returns a number corresponding to an error type
Returns information about the current operating environment
Returns TRUE if the value is blank
Returns TRUE if the value is any error value except #N/A
Returns TRUE if the value is any error value
Returns TRUE if the number is even
Returns TRUE if the value is a logical value
Returns TRUE if the value is the #N/A error value
Returns TRUE if the value is not text
Returns TRUE if the value is a number
Returns TRUE if the number is odd
Returns TRUE if the value is a reference
Returns TRUE if the value is text
Returns a value converted to a number
Returns the error value #N/A
Returns a number indicating the data type of a value

Logical functions

Function Description
Returns TRUE if all of its arguments are TRUE
Returns the logical value FALSE
Specifies a logical test to perform
Returns a value you specify if a formula evaluates to an error; otherwise, returns the result of the formula
Reverses the logic of its argument
Returns TRUE if any argument is TRUE
Returns the logical value TRUE

Math and trigonometry functions

Function Description
Returns the absolute value of a number
Returns the arccosine of a number
Returns the inverse hyperbolic cosine of a number
Returns the arcsine of a number
Returns the inverse hyperbolic sine of a number
Returns the arctangent of a number
Returns the arctangent from x- and y-coordinates
Returns the inverse hyperbolic tangent of a number
Rounds a number to the nearest integer or to the nearest multiple of significance
Returns the number of combinations for a given number of objects
Returns the cosine of a number
Returns the hyperbolic cosine of a number
Converts radians to degrees
Rounds a number up to the nearest even integer
Returns e raised to the power of a given number
Returns the factorial of a number
Returns the double factorial of a number
Rounds a number down, toward zero
Returns the greatest common divisor
Rounds a number down to the nearest integer
Returns the least common multiple
Returns the natural logarithm of a number
Returns the logarithm of a number to a specified base
Returns the base-10 logarithm of a number
Returns the matrix determinant of an array
Returns the matrix inverse of an array
Returns the matrix product of two arrays
Returns the remainder from division
Returns a number rounded to the desired multiple
Returns the multinomial of a set of numbers
Rounds a number up to the nearest odd integer
Returns the value of pi
Returns the result of a number raised to a power
Multiplies its arguments
Returns the integer portion of a division
Converts degrees to radians
Converts an arabic numeral to roman, as text
Rounds a number to a specified number of digits
Rounds a number down, toward zero
Rounds a number up, away from zero
Returns the sum of a power series based on the formula
Returns the sign of a number
Returns the sine of the given angle
Returns the hyperbolic sine of a number
Returns a positive square root
Returns the square root of (number * pi)
Returns a subtotal in a list or database
Adds its arguments
Adds the cells specified by a given criteria
Adds the cells in a range that meet multiple criteria
Returns the sum of the products of corresponding array components
Returns the sum of the squares of the arguments
Returns the sum of the difference of squares of corresponding values in two arrays
Returns the sum of the sum of squares of corresponding values in two arrays
Returns the sum of squares of differences of corresponding values in two arrays
Returns the tangent of a number
Returns the hyperbolic tangent of a number
Truncates a number to an integer

Statistical functions

Function Description
Returns the average of the absolute deviations of data points from their mean
Returns the average of its arguments
Returns the average of its arguments, including numbers, text, and logical values
Returns the average (arithmetic mean) of all the cells in a range that meet a given criteria
Returns the average (arithmetic mean) of all cells that meet multiple criteria.
Returns the beta cumulative distribution function
Returns the inverse of the cumulative distribution function for a specified beta distribution
Returns the individual term binomial distribution probability
Returns the one-tailed probability of the chi-squared distribution
Returns the inverse of the one-tailed probability of the chi-squared distribution
Returns the test for independence
Returns the confidence interval for a population mean
Returns the correlation coefficient between two data sets
Counts how many numbers are in the list of arguments
Counts how many values are in the list of arguments
Counts the number of blank cells within a range
Counts the number of cells within a range that meet the given criteria
Counts the number of cells within a range that meet multiple criteria
Returns covariance, the average of the products of paired deviations
Returns the smallest value for which the cumulative binomial distribution is less than or equal to a criterion value
Returns the sum of squares of deviations
Returns the exponential distribution
Returns the F probability distribution
Returns the inverse of the F probability distribution
Returns the Fisher transformation
Returns the inverse of the Fisher transformation
Returns a value along a linear trend
Returns a frequency distribution as a vertical array
Returns the result of an F-test
Returns the gamma distribution
Returns the inverse of the gamma cumulative distribution
Returns the natural logarithm of the gamma function, Γ(x)
Returns the geometric mean
Returns values along an exponential trend
Returns the harmonic mean
Returns the hypergeometric distribution
Returns the intercept of the linear regression line
Returns the kurtosis of a data set
Returns the k-th largest value in a data set
Returns the parameters of a linear trend
Returns the parameters of an exponential trend
Returns the inverse of the lognormal distribution
Returns the cumulative lognormal distribution
Returns the maximum value in a list of arguments
Returns the maximum value in a list of arguments, including numbers, text, and logical values
Returns the median of the given numbers
Returns the minimum value in a list of arguments
Returns the smallest value in a list of arguments, including numbers, text, and logical values
Returns the most common value in a data set
Returns the negative binomial distribution
Returns the normal cumulative distribution
Returns the inverse of the normal cumulative distribution
Returns the standard normal cumulative distribution
Returns the inverse of the standard normal cumulative distribution
Returns the Pearson product moment correlation coefficient
Returns the k-th percentile of values in a range
Returns the percentage rank of a value in a data set
Returns the number of permutations for a given number of objects
Returns the Poisson distribution
Returns the probability that values in a range are between two limits
Returns the quartile of a data set
Returns the rank of a number in a list of numbers
Returns the square of the Pearson product moment correlation coefficient
Returns the skewness of a distribution
Returns the slope of the linear regression line
Returns the k-th smallest value in a data set
Returns a normalized value
Estimates standard deviation based on a sample
Estimates standard deviation based on a sample, including numbers, text, and logical values
Calculates standard deviation based on the entire population
Calculates standard deviation based on the entire population, including numbers, text, and logical values
Returns the standard error of the predicted y-value for each x in the regression
Returns the Student's t-distribution
Returns the inverse of the Student's t-distribution
Returns values along a linear trend
Returns the mean of the interior of a data set
Returns the probability associated with a Student's t-test
Estimates variance based on a sample
Estimates variance based on a sample, including numbers, text, and logical values
Calculates variance based on the entire population
Calculates variance based on the entire population, including numbers, text, and logical values
Returns the Weibull distribution
Returns the one-tailed probability-value of a z-test

Text functions

Function Description
Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters
Returns the character specified by the code number
Removes all nonprintable characters from text
Returns a numeric code for the first character in a text string
Joins several text items into one text item
Converts a number to text, using the $ (dollar) currency format
Checks to see if two text values are identical
Finds one text value within another (case-sensitive)
Formats a number as text with a fixed number of decimals
Changes half-width (single-byte) English letters or katakana within a character string to full-width (double-byte) characters
Returns the leftmost characters from a text value
Returns the number of characters in a text string
Converts text to lowercase
Returns a specific number of characters from a text string starting at the position you specify
Extracts the phonetic (furigana) characters from a text string
Capitalizes the first letter in each word of a text value
Replaces characters within text
Repeats text a given number of times
Returns the rightmost characters from a text value
Finds one text value within another (not case-sensitive)
Converts its arguments to text
Formats a number and converts it to text

转载于:https://www.cnblogs.com/snailJuan/p/3465476.html

你可能感兴趣的文章
sharepoint list 文档上传和删除
查看>>
Standard deviation
查看>>
sql 查出一张表中重复的所有记录数据
查看>>
linux密码破解
查看>>
【COGS-2638】数列操作ψ 线段树
查看>>
委托和接口的逆变 和协变
查看>>
(一)Vmware搭建DPDK测试平台
查看>>
JAVA笔记16-生产者消费者问题
查看>>
回调函数
查看>>
ACM题目————滑雪
查看>>
谈谈国外网络干扰那些事
查看>>
C. Journey(dfs)
查看>>
java 数据流DataOutputStream和DataInputstream
查看>>
解决下载Android Build-tools 19.1.0失败
查看>>
Microsoft Robotics Developer Studio beta4的大bug
查看>>
jmeter多sql查询
查看>>
Linux下Tomcat重启脚本
查看>>
ReentrantLock
查看>>
js拖拽案例、自定义滚动条
查看>>
Office办公 如何打印顺丰发票
查看>>