Excel Hacks

Embed Size (px)

Text of Excel Hacks

ExcelHacks

Cc tuyt chiu trong Excel 1Nguyn bn: EXCEL HACKS Tc gi: David Raina Hawley Lc dch v b sung: Ptm0412 Ttphong2007 BNTT

2

Cc tuyt chiu trong Excel

PHN 1: Chng 1 v Chng 2Chng 1. GIM BT NHNG CC NHC KHI LM VIC VI BNG TNH ................................ 41. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.

Ty bin ca s lm vic ca bng tnh ...............................................................................................10 Nhp d liu ng thi vo nhiu Sheet.............................................................................................13 Ngn chn ngi s dng thc hin mt s hnh ng no nht nh ........................16 Ngn chn cc nhc nh khng cn thit...........................................................................................20 n Sheet sao cho ngi khc khng th dng lnh Unhide hin ra ................................23 T thit k mt bng tnh mu (template) .........................................................................................24 To ch mc cho cc Sheet trong Workbook .....................................................................................28 Gii hn vng cun ca bng tnh .........................................................................................................32 Kha v bo v nhng c cha cng thc ......................................................................................35 S dng nh dng theo iu kin tm d liu trng ..............................................................39 Tm d liu xut hin hai hoc nhiu ln bng cng c Conditional Formating...............41 To ring mt thanh cng c cho ring mt bng tnh c th .................................................42 Sao chp cng thc gi nguyn tham chiu tng i (ging nh sao chp tham chiu tuyt i) ...................................................................................................................................44 G b nhng lin kt ma ............................................................................................................................45 Gim kch thc file Excel b phnh to bt thng ..........................................................................47 Cu d liu t mt bng tnh b li ........................................................................................................50

www.giaiphapexcel.com

CC TUYT CHIU CA EXCEL

3

Chng 2. NHNG TH THUT VI CC TNH NNG C SN TRONG EXCEL ......................5417. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43.

S dng Data Validation khi danh sch ngun nm trong mt Sheet khc........................55 iu khin Conditional Formating bng checkbox ........................................................................57 nh du nhng cha cng thc bng Conditional Formatting .........................................60 m hoc cng nhng c nh dng c iu kin .........................................................61 T mu dng xen k .....................................................................................................................................64 To hiu ng 3D trong cc bng tnh hay cc ...............................................................................66 Bt, tt chc nng Conditional Formatting bng mt checkbox .............................................71 Dng nhiu List cho mt Combobox ....................................................................................................72 To mt list xc thc thay i theo s la chn t mt list khc ..............................................74 S dng chc nng thay th (Replace) g b cc k t khng mong mun ................77 Chuyn i con s dng vn bn sang s thc ................................................................................78 Trch xut d liu s trong mt chui bng VBA .............................................................................79 Ty bin ch thch ca bng tnh........................................................................................................82 Sp xp theo th t da theo nhiu hn ba ct ..............................................................................85 Sp xp ngu nhin ......................................................................................................................................86 Thao tc trn d liu vi Advanced Filter ............................................................................................87 To cc nh dng s cho ring bn ......................................................................................................93 Tng thm s ln Undo cho Excel...........................................................................................................99 T to danh sch fill ............................................................................................................................. 100 Lm ni cc Subtotal ca Excel ............................................................................................................. 102 Chuyn i cc hm v cng thc trong Excel thnh gi tr ................................................... 105 Thm d liu vo danh sch Validation mt cch t ng ...................................................... 107 Ngy thng trong Excel ............................................................................................................................ 109 Cho php s dng tnh nng Group and Outline trn bng tnh b kho ......................... 112 By li trng d liu ............................................................................................................................. 114 Gim danh sch x xung ca Validation sau khi chn mt ................................................... 116 Thm cc danh sch c sn v c danh sch t to vo menu chut phi ....................... 117

MC LC

4

Chng 1 GIM BT NHNG CC NHC KHI LM VIC VI BNG TNH

Trong qu trnh thc hin mt bng tnh, chng ta c th mc phi v s li, hoc c th mc phi nhng sai lm ng ngn, v thng khng ti nhng ci c th gip chng ta x l bng tnh nhanh hn, gn gng hn... Trc khi ni n cc Tuyt chiu ca Excel, xin ni s qua mt cht v mt s th thut v quy tc c bn, nhng iu s gip cc bn thc hin nhng Tuyt chiu c ni n trong cc phn sau cch d dng hn. Excel l mt phn mm bng tnh rt mnh, v bn c th lm c nhng iu khng th tin ni vi n. Nhng khng may, c nhiu ngi thit k bng tnh ca mnh vi qu nhiu s "lo xa", cn thn qu mc cn thit, v lm cho n tr nn phc tp hn l n ng b nh vy. Phn m u ny s mch cho bn mt s th thut v quy tc m nu bn lm theo, bn s thy chng rt hiu qu.

Quy tc 80/20C l vic quan trng nht khi thc hin mt bng tnh l dnh mt thi gian nghin cu, xem xt cch b tr d liu, tnh trc nhng vic mnh cn lm. V ng bao gi ngh rng sau khi hon thnh, ti s khng cn phi thm vo cc d liu hoc cc cng thc khc, v bn s lun lm ngc li. iu ny c ngha rng, bn nn dnh khong 80% thi gian ln k hoch cho mt bng tnh v khong 20% thi gian thc hin bng tnh .

www.giaiphapexcel.com

CC TUYT CHIU CA EXCEL

5Cho d rng, vic ny c v khng cn thit vi nhng bng tnh nh, nhng bo m rng, nu bn quan tm n iu ti va ni trn, th v lu v di, bn s trnh c nhng cc nhc khi phi c phi sa i sa li bng tnh ca mnh, v d dng thc hin c nhng bng tnh ln sau khi dnh cho n mt thi gian ln k hoch thc hin. Nn nh rng, cc bng tnh phi lun mang li cho ngi dng nhng thng tin chnh xc, ch khng phi l thng tin ch chnh xc trong mt trng hp no .

Nhng mo nh v cu trc mt bng tnhMt trong nhng li m chng ta hay mc phi khi to mt bng tnh, l chng ta khng thit lp v trnh by d liu theo ci cch m Excel v cc tnh nng ca n mong i. Sau y l mt s li ph bin chng ta hay mc phi khi thit lp mt bng tnh: B tr d liu trong nhiu bng tnh (Workbook) khc nhau B tr d liu trong nhiu trang tnh (Worksheet) khc nhau B tr d liu trong nhiu bng (Table) khc nhau C nhng hng trng v ct trng trong khi d liu (database) B trng nhng c d liu ging nhau (cng chung mt ngy, cng chung mt n v tnh, v.v...)

Ba im u tin trn y ch mun ni n mt iu: Bn nn lun lun c gng gi cc mi lin quan gia cc d liu c lin tc trong cng mt bng d liu. Ti thy rt nhiu cc bng tnh khng c trnh by theo ci quy tc rt n gin ny, v chnh v vy, cc bng tnh khng th tn dng c ti a cc tnh nng mnh m ca Excel nh PivotTable, SubTotal... Bn ch c th s dng cc tnh nng ny khi bn gom ht d liu ca bn vo trong mt bng tht n gin. Khng phi ngu nhin m Excel c 1.048.567 hng (65.536 hng trong Excel 2003 tr v trc) m li ch c 16.384 ct (256 ct trong Excel 2003 tr v trc). iu ny c ni rng, bn nn thit lp d liu ca mnh vi cc tiu ct nm hng trn cng, v cc d liu c lin quan th nm lin tc bn di tiu ca n. Nu nh bn c nhng d liu c lp li hai ln hoc nhiu ln trong cc hng ca cng mt ct (cc ngy thng, cc loi n v tnh chng hn), bn hy chng li s cm d b trng cc . Hy c gng sp xp (sort) d liu ca bn bt c khi no c th. Excel c rt nhiu nhng cng c tm kim v tham chiu cng thc, v mt s khng nh trong , i hi d liu phi c sp xp theo mt th t hp l. Vic phn loi cng s gip ch ng k cho tc x l ca mt s cc hm.

Nhng mo nh khi nh dngNgoi vic thit k cu trc ca bng tnh cho hp l, vic nh dng cho n cng l mt vn cn bn n. Mc d mt bng tnh nn c nh dng sao cho d c v d theo di, nhng chng ta t khi ngh n vic s dng thi gian cho c hiu qu. Hy lun lun nh dng tht n gin. Rt nhiu ngi lng ph thi gian vo vic nh dng mt bng tnh mc d khng nht thit phi lm nh vy, v chnh iu ny lm nh hng n hiu qu cng vic. Chng 1 GIM BT NHNG CC NHC KHI LM VIC VI BNG TNH

6Vic V thng xuyn p d dng nhng nh dng phc tp ch bng tnh cn lm cho n tng ho h c g k thc, v cho d bng tnh c bn c th trng gi nh mt tc phm ngh thut, ch v a h ng t , nh hng n li c th l m ni s h cho ng khc. Mt trong nh mt hi i hng kiu ph mu tt hi t nh m bn n p dng cho mt b ht nn g bng tnh, l mu en, m trng v mu xm mu v m. Mt M gi n l nn b trng v hng u tin trn cng (t nh l 3 hn Nhng a, b i n ht ng). g h ng ny s c dn cho nh ng ng tnh n ng nng c hn v sau, chn hn nh cao ng Advanced Fi A ilter, hoc d dng lm v iu kin cho cc cng thc x l d liu (DSUM, ng DMAX, v.v...) C ng q ng quan tm vic can l cho d liu. Theo mc nh Excel can phi cho n nh o h, nh o nh hng d liu kiu s,