unit 4 ms excel chapter 5

Upload: venkatarao-yanamadala

Post on 06-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    1/42

    Prepared byBoard of Studies, ICAI

    Chapter 5

    MACROS

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    2/42

    Section 1" MACROS

    Learning Objectives

    • Learn about Macros Settings,

    • Recording and executingMacros,

    •Deleting Macros

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    3/42

    Macros

    • Simplify routinetass!

    • "se macros to

    automate somecommon functions inyour spreads#eets!

    • $asily record macrosand play t#em bacto do t#e same t#ingmultiple times!

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    4/42

    Macros

    A macro is a

    piece of computercode, t#at is%ritten for $xcel,using t#e &isualBasic forApplications'&BA(programminglanguage!

     

    100hrs Information Technology Training © Board of Stdies! ICAI

    (Visual Basic Editor: An environment in which you

    write new and edit existing Visual Basic for Applications code and procedures.)

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    5/42

    Macros

     )o automate

    repetiti*e tass, youcan +uicly record amacro ! In Microsoft-.ce $xcel! /ou canalso create a macro

    by using t#e &isualBasic $ditor inMicrosoft &isual Basicto %rite your o%nmacro script, or tocopy all or part of amacro to a ne%macro!

    100hrs Information Technology Training © Board of Stdies! ICAI

     After you create a macro you can assign it

    to an o!"ect (such as a tool!ar !utton

    graphic or control) so that you can run it !y

    clic#ing the o!"ect.

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    6/42

    #na$ling %e&eloper Ta$

    100hrs Information Technology Training © Board of Stdies! ICAI

    0! Clic on-.ceButton

    1! Clic on

    $xcel-ptions

    2! -n Popular

     )ab c#ecS#o%De*elopertab in

    Ribbon

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    7/42

    #na$ling %e&eloper Ta$

    100hrs Information Technology Training © Board of Stdies! ICAI

    -nce you are done %it# t#e

    process you %ill #a*e t#eDe*eloper )ab ready

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    8/42

    Macros Settings

    In order to *ie%

    or alter t#e $xcelMacro SecuritySetting in $xcel1334 5

    Select t#e o.cebutton!

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    9/42

    Macros Settings

    6rom t#e *ery

    bottom of t#isdrop7do%n menu,select $xcel-ptions

    Select t#e )rustCenter -ption andfrom %it#in t#is,clic on t#e )rustCenter Settings!!!button

    6rom %it#in t#e

    Macro Settings100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    10/42

    Macros Settings

     )rusted Locations

    $xcel 1334 #asintroduced trustedlocations, %#ic# aredirectories on yourcomputer t#at $xcel 9les

    can be placed in, if you%ant no Macro c#ecs tobe carried out %#en t#e9le is opened! )#ismeans t#at, if placed ina trusted location, t#e

    Macros in your $xcel 9le%ill be enabled,regardless of t#e MacroSecurity Setting!

    100hrs Information Technology Training © Board of Stdies! ICAI

    Microsoft #as de9ned some defaulttrusted locations, %#ic# include t#efollo%ing locations on your computerdri*e5

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    11/42

    Macros Settings

    Program 6iles:Microsoft-.ce:)emplates

    Program 6iles:Microsoft-.ce:-.ce01:StartupProgram 6iles:Microsoft-.ce:-.ce01:Library

     )#ese locations are listed in t#e )rusted Locations option settingin your $xcel ;orboo, %#ic#

    can be accessed by t#efollo%ing steps5

    Select t#e main menu 'from t#eMicrosoft $xcel Logo at t#e topleft of t#e %orboo(

    6rom t#e *ery bottom of t#is

    drop7do%n menu, select $xcel-ptions

    Select t#e )rust Center -ptionand from %it#in t#is, clic ont#e )rust Center Settings!!!button

    Select t#e )rusted Locationso tion from t#e left #and menu100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    12/42

    Recording Macros

    100hrs Information Technology Training © Board of Stdies! ICAI

    0! Clic De*eloper )ab

    1! Clic on "se Relati*e Reference

    2! Clic on Record Macro

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    13/42

    Recording Macros

    )#is %ill gi*e usera dialog box! )ypet#e macro

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    14/42

    Recording Macros

    1! )o assign a C)RL

    combination s#ortcutey to run t#e macro,in t#e Shortct 'ey box, type anylo%ercase letter or

    uppercase letter t#atyou %ant to use!

    2! )o include adescription of t#emacro, in t#e

    Description box, typet#e text t#at you%ant!

    =! Clic -8 to start

    recording!100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    15/42

    Macros (ile

    $xcel #as t%oot#er 9le formatst#at storemacros5

    0! ?LSM 9les,%#ic# aremacro enabled%orboos, are

    stored using?ML!1! ?LSB 9les,

    %#ic# are%orboos

    stored in100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    16/42

    Rn a Macro

    $ou can execute the

    macro you "ust

    recorded !y either

    clic#ing on the

    %acro !utton on the&eveloper 'a! or !y

    pressing Alt

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    17/42

    Rn a Macro

    'o see what Excel

    did !ehind the

    scenes you can

    either clic# on

    %acros !utton on&eveloper 'a! and

    select Edit or you

    can press Alt **

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    18/42

    %elete Macro

    -pen t#e

    %orboo t#atcontains t#emacro t#at you%ant to delete!

    0! -n t#e%e&eloper tab,in t#e Code group, clic

    Macros!1! In t#e Macrosin list, select This)or'$oo' 

    2! In t#e Macroname box, clic100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    19/42

    #*cel +isal $asic #ditor

     )#e easiest %ay to access t#e&isual Basic $ditor in $xcel is topress t#e ey combination AL)7600

    'ie! press t#e AL) ey, and %#ilet#is is pressed do%n, press 600(!

     /ou %ill be presented %it# t#e

    &isual Basic $ditor, similar to t#eimage belo% 'note t#at your normal$xcel %indo% %ill remain openbe#ind t#is %indo%(!

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    20/42

    Section ," -rotecting)or'sheets

    Learning Objectives

    • Learn about opening non @ $xcel9les, importing text 9les,

    • Protecting %ors#eets andprotecting ;ors#eet elements!

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    21/42

    Opening a non #*cel (ile

     )#e user can open

    many dierent typesof 9les ')ext 9le,Lotus 012, uattroPro, ;ors, or dBAS$9les( in $xcel! )o

    open a nonexcel 9le50!Clic -.ce

    Button -pen!

    1! In t#e (iles oftype box selectt#e type of 9let#at #as to beopened or

    select All100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    22/42

    Opening a non #*cel (ile

    2! Locate t#e folder

    in %#ic# t#e 9le%as sa*ed!

    =! Select t#e9lename and clic-8!

    >! If t#e Te*t Import)i/ard dialog boxappears, select t#e%elimited! andclic Eext!

    F! Mar ot#erdelimiters until aparsed data,arranged in neatcolumns appearsin t#e pre*ie%

    %indo%! )#en clic100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    23/42

    Opening a non #*cel (ile

    4! Clic t#e #eading

    in t#e %atapre&ie %indo%for t#e column tobe formatted! Ift#e column

    contains numbers,select t#e2eneral option int#e Column dataformat section! Ift#e columncontains date,t#en select t#eDate option!

    G! Clic (inish andt#e data gets

    imported into t#e100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    24/42

    Importing te*t 3les

    'here are two ways

    to import data froma text file !y using

    %icrosoft +ffice

    Excel:

    $ou can open the

    text file in Excel or

    you can import the

    text file as an

    external data range

    (external data range: A range of data that is !rought into a

    wor#sheet !ut that originates outside of Excel such as in a

    data!ase or text file. ,n Excel you can format the data or

    use it in calculations as you would any other data.).100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    25/42

    #*porting te*t 3les

    'o export data from Excel

    to a text file use the SaveAs command.

    'here are two commonly

    used text file formats:

    &elimited text files (.txt) in

    which the 'AB character(A-,, character code //0)

    usually separates each

    field of text.

    omma separated values

    text files (.csv) in which thecomma character ()

    usually separates each

    field of text

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    26/42

    -rotecting )or'sheet

    If t#e %orboocontainscon9dentialinformation, a

    pass%ord canbe applied toit! )#is %illallo% only

    users %it# t#epass%ord toopen and *ie%t#e %orboo5

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    27/42

    -rotecting )or'sheet)o protect a%orboo follo%

    t#e steps gi*enbelo%5-pen t#e%orboo andselect Sa&e As from t#e O4ceBtton!In t#e Sa*e Asdialog box, clic

    t#e Tools buttonto display t#edropdo%n menu,and

    c#oose 2eneralOptions.100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    28/42

    -rotecting )or'sheet

    • $nter t#epass%ord in t#e-assord toOpen box!

    • )o #a*e a

    separatepass%ord forediting t#e 9le,enter t#e

    pass%ord in t#e-assord toModify box!

    • Clic -8!• In t#e Con3rm

    -assord100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    29/42

    -rotecting )or'sheet

    • Clic -8 toreturn to t#eSa*e Asdialog box!

    • Specify a9lename andpat# for t#e

    9le and clicSa&e!• If prompted,clic es to

    replace t#e100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    30/42

    -rotecting )or'sheet-rotecting aShared )or'$oo'"

    ;#en a %orboo iss#ared by manyusers, t#e Trac'Changes feature 'fortracing edits from

    t#e ot#er users( canbe #elpful! $xcel alsoenables users tos#are a %orbooand trac t#e

    c#anges! ;#en apass%ord is entered,t#e traced c#angescannot be remo*ed!

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    31/42

    -rotecting )or'sheet

    To protect andshare a workbook

    with tracked

    changes,

    Select Review  >‑  ‑

    Protect Workbook

    and Share

    Workbook option.

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    32/42

    -rotecting )or'sheet

    'he 1rotect-hared 2or#!oo#

    dialog !ox

    appears.

    hec# the

    Sharing with

    Track Changes

    option and enter

    a password if

    needed.

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    33/42

    -rotecting )or'sheet#lements

    *. -elect thewor#sheet that

    you want to

    protect.

    3. 'o unloc# anycells or ranges

    that you want

    other users to !e

    a!le to change

    do the following:

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    34/42

    -rotecting )or'sheet#lements

    Select each cell or

    range that you want to

    unlock.

    +n the o!e ta! in the

    Cells group clic#

    "or!at and then clic#"or!at Cells.

    4. +n the Protection ta! clear the #ocked 

    chec# !ox and then clic# $%.

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    35/42

    -rotecting )or'sheet#lementsTo hide any &or!ulas

    that you don't want to

    be visible, do the

    &ollowing(

    ,n the wor#sheet select

    the cells that contain the

    formulas that you wantto hide.

    +n the o!e ta! in the

    Cells group clic#

    "or!at and then clic#"or!at Cells.

    +n the Protection ta!

    select the idden chec#

    !ox and then clic# $%.

    100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    36/42

    6se Shared )or'$oo' toColla$orate /ou can create

    a s#ared%orboo andplace it on anet%or

    location %#erese*eral peoplecan edit t#econtents

    simultaneously

    100hrs Information Technology Training © Board of Stdies! ICAI

     %orboo and

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    37/42

    6se Shared )or'$oo' toColla$orate

    %orboo andenter any datat#at you %ant topro*ide, or openan existing

    %orboo t#at you%ant to maea*ailable formultiuser editing!

    1! -n t#e Re&ie tab, in t#eChanges group,clic Share)or'$oo' !

    2! -n t#e #diting tab, select t#eAllo changes$y more thanone ser at thesame time. This100hrs Information Technology Training © Board of Stdies! ICAI

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    38/42

    h d '$ '

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    39/42

    6se Shared )or'$oo' toColla$orate

    F! In t#e Sa&e in box,select a net%orlocation t#at isaccessible to t#eintended users, andt#en clic Sa&e!

    4! If t#e %orboocontains lins to ot#er%orboos ordocuments, *erify t#elins and update anylins t#at are broen,and t#en clic Sa&e on t#e 8ic' Access

    Tool$ar, or pressC)RLHS!

    100hrs Information Technology Training © Board of Stdies! ICAI

    6 i h C i

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    40/42

    6sing the Con&ersion(eatre

    )#e con*ersionfeature allo%s youto open

    %ors#eetscreated by ot#erprograms andcon*ert t#em to$xcel 1334

    %ors#eets,con*ert formulasinto t#e *aluest#ey display, andcon*ert grap#ic

    obects intobitmappedgrap#ics

    !

    100hrs Information Technology Training © Board of Stdies! ICAI

    S l ITT 8 i

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    41/42

    Sample ITT 8estions

    100hrs Information Technology Training © Board of Stdies! ICAI

    A

  • 8/17/2019 Unit 4 MS Excel Chapter 5

    42/42

    Ansers

    *. A

     

    3.

    4. B

    5. &

    6. &

    7. A

    8. &