You are on page 1of 22

1

I. KHI NIM:
1. Vng Database: - L vng D Liu bao gm t nht l 2 dng. - Dng u tin gi l dng tiu (Field Name) - Cc dng cn li gi l dng d liu (Record)

24/11/2011 4:03:45 CH

C S D Liu

I. KHI NIM (tt):

2. Vng Criteria: L vng cha iu kin lc, trch, xo, d liu. 3. Vng Extract to: L vng cha cc mu tin tho mn iu kin ca vng Database sau khi thc hin thao tc trch.

24/11/2011 4:03:45 CH

C S D Liu

II. CC THAO TC:


1. t tn vng : Gip cho vic tham chiu n 1 vng d dng hn.
Qut khi vng cn t tn-> Formulas\Define Name

Refers to: a ch vng cn t tn

Names in workbook: Tn vng trong Workbook ( duy nht )


Scope: xc nh tn dng cho ton Workbook hay ch mt Sheet * Mun xa hay sa: Formulas/Name Manager

24/11/2011 4:03:45 CH

C S D Liu

Chn vng t E3H6 Chn Formulas\Define Name G tn vng l BangDo OK

24/11/2011 4:03:45 CH

C S D Liu

2. To vng tiu chun :

a. Vng tiu chun kiu nhn: Gm t nht l 2 dng. - Dng u tin gi l dng tiu . Ging vi tiu ca Database. - Dng cn li l php ton so snh v gi tr so snh.
24/11/2011 4:03:45 CH C S D Liu 6

1 iu kin : V d 1: To vng tiu chun theo iu kin S con l 2 V d 2: To vng tiu chun theo iu kin S con >= 2 V d 3: To vng tiu chun theo iu kn M KT l A V d 4: To vng tiu chun theo iu kn M NV bt u l SX
24/11/2011 4:03:45 CH C S D Liu

Copy H2

Copy B2

2 iu kin kt hp iu kin v V d: To vng tiu chun theo iu kin S con l 2 v c M KT l A 2 iu kin kt hp iu kin hoc V d: To vng tiu chun theo iu kin S con l 2 hoc c M KT l A 3 iu kin kt hp iu kin v, hoc V d: To vng tiu chun theo iu kin M KT l A v B v c S con l 2
24/11/2011 4:03:45 CH C S D Liu

Copy H2,G2

Copy H2,G2

Copy H2,G2

b. Vng tiu chun cng thc: Gm c 2 dng 1 ct. Dng u tin gi l dng tiu . Khc vi cc tiu ca vng Database. Dng cn li l biu thc l lun c vit cho dng d liu u tin.

V d: To vng tiu chun theo iu kin S con l 2 V d: To vng tiu chun theo iu kn M KT l A
24/11/2011 4:03:45 CH C S D Liu 9

V d: To vng tiu chun theo iu kin M NV bt u l SX

V d: To vng tiu chun theo iu kin S con l 2 v c M KT l A

V d: To vng tiu chun theo iu kin M KT l A v B v c S con l 2

24/11/2011 4:03:45 CH

C S D Liu

10

6. Lc d liu trn bng tnh : Hin th cc dng d liu tho mn iu kin. Cch 1 : Lc t ng - Chn dng tiu ca vng Database - Chn Data Filter

-Click

chn cc gi tr cn lc trn cc ct tiu - hy b lc All V d: Lc cc nhn vin c s con l 3

24/11/2011 4:03:45 CH

C S D Liu

11

Cch 2 : Lc theo vng tiu chun Thao tc: - Chun b: Vng Database. t tn CSDL - To vng Criteria. t tn DKL1 - Chn Data Advanced - Xut hin hp thoi Advanced Filter

24/11/2011 4:03:45 CH

C S D Liu

12

Lc: Action: Filter the list, in-place Chn hoc g tn vng Database: List range Chn hoc g tn vng Criteria: Criteria range
24/11/2011 4:03:45 CH C S D Liu 13

Vng Databasse Vng Criteria Kt qu sau khi lc

24/11/2011 4:03:45 CH

C S D Liu

14

7. B lc d liu trn bng tnh : - Chn Data Clear 8. Xo d liu trn bng tnh theo mt iu kin no : - L vic lc d liu bng tnh theo iu kin v thc hin thao tc xo cc dng kt qu nhn c. 9. Trch d liu trn bng tnh : - L vic sao d liu cc dng d liu trn bng tnh tho mn mt iu kin no .

24/11/2011 4:03:45 CH

C S D Liu

15

Trch theo vng tiu chun Thao tc: - Chun b: Vng Database. t tn CSDL - Vng Criteria. t tn DKT1 - V vng Extract to. t tn VT1

24/11/2011 4:03:45 CH

C S D Liu

16

- Chn Data Advanced - Xut hin hp thoi Advanced Filter

Lc: Action: Copy to another location Chn hoc g tn vng Database: List range Chn hoc g tn vng Criteria: Criteria range Chn hoc g tn vng Extract to: Copy to
24/11/2011 4:03:45 CH C S D Liu 17

Vng Databasse Vng Criteria Kt qu sau khi trch

24/11/2011 4:03:45 CH

C S D Liu

18

3. To vng trch : Sao chp tiu ca cc ct cn trch ti vng Databasse to ra tiu cho vng cn trch. 4. Cc hm thng k theo vng tiu chun : C php chung:

Tn hm ( Database , field , Criteria )


Bao gm cc hm: DCOUNT, DCOUNTA, DSUM, DMIN, DMAX, DAVERAGE,

24/11/2011 4:03:45 CH

C S D Liu

19

V d 1: Tng s nhn vin c M KT l A v c s con >2

24/11/2011 4:03:45 CH

C S D Liu

20

V d 2: Tng s con ca nhn vin c M KT l A v c s con >2

24/11/2011 4:03:45 CH

C S D Liu

21

24/11/2011 4:03:45 CH

C S D Liu

22