Advance Excel

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

CM Training Center

Advance Excel

I. Create Table
Table
Microsoft Excel 2007/2010

. Field Name and Column Name
Field Name and Column Name


Field Name ?
Field Name
Column Table
()
Field Name

Record

Record :

Row ( )

. DATA TYPE
Field Name

Field Field :
Text : ()
Data/Time :
Currency :
(
)


Number : (

)
Special :

By Mr. Bun Pronh (012 386876)

Zip code
Page 1

CM Training Center

Advance Excel

Phone number

Social Security number (SSN)

Custome :
Cell

. DATA VALIDATION
Validation: Cell

Data => Data Validation

Allow List Source Male,Female OK

. BORDER AND SHADING TABLE


Border Table
()

Select Cells Border Ctrl + 1


Border Tab

Line Style
o

None :

By Mr. Bun Pronh (012 386876)

Page 2

CM Training Center

Advance Excel

Outline :

Inside :

OK

. CONDITIONAL FORMATTING
Conditional Formatting


Cell

Cell


Icon
Cell

:
Shading Cell
Field : Result (
)
-Select Field Result
- Home Tab , Conditional Formatting
- Highlight Cells Rule
=>Mores Rules

By Mr. Bun Pronh (012 386876)

Page 3

CM Training Center

Advance Excel

. CONDITIONAL FORMATTING RULE MANAGER


-Select Field Average
- Home Tab , Conditional Formatting => Manage Rule

-Click New Rule Cell Value

New Rule

By Mr. Bun Pronh (012 386876)

Page 4

CM Training Center

Advance Excel

. NEW TAB
New Tab

Customize Quick Access Toolbar

Customize Ribbon

Tab

-Click New Tab

Tab
OK

By Mr. Bun Pronh (012 386876)

Page 5

CM Training Center

Advance Excel

. MACRO

Font
Macro

View Tab, Macro Group , Macros
Record Macro

Macro Name
Macro
Shortcut key Font (Ctrl+t)
OK

By Mr. Bun Pronh (012 386876)

Page 6

CM Training Center

Advance Excel

OK Font

Macro
Home Tab, Font Group

Font (Limon S1) => OK

-Click View Tab


-Macros => Stop Recording

Macro Font
Font Font
Font Limon S1, Font
Limon R1 Font

By Mr. Bun Pronh (012 386876)

Page 7

CM Training Center

Advance Excel

II. Calculation Operators in formulas


Operators specify the type calculation that you want to perform on the elements of a
formula. Microsoft Excel includes four different types of calculation operators arithmetic,
comparison. text and reference.
1.THE DEFINITION OF PRE-BUILT FUNCTION
Prebuilt function
IF
IF
( )
2. ARITHMETIC OPERATORS
To perform basic mathematical operations such as addition. subtraction or multiplication
combine numbers and produce number results use the following arithmetic operators.
Operator

Meaning

Example

+ (Plus Sign)

9+9

-(Minus Sign)

9-9

*(Asterisk)

9*9

/(Forward Slash)

9/9

^(Carret)

9^9

3. COMPARISON OPERATOR
You Can compare two values with the following operators. When two value compared
by using these operators the result is a logical value either TRUE or FALSE.
Operator

Meaning

Example

= (Equal to)

9=9

>(Greater than)

8>9

<(Less than)

8<9

>=(Greater than or Equal to)

8>=9

<=(Less than or Equal to)

8<=9

<>(Not Equal)

8<>9

By Mr. Bun Pronh (012 386876)

Page 8

CM Training Center

Advance Excel

4. TEXT CONCATENATION OPERATOR


Use the ampersand & or Concatenate to Join one or more text strings to produce a
single piece of text.
Operator
& (Ampersan)
Concatenate

By Mr. Bun Pronh (012 386876)

Meaning

Example
Vong&Sunly
Vong Sunly

Page 9

CM Training Center

Advance Excel

III. Logical Function Group



( )
. IF


=IF(Condition,Ture,False)
:

Condition :

True : Condition

False :
Condition

Excel (=)

(Capital) (Small)

Letter

IF

(False)

(Pass)
. Table
. Data type Records
Code

Name

Sex

Average

Result

001

Lay Visna

Male

84

=if(average<50,False,Pass)

002

Chan Dara

Male

78

003

Sorn Rangsey

Female

87

004

Ly Pearak

Female

68

005

Porn Sombath

Male

48

By Mr. Bun Pronh (012 386876)

Page 10

CM Training Center

Advance Excel

. Condition


Column Result

. Cell IF (Cell Average) :


=IF(average<50,False,Pass) Enter
. NESTED IF
Function IF


=IF(Condition,True,IF(Condition,True,...,False))

: Nested IF IF Error

By Mr. Bun Pronh (012 386876)

Page 11

CM Training Center

Advance Excel


IF

=IF(Condi tion,True,False)

(Condition, True, False)



IF
IF Cell

IF



=IF(Condi tion,True,IF(Condi tion,True,False)))
Salary<=160

Salary<=300

No VAT

Salary>300
VAT=10%

VAT=20%


=IF(F5<=160,F5,IF(F5<=300,F5-(F5*0.1),F5-(F5*0.2)))
. AND


=AND(Logical1,Logical2,...,Logical30)
Logical1,Logical2,...,Logical30
AND
Logical True
False
Condition 1

Condition 2

Result

=And(2+2=4,10+30=40) True
=And(2+2=4,10+30=50) False
By Mr. Bun Pronh (012 386876)

Page 12

CM Training Center

Advance Excel

.
IF AND

IF AND


=IF(AND(Logical1,Logical2,...,Logical30),True,False)
And (Logical1,Logical2,...,Logical30) Condition IF
True Condition False Condition




.

.

(Table)

Condition

=IF(AND(C5="male",D5>=2),15,IF(AND(C5="female",D5>=2),20,0))

. DATEDIF
DATEDIF


=DATEDIF(Start Date,End Date,Prefix)

By Mr. Bun Pronh (012 386876)

Page 13

CM Training Center

Advance Excel

Start Date :

End Date :

Prefix : (D) (M) (Y)

Prefix D

Prefix M

Prefix Y

.
IF, AND DATEDIF



, %


,
%


, %




. (Table)
.

By Mr. Bun Pronh (012 386876)

Page 14

CM Training Center

Advance Excel

DATEDIF
IF AND IF AND DATEDIF

DATEDIF


IF AND
Cell Total Day (Cell: F5)

Cell F5 DATEDIF
=DATEDIF(D5,E5,d)
Cell F5

Cell F5

=IF(AND(F5>=1,F5<=15),F5*5000*(1+0.01),IF(AND(F5>15,F5<=30),(15*5000*(1+0.01))+
(F5-15)*6000*(1+0.02),(15*5000*(1+0.01))+(15*6000*(1+0.02))+(F5-30)*7000*(1+0.03)))

Cell F5

=IF(AND(DATEDIF(D5,E5,"d")>=1,DATEDIF(D5,E5,"d")<=15),(DATEDIF(D5,E5,"d")*5000)*(1
+0.01),IF(AND(DATEDIF(D5,E5,"d")>15,DATEDIF(D5,E5,"d")<=30),(15*5000*(1+0.01))+(DA
TEDIF(D5,E5,"d")-15)*6000*(1+0.02),(15*5000*(1+0.01))+(15*6000*(1+0.02))+(DATEDIF
(D5,E5,"d")-30)*7000*(1+0.03)))
. OR
OR
Logical


=OR(Logical1,Logical2,...,Logical30)
Logical1,Logical2,...,Logical30 OR
Logical True Logical
False

=OR(2+2=4,10+20=30) True
=OR(2+2=4,10+20=50) True
By Mr. Bun Pronh (012 386876)

Page 15

CM Training Center

Advance Excel

. NOT
False

True


=NOT(Logical)
Logical

=Not(Logical>100) True
Logical
=Not(Logical) False
Logical
.
IF AND OR NOT

If Aad Or Not


=IF(AND(OR(Logical1,Logical2,...,Logical30),Logical2,..),True,False)
And(Or(Logical1,Logical2,...,Logical30),Logical2,...,Logical30) Condition
IF
o

True Condition

False
Condition

1. (Table)

By Mr. Bun Pronh (012 386876)

Page 16

CM Training Center

Advance Excel

2. Condition

3.
Cell
4.


Year




=IF(AND(C5="F",YEAR(TODAY())-YEAR(E5)>=1,OR(F5="Married",D5>=1),NOT(G5=
"Phnom Penh")),20,IF(AND(C5="m",YEAR(TODAY())-YEAR(E5)>=1,OR(F5="married",D5>=1),
NOT(G5="Phnom Penh")),15,5))
. DATE/TIME
. DAY
Day (

Cell


=Day(Serial_Number)

Serial Number:

=Day(16-Jan-2012) Enter 16
=Day(16-Jan-2012-11-Jan-2012) Enter 5
. MONTH
Month (

)
Cell
By Mr. Bun Pronh (012 386876)

Page 17

CM Training Center

Advance Excel


=Month(Serial_Number)

Serial Number:

=Month(16-Jan-2012) Enter January


. YEAR
Year (

Cell


=Year(Serial_Number)


Serial Number:

=Month(16-Jan-2012) Enter 2012


. DAYS360
Days360


=Days360(StartDate,EndDate)


StartDate:
EndDate:

=Days360(16-Jan-2012,16-Jan-2012) Enter 30
. TODAY
Date/Time Properties
By Mr. Bun Pronh (012 386876)

Page 18

CM Training Center

Advance Excel


=Today()

=Today() Enter
. HOUR MINUTE


=(Hour(Time out-Time in)+Minute(Time out-Time in)/60)
=(Minute(Time out-Time in)+Hour(Time out-Time in)*60)/60

(Table)




Total Hour =(HOUR(E5-D5)+MINUTE(E5-D5)/60)
. DATE

Excel2010

By Mr. Bun Pronh (012 386876)

Page 19

CM Training Center

Advance Excel


=Date(Year,Month,Day)

Year : ()

Month : ()

Day : ()

=Date(Year(Aug-23-2012),Month(Aug-23-2012),Day(Aug-23-2012)) Enter
Aug-23-2012

()
)
(


(Register)
Table
Cell Expired


Expired =DATE(YEAR(D5),MONTH(D5)+E5,DAY(D5))
. MOD


=Mod(Number,Divisor)

Number : ( )

Divisor : ( )

By Mr. Bun Pronh (012 386876)

Page 20

CM Training Center

Advance Excel

=Mod(5,2) Enter 1 ( )
=Mod(11,3) Enter 2 ( )
. INT (Integer)


=INT(Number)

Number : ( )

=Int(12.332) Enter 12
=Int(113.98) Enter 113
. ROUNDDOWN
()


=Rounddown(Number,Number_Digits)

Number : ( )
Number Digits : ( 0-9)

=Rounddown(12.332,0) Enter 12
=Rounddown(12.332,2) Enter 12.33
. ROUNDUP
() ()


=Roundup(Number,Number_Digits)

Number : ( )

Number Digits : ( 0-9)

By Mr. Bun Pronh (012 386876)

Page 21

CM Training Center

Advance Excel

=Roundup(12.332,0) Enter 13
=Roundup(12.332,2) Enter 12.34
. PRODUCT
Sum


=Product(Number1,Number2,...,Number30)

Number1,Number2,...,Number30 :

=Product(2,2,3,8) Enter 96
=Product(2,2,3,8,0) Enter 0
. POWER


=Power(Number,Power)

Number :
Power :

=Power(3,3) Enter 27
=Power(4,5) Enter 1024
=2^3 Enter 9
. VLOOKUP
Fieldname Table

Record Fielname
Table


=Vlookup(Lookup_Value,Table_Array,Col_Index_Num)
By Mr. Bun Pronh (012 386876)

Page 22

CM Training Center

Advance Excel


Lookup_Value :
Column Table

Table_Array : Column
Table_Array
( Field Column )

Table

Table (Old Table)


Table (New Table)



Old Table (1)

New Table (2)

Vlookup Cell (Table


Stock)
=VLOOKUP(F6,$A$5:$D$10,2) 2 Column Table Name
=VLOOKUP(F6,$A$5:$D$10,3) 3 Column Table Pro Name
=VLOOKUP(F6,$A$5:$D$10,4) 4 Column Table Sale Qty
. TRANSPOSE
(Vertical) (Horizontal)
(Horizontal) (Vertical)


=Transpose(Array)

Array : Fieldname Record

() Fieldname
ID, Name, Sex, Hour,
Free/Hour and Total
Record
(Horizontal Table)

By Mr. Bun Pronh (012 386876)

Page 23

CM Training Center

Advance Excel

Fieldname
?

Select Cells (

Field Record )

Select Cells
()

Ctrl+Shift+Enter

Copy

Cusor Cell

Home Tab

Paste =>Transpose(T)

By Mr. Bun Pronh (012 386876)

Page 24

CM Training Center

Advance Excel

.
IF VLOOKUP
Fieldname Table

Record Fielname
Table


=IF(Condition,Vlookup(Lookup_Value,Table_Array,Col_Index_Num),False)

Condtion :
Vlookup(Lookup_Value,Table_Array,Col_Index_Num) True Statment
False:

Cell: B14 IF Vlookup


Erro
. TEXT
. CONCATENATE


=Concatenate(Text1,Text2,...,Text30)
=Text1&Text2&,...,Text30

Text1,Text2,...,Text30 : Text Text

By Mr. Bun Pronh (012 386876)

Page 25

CM Training Center

Advance Excel

=Concatenate(Vong,Sunly) Enter VongSunly


=Concatenate(Vong& &Sunly) Enter Vong Sunly
=Vong& &Sunly Enter Vong Sunly
. DOLLAR

($)


=Dollar(Number,Decimal)

Number :
Decimal :

=Dollar(1234,2) Enter $1,234.00


=Dollar(234,0) Enter $234
. EXACT



=Exact(Text1,Text2)

Text1 : Text2
Text2 : Text1

=Exact(1234,2231) Enter (False)


=Exact(23,23) Enter (True)
=Exact(dara,dara) Enter (True)
. LEN (Length)


String


=Len(Text)

By Mr. Bun Pronh (012 386876)

Page 26

CM Training Center

Advance Excel


Text :
Line (String)

=Len(CM Training Center) Enter


( Space )
. LEFT


String


=Left(Text,Num_Chars)

Text :
Line String
Num_Chars :

=Left (Cambodia,3) Enter Cam


=Left (Kingdom of Cambodia,8) Enter Kingdom
( Space )
. RIGHT


String


=Right(Text,Num_Chars)

Text :
Line String
Num_Chars :

=Right (Cambodia,3) Enter dia


=Right (Kingdom of Cambodia,9) Enter Cambodia
( Space )
. MID (Middle)


String

String
By Mr. Bun Pronh (012 386876)

Page 27

CM Training Center

Advance Excel


=Mid(Text,Start_Num,Num_Chars)

Text :
Line String
Start_Num :
String
Num_Chars :

=Mid (Cambodia,4,5) Enter bodia


4 B 5 Bodia

. TEXT
Format


=Text(Number,Format_Text)

Number : Format
Format_Text : (

)

=Text(12345,#,###.00 R) Enter 12,345.00 R


=Text (12345,$ #,###.00) Enter $ 12,345.00
. UPPER
(Small Letter) (Capital Letter)


=Upper(Text)

Text :
Line String

=Upper(Cambodia) Enter CAMBODIA


. LOWER
(Capital Letter) (Small Letter)
By Mr. Bun Pronh (012 386876)

Page 28

CM Training Center

Advance Excel


=Lower(Text)

Text :
Line String

=Lower(CAMBODIA) Enter Cambodia


. ISBLANK
Cell
True Cell
False Cell


=Isblank(Value)

Value : Cell Reference

=Isblank(123) Enter False


=Isblank((
Cell)) Enter True
.
IF TEXT

If Right,Left,Len Isblank



(
)

Cell : Convert Time In


Cell : Convert Time Out

By Mr. Bun Pronh (012 386876)

Page 29

CM Training Center

Advance Excel

Convert Time In
=IF(ISBLANK(D4),"",IF(AND(LEN(D4)=4,LEFT(D4,2)<="23",RIGHT(D4,2) <="59"),LEFT(D4,2)
&":"&RIGHT(D4,2),IF(LEN(D4)=3,LEFT(D4,1)&":"&RIGHT(D4,2),IF(LEN (D4)=2,"00"&":"&
RIGHT(D4,2),IF(LEN(D4)=1,"00"&":"&"0"&RIGHT(D4,1))))))
Convert Time Out
=IF(ISBLANK(E4),"",IF(AND(LEN(E4)=4,LEFT(E4,2)<="23",RIGHT(E4,2)<="59"),LEFT(E4,2)&"
:"&RIGHT(E4,2),IF(LEN(E4)=3,LEFT(E4,1)&":"&RIGHT(E4,2),IF(LEN(E4)=2,"00"&":"&RIGHT(
E4,2),IF(LEN(E4)=1,"00"&":"&"0"&RIGHT(E4,1))))))
. STATISTIC
. RANK


=Rank(Number,Refer)

Number :

Refer :


?
. COUNTIF


=Countif(Range,Criterial)

Range : Cell

Criterial :
Cell

By Mr. Bun Pronh (012 386876)

Page 30

CM Training Center

Advance Excel

. COUNTA


=CountA(Value1,...,Value30)

Value1,...,Value30 : Cells



. COUNTBLANK
Cells
Range


=CountBlank(Range)

Ranger :

Cells
. SUMIF

Criteria


=Sumif(Range,Criteria,Sum_Range)

Range :

Criteria :
Sum_Range () Criteria

Total =SUMIF($B$4:$B$9,F4,$C$4:$C$9)
By Mr. Bun Pronh (012 386876)

Page 31

CM Training Center

Advance Excel

By Mr. Bun Pronh (012 386876)

Page 32

CM Training Center

Advance Excel




?
?

? ( )
?

By Mr. Bun Pronh (012 386876)

Page 33

CM Training Center

Advance Excel














Payment

Payment
=IF(F5<=50,F5*350,IF(F5<=100,(50*350)+(F5-50)*550,IF(F5<=300,(50*350)+ (50*550)+
(F5-100)*650,(50*350)+(50*550)+(200*650)+(F5-300)*750)))

By Mr. Bun Pronh (012 386876)

Page 34

CM Training Center

Advance Excel




()

Payment
Payment :
=IF(AND(F5>=100,DAYS360(D5,E5)>30),F5*0.03+((DAYS360(D5,E5)-30)*3),0)

By Mr. Bun Pronh (012 386876)

Page 35

CM Training Center

Advance Excel

Total
Total :
=IF(AND(C5="m",E5>=3,F5<100),15+F5,IF(AND(C5="f",E5>=3,F5<100),20+F5,F5+5))

By Mr. Bun Pronh (012 386876)

Page 36

CM Training Center

Advance Excel




()
(
)

Due Date
Total : DATE(YEAR(E5),MONTH(E5)+F5,DAY(E5))

By Mr. Bun Pronh (012 386876)

Page 37

CM Training Center

Advance Excel

SLF

Convert Date
Convert Date
=IF(DAY(E5)<15,DATE(YEAR(E5),MONTH(E5),1),DATE(YEAR(E5),MONTH(E5)+1,1))

By Mr. Bun Pronh (012 386876)

Page 38

CM Training Center

Advance Excel

Payment
Payment :
=IF((HOUR(E5-D5)+MINUTE(E5-D5)/60)>=6,INT(F5*(HOUR(E5-D5)+MINUTE(E5-D5)/60) *(10.2)),INT(F5*(HOUR(E5-D5)+MINUTE(E5-D5)/60)))

By Mr. Bun Pronh (012 386876)

Page 39

CM Training Center

Advance Excel



Essbook 1, Headway 1, Newperson 1




Essbook 2 , Headway 2, Newperson 2




Essbook 3, Headway 3, Newperson 3



Payment :
=IF(AND(D5>=10,D5<=30),VLOOKUP(E5,$D$16:$F$25,2),IF(D5>30,VLOOKUP(E5,$D$16:$F$25,3),50%))

By Mr. Bun Pronh (012 386876)

Page 40

CM Training Center

Advance Excel



( )

. ( )

.
.

Pay Amount
Pay Amount :
=IF(G5=DATE(YEAR(E5),MONTH(E5)+F5,DAY(E5)),(((D5*0.03)*F5)+D5),IF(G5<DATE (YEAR(E5)
,MONTH(E5)+F5,DAY(E5)),(((D5*0.03)*F5)*(1-0.2)+D5),(((D5*0.03)*F5)*(1+0.2)+D5)))

By Mr. Bun Pronh (012 386876)

Page 41

CM Training Center

Advance Excel



. %

.

Total
Total
=IF(HOUR(G5-F5)+(MINUTE(G5-F5)/60)>3,(E5/(26*8)*(HOUR(G5-F5)+(MINUTE(G5-F5)/60))
*(1+0.3)),(E5/(26*8)*(HOUR(G5-F5)+(MINUTE(G5-F5)/60))*(1+0.2)))

By Mr. Bun Pronh (012 386876)

Page 42

CM Training Center

Advance Excel



Microsoft Excel 2010

Sale, Price and New Stock



Sale: SUMIF($C$5:$C$19,G15,$D$5:$D$19)
Price: IF(G15="abc",20,IF(G15="tiger",25,IF(G15="anchor",10,IF(G15="heineken",25.5,
IF(G15="angkor",10.5)))))
New Stock: H6-H15

By Mr. Bun Pronh (012 386876)

Page 43

CM Training Center

Advance Excel

Table Stock of Product

Table Adding of Product

By Mr. Bun Pronh (012 386876)

Page 44

CM Training Center

Advance Excel

Table Sale of Product


Stock
Sale: SUMIF(Sale!$D$5:$D$19,Stock!B5,Sale!$E$5:$E$19)
Adding: SUMIF(AddStock!$C$5:$C$11,Stock!B5,AddStock!$D$5:$D$11)
End Balance: (C5+E5)-D5

By Mr. Bun Pronh (012 386876)

Page 45

CM Training Center

Advance Excel

(
)

o


0.7 1

Total
Total:
=IF((D5*E5)<=120,D5*E5,IF((D5*E5)<=250,120+((D5*E5)-120)*(1-0.02),IF((D5*E5) <=500,
120+(130*(1-0.02))+((D5*E5)-250)*(1-0.04),120+(130*(1-0.02))+(250*(1-0.04))+((D5*E5)500) *(1-0.06))))

By Mr. Bun Pronh (012 386876)

Page 46

CM Training Center

Advance Excel


Table
Table
Mainsalary Sheet
Table
Search Sheet
Sheet

By Mr. Bun Pronh (012 386876)

Page 47

CM Training Center

Advance Excel

By Mr. Bun Pronh (012 386876)

Page 48

You might also like