Showing posts with label function. Show all posts
Showing posts with label function. Show all posts

Friday, October 5, 2012

All Microsoft Excel functions

Listing of the most useful Microsoft Excel functions. Explanations on how to write each function in Excel and examples of its use are provided.

Mathematical Functions

SUM - Adds up all the values in a range
SUMIF - Adds all the values in a range that meet specific critera
SUMIFS (2007 and 2010 only) - Adds values in a range based on multiple criteria
SUMPRODUCT - Sum a range of cells that meet multiple criteria
ROUND - Round a number to a specified number of digits
ROUNDUP - Round a number up to a specified number of digits
ROUNDDOWN - Round a number down to a specified number of digits
CEILING - Round a number up to a multiple of significance
FLOOR - Round a number down to a multiple of significance

Statistical Functions

COUNT - Counts all the values in a range
AVERAGE - Calculates the average number from a range of values
MAX - Finds the maximum value in a range
MIN - Finds the minimum value in a range
COUNTA - Counts all non-empty cells in a range
COUNTBLANK - Counts all blank cells in a range
COUNTIF - Counts all the cells in a range that meet specific critera
COUNTIFS (2007 and 2010 only) - Counts all the cells in a range that meet multiple criteria
AVERAGEIF (2007 and 2010 only) - Calculates the average of a range of values that meet specific criteria
AVERAGEIFS (2007 and 2010 only) - Calculates the average of a range of values that meet multiple criteria
LARGE - Return a value dependent upon its ranking in a range of values in descending order
SMALL - Return a value dependent upon its ranking in a range of values in ascending order
RANK - Returns the rank or position of a number within a range of numbers

Text Functions

LEN - Returns the length, in number of characters, of the contents of a cell
REPT - Repeats a character a specified number of times
TRIM - Remove unwanted spaces from cells
LEFT - Extracts a specific number of characters from the start of a cell
RIGHT - Extracts a specific number of characters from the end of a cell
MID - Extracts a specific number of characters from the middle of a cell
UPPER - Converts the contents of a cell to uppercase
LOWER - Converts the contents of a cell to lowercase
PROPER - Converts the contents of a cell to proper case
REPLACE - Replace existing characters in a cell with a different set of characters
SUBSTITUTE - Replace existing characters with a different set of characters

Financial Functions

PMT - Calculates loan repayments based on constant payments and a constant interest rate
RATE - Returns the interest rate per period of a loan or investment
PV - Returns the present value of an investment based on a constant interest rate and payments
FV - Returns the future value of an investment based on constant payments and a constant interest rate
IPMT - Calculates the interest paid during a period of a loan or investment
PPMT - Calculates the principal payment made in a period of an investment
IRR - Returns the internal rate of return on a series of regular investments
XIRR - Returns the internal rate of return on a series of irregular payments on an investment
NPV - Returns the net present value of an investment based on a series of cash flows and a discount rate
XNPV - Returns the net present value of an investment based on a series of cash flows, the dates of the cash flows and a discount rate

Lookup and Reference Functions

VLOOKUP - Looks vertically down a list to find a record and returns information related to that record
HLOOKUP - Looks horizontally across a list to find a record and returns information related to that record
MATCH - Returns the position of a value in a list
INDEX - Returns an item from a specific position in a list
INDIRECT - Allows you to use a cell reference entered as a text string
OFFSET - Returns a value from a cell, or range of cells that are a specified number of rows and columns from another cell
CHOOSE - Returns a value from a list of values based on a specified position
ADDRESS - Returns a text representation of a cell address from specified row and column numbers

Logical Functions

IF - Tests a condition and takes an alternative action depending on the result
AND - Test up to 30 conditions using logical And
OR - Test up to 30 conditions using logical Or
IFERROR - Performs a specified action if a formula evaluates to an error, and displays the formula result if not

Date & Time Functions

TODAY - Returns the current date
NOW - Returns the current date and time
DATE - Returns the sequential serial number for the specified date and formats the result as a date
DAY - Returns the day corresponding to a date represented by a number between 1 and 31
MONTH - Returns the month corresponding to a date represented by a number between 1 and 12
YEAR - Returns the year corresponding to a date represented by a number in the range 1900 to 9999
WORKDAY - Returns the date a specified number of workings days before or after a date
WEEKDAY - Returns the day of the week corresponding to a specified date
NETWORKDAYS - Returns the number of workdays between two dates
EOMONTH - Calculates the last day of the month a specified number of months before or after a date

Các hàm, công thức thường dùng trong Microsoft Excel

Sau đây là tổng hợp các hàm dùng phổ biến nhất trong excel. Các hàm dưới đây sẽ rất cần thiết đối với những người phải làm việc nhiều với bảng tính excel. Với mỗi hàm có ví dụ cụ thể để giúp người đọc dễ hình dung hơn.

1. AVERAGE là hàm cho biết kết quả trung bình cộng của các số
VD: =AVERAGE(x1,x2)

2. ROUND cho kết quả làm số tròn đến m chũ số thập phân
VD = ROUND = (5.1314,2) sẽ cho kết quả là 5.13
VD = ROUND = (5.1354,2) sẽ cho kết quả là 5.14
VD = ROUND = (5.1354,1) sẽ cho kết quả là 5.1
VD = ROUND = (5.1354,0) sẽ cho kết quả là 5
VD = ROUND = (121896,-2)sẽ cho kết quả 121900

3. MIN cho kết quả là số nhỏ nhất trong các số
VD =MIN(2,3,4,10,25) sẽ cho kết quả là 2

4. MAX cho bết kết quả là số lớn nhất trong các số
VD = MAX(2,3,4,10,25) sẽ cho kết quả là 25

5. SUM cho biết két quả của các số trong ngoặc
VD = SUM(2,4,6)sẻ cho kết quả là 9

6. UPPER trả về chỗi chữ hoa của chỗi text
VD = UPPER(“Thanh Da”) sẽ là “THANH DA”

7. PROPER là hàm trả về một chuỗi text và cho ký tự đầu của mỗi từ là chữ hoa
VD = PROPER(“thanh đa”)sẽ cho là Thanh Đa

8. RANK là hàm xếp hạng tăng hoặc giảm dần
VD = (H3,$H$3:$H$45,0) sẽ xếp hạng người có diểm trung bình cao nhất sẽ là 1
VD = (H3,$H$3:$H$45,1) sẽ xếp hạng người có điểm trung bình thấp nhất sẽ là 1

9. HLOOKUP (trị dò ,bảng,hàm tham chiếu,cách dò)
nguyên tắc hoạt động giống như VLOOKUP khác là
VLOOKUP thì dò tìm ở cột trái tham chiếu số liệu ở các cột bên phải
HLOOKUP thì dò tìm ở hàng trên cùng và tham chiếu số liệu ở các hàng bên dưới

10. VLOOKUP là hàm tìm trị dò ,bảng ,cột tham chiếu,cách dò)
VD = VLOOKUP(A001,Bảng,2,0) Dò A001 trong bảng ,lấy giá trị ở cột 2

11. MOD (số bị chia ,số chia )cho kết quả là số dư của phét chia nguyên .kết quả có cùng dấu với chia
VD = MOD(12,3)cho kết quả là 0
VD =MOD(9,2) cho kết quả là 1

12. COUNT đếm số phân tử kiểu số
VD = COUNT=(B3 :B7)sẽ đếm từ ô B3 đến ô B7 có giá trị số

13. COUNTA đếm số phần tử khác trống (cả số & chuổi)
VD = COUNTA(B3:B7)sẽ đếm từ ô B3 đến ô B7 có giá trị số hoặc chuỗi (trừ các ô có khoảng trắng)

14. COUNTIF đếm số phân tử trong dãy thỏa điều kiện
VD = COUNTIF(Ả:F3,">=5"sẽ đếm từ Ô Ả đến ô F3 thỏa điều kiện có giá trị lớn hơn hoăc bằng 5
VD = COUNTIF(C1:C45,"Đậu")sẽ đếm từ Ô C1 đến C45 Thỏa điều kiện "Đậu"

15. IF điều kiện ,trị đúng ,trị sai
VD : IF (2<>3,"đúng","Sai")sẽ cho kết quả là đúng
VD : IF (2=3,"Đúng","Sai")sẽ cho kết quả là sai

16. SUMIF (cột chứa điều kiện,,Đ K,Cột tính tổng)tính tổng trên cột của những dòng thỏa điều kiện
VD : SUMIF($A$3:$A$45,"TIVI",$H$3:$H$45)

17. AND (điều kiện 1,điều kiện 2,điều kiện 3,..)
Chỉ cho kết quả đúng khi tất cả các điều kiện đúng (Cho kết quả sai khi chỉ cần một điều kiện sai)

18. OR (điều kiện 1,điều kiện 2,điều kiện 3,..)
cho kết quả sai khi tất cả các điều kiện sai

19. LEFT (Đĩa chỉ ,n)
Lấy n kí tự tù bên trái đĩa chỉ
VD : =LEFT(ThanhDa,5) sẽ là Thanh
VD : =LEFT(Cao11,2)sẽ là Ca

20. RIGHT (Đĩa chỉ ,n)
Lấy n kí tự tù bên phải đĩa chỉ
VD :=RIGHT(ThanhDa,2)sẽ là Da
VD :=RIGHT(CAO11,3)sẽ là 001

21. MID (Đĩa chỉ ,n,m)
Lấy từ ký tự thứ n lấy m ký tự của đĩa chỉ
VD : =MID(ThanhDa,6,2)sẽ là Da
VD : = LEFT(Cao11BT,3,3)sẽ là 001

22. INT (Số X) cho kết quả là phần nguyên của số X
VD := INT(3.1415)sẽ cho kết quả là 3

23. ABS (Số X) cho kết quả là trị tuyệt đối của X
VD: = ABS(-9)sẽ cho kêt quả là 9

24. LEN Trả về chiều dài của chuỗi text
VD:= LEN("THANH DA") sẽ là 8

25. LOWER trả về chuỗi chữ thường của chuỗi text
VD : =LOWER("THANH DA")sẽ là "thanh da"

26. TRIM loại bỏ các khoảng trắng ở trước ,sau và trong chuỗi text
VD : =TRIM(" THANH DA "sẽ là "THANHDA"

27. MATCH (trị dò,bảng 1 chiều,1/0)
hàm trả về giá trị kiểu số và số thứ tự của phần tự này trong mảng,nếu không tìm thấy sẽ trả về giá trị #N/A

28. INDEX (Mảng hai chiều ,số dòng,số cột)hàm trả về giá trị của một ô trong bảng đó là giao của dong và cột
VD :=INDEX(Mảng,2,4)kết quả sẽ là 98

29. TEXT (Giá trị số,định dạnh)
chuyển giá trị số thành chuỗi
VD :=TEXT(12345,12345)sẽ biến số 12345 thành chuỗi 12345
VD := TEXT(456,45)sẽ biến số 456 thành chuỗi 45

30. VALUE (ô chứa số dạng chuỗi)
chuyển giá trị số dạng chỗi thành số
VD :=VALUE(12345)biến chuỗi 12345 thành số 12345

31. CHOOSE (biểu thức,Danh sách)
cho kết quả là một vị trí trong danh sách tương ứng với giá trị biểu thức
VD := CHOOSE(2,"trâm",'nhật","phương")sẽ cho kết quả là nhật

32. NOT (Điều Kiện)
Cho kết quả ngược lại với ĐK
VD = NOT(2<>4)sẽ cho kết quả là FALSE (Sai)

33. SUMIF (rang,đk)Tổng các số thảo Điểu kiện
nếu A1=10,A2=7 VD:=SUMIF(A1:A2,">4")=17

34. SQRT cho kết quả là căn bậc hai của biểu thức số với điều kiện biểu thức số lớn hơn hoặc bằng không
VD = SQRT(16)cho kết quả là 4

35. PI hàm PI không có đối số cho kết quả là gái trị của số PI
VD = PI()cho kết quả là 3,141593

36. TRUNC bỏ các giá trị sau dấu chấm thật phân
VD = TRUNC(123,56) cho kết quả là 123