Visual Basic for Excel 97/2000/XP

Size: px
Start display at page:

Download "Visual Basic for Excel 97/2000/XP"

Transcription

1 Visual Basic for Excel 97/2000/XP Practical workbook Aims and Learning Objectives By the end of these notes, you will know the basics of programming using Visual Basic for Excel. You will also be able to: record macros; write small subroutines and functions to automate some of the processes in your spreadsheets; use those functions within workbooks; use Excel workbook functions within Visual Basic; use Procedures; display message boxes and obtain input from the user; begin to apply error trapping to your procedures; create a simple form that can be displayed and used to input information into a macro and receive results from a macro. University of Bristol Information Services document exlvba-t1

2 Document Information Course documents and files N/A Related Documentation Other related documents are available from the web at: Other books are available: Writing Excel Macros, Steven Roman, (Excel 97 and 2000) O'Reilly Excel 97 Programming for Windows for Dummies, John Walkenbach Excel 2000 Programming for Dummies, John Walkenbach Excel 2002 Power Programming with VBA, John Walkenbach (Wiley and sons) Keyboard shortcuts The following keyboard shortcuts may be of use whilst using these notes: <Alt><F11> <F1> <F9> <Ctrl><Shift><F9> <F2> To open the Visual Basic Editor (VBE) or switch between the VBE and your workbook. Use within the VBE window to obtain help on VB functions, objects and properties. Click within the word you require help with (do not select the word) and press <F1>. Toggle breakpoints position your cursor on a macro statement within the Visual Basic editor and press <F9> to set a breakpoint. When the macro is run, processing is suspended at the breakpoint(s) to allow you to inspect variable values and see what is going on. To clear all breakpoints. Use within the VBE window to display the Object Browser window. Visual Basic for Excel 97/2000/XP (April 06) If you have any comments or queries about this document mail iser-docs@bristol.ac.uk. This document may be used wholly or in part by the academic community, providing suitable acknowledgment is made. It may not be used for any commercial or profit-making purpose without permission University of Bristol. All rights reserved.

3 Contents Keyboard shortcuts Related documentation Task 1 Virus protection...1 Task 2 Recording a macro...2 Task 3 Relative reference macros...3 Task 4 Editing a recorded macro...5 Task 5 Simple loop structures...7 Task 6 Debugging a macro...9 Task 7 Task 8 Using the Range object...10 Creating a function...11 Task 9 Rearrange macro...12 Task 10 Yes/No inputs...14 Task 11 Error trapping and GoTo...15 Task 12 MsgBox: Text & numerical values...16 Task 13 Applying formats using macros...17 Task 14 Text functions...19 Task 15 Worksheet functions in VB...21 Task 16 InputBox...22 Task 17 Creating and using a simple form...23 Appendix A Programming structure Appendix B Visual Basic objects Appendix C Declaration and scope of variables... 36

4 Introduction Excel is the University's recommended spreadsheet product for Windows on PCs. This document is intended for the more experienced user of Excel who wishes to make use of Visual Basic for Applications (VBA). This document does not intend to teach VBA or even the concepts of object-oriented programming. Instead the examples in this document have been devised to show various aspects of Visual Basic for Excel. John Walkenbach's book in the "...for Dummies" series (see Related Information) gives a good explanation of these. When attending courses in the training rooms in the Computer Centre the working files and solutions referred to in this document are located in the directory C:\User\Excel. If you are working on your own system, you need to download the file: copy it to a folder on your hard disk and run it before starting these notes. In many cases there is continuation from one example to the next. If you wish to skip a particular exercise you will need to load the solution file to the previous example. When working through the examples you may also like to try modifying them in order to make them applicable to your own uses of Excel. Prerequisites It is essential that you have grasped the concepts of names and conditional functions, covered in the document Further Excel XP (document excelxp-t3 - see the Related Documentation section for the location of this document on the web). Some experience of structured programming will be an advantage. Acronyms VB VBA VBE Visual Basic Visual Basic for Applications Visual Basic Editor

5 Task 1 Virus protection Objectives Comments To enable/disable Excel s macro virus protection. There are many problems with viruses that attach malicious executable files to applications. These are macros that are designed to cause damage and are built using all the flexibility and power that a Visual Basic Application offers the genuine programmer. Excel 97 and later versions have options to warn you if a spreadsheet or workbook that you are about to open contains macros. The solution files used for this practical document and the files you will create when working through these notes will contain macros that you will wish to run. You will therefore need to enable macros when opening them. However, it is not a habit you should get into - always consider each file on an individual basis and only enable macros if you believe them to be genuine. Incidentally, a poorly written macro could also cause unintended damage, so always check your own macros carefully before distributing them amongst colleagues/research groups. 1.1 Excel 97: From the Tools menu select Options. Select the General tab and ensure that Macro virus protection is selected. Click on OK. 1.2 Excel 2000/XP: From the Tools menu, select Macro / Security. Using the Security Level tab, read the available options and select Medium. Click on OK. With this option enabled you are prompted to take action if a spreadsheet contains macros. You can choose to open the workbook with the macros enabled, disabled or to not open the workbook at all. If you disable the macros, you will be unable to run any macros or recalculate custom functions. You can still examine and edit the macros. When you click Save on the File menu, the macros are saved. You can then close the workbook and open it again with macros enabled if you want to run the macros. Enabling the Macro virus protection only offers a warning to the existence of a macro. It does not scan the workbook for known prank macros. Additional virus protection software is available for this purpose. If you wish to know more about viruses and the virus protection available within the University, please see the online information available from 1

6 Task 2 Recording a macro Objectives Comments To record a simple macro to perform a repetitive task automatically. Although using macros may seem difficult at first, recording and playing back macros in Excel is really very easy. 2.1 Using a new (blank) workbook, select cell A From the Tools menu, click on Macro and Record New Macro. 2.3 In the Macro Name box enter the macro name Company_name. Assign a Shortcut key by selecting the Ctrl+ box and pressing <n>. Under Store macro in, select This Workbook. Edit Description as required and click on OK. 2.4 Select cell A1 and type The University of Bristol Select A1 and format it as Times New Roman, size 24, Bold and Italic. 2.5 Stop recording the macro (click on the Stop icon on the Stop Recording toolbar). If the Stop Recording toolbar is not available, you could display it using the View/Toolbars/Stop Recording. However, this would then be inserted into your macro and the toolbar displayed every time the macro is run. Use the alternative method instead: From the Tools menu, select Macro and Stop Recording. If you fail to stop recording the macro at this stage, you will create an infinite loop of record and playback. 2.6 Select Sheet2 and cell A1. If you do not have a Sheet2; from the Insert menu, select Worksheet. 2.7 From the Tools menu, select Macro and Macros. Select Company_name, click on Run and watch the result. 2.8 Select Sheet3 and click in cell A1. Run the macro again, this time by pressing <Ctrl>+<n>. 2.9 Insert a new Worksheet and click in a cell other than cell A1. Run the macro again and observe where the title heading and formatting are inserted Do not close the current workbook. 2

7 Task 3 Relative reference macros Objectives To record a simple macro to perform a repetitive task automatically, relative to the macro s starting point. 3.1 Create a new (blank) workbook. 3.2 Select A1. From the Tools menu, select Macro and Record New Macro. 3.3 In the Macro Name box enter the macro name Months. Assign a shortcut key by selecting the Ctrl+ box and pressing <m>. Again, store the macro in This Workbook. Choose OK. 3.4 Click on the Relative reference icon (on the Stop Recording toolbar) to record your macro relative to its starting position. When this icon has a sunken aspect, then Relative address mode is set. In any session VBE remembers various settings such as these between visits so check the setting is the desired one before starting recording more macros. It is recommended that you specify the Relative Reference option so that your macro turns out correctly no matter what cell you start in, relative to your starting position. If this option is not selected, Excel uses absolute cell references. This means that the macro always starts in the same cell reference as in the previous task. If the Stop Recording toolbar does not appear, first stop your macro from recording: - From the Tools menu, select Macro, Stop Recording. Add the Stop Recording toolbar to the list of available options: - From the View menu, select Toolbars, Customize. - Select Stop Recording from the list of available toolbars and click on Close. You will now need to start recording your macro again from task Type January then copy (auto-fill) this across the row to cell L1, to get January:December. Change the format of the cells; for example, font, size, bold, etc. Format these cells so that they are vertically aligned (orientation 90 degrees). Select the columns A:L and AutoFit the column selection to make them bestfit. 3.6 Click in cell A2 and Stop recording the macro (as in task 2.5). 3.7 Select Sheet2 and click in any cell other than A1. Run the macro (<Ctrl>+<m>) and watch the result. Do not close the workbook. These macros have been saved in the relevant workbooks. When the workbook is closed, any macros available within it will no longer be available to open workbooks. If you then want to create macros available for use in all your workbooks you will need to store them in the Personal Macro Workbook. To do this, select Personal Macro Workbook from the Store macro in the dropdown box of the Record Macro dialog box (in task 3.3). 3

8 If you want to make any changes to the macro (as in the next task) you will first need to unhide personal.xls. From the Window menu, select Unhide and with personal.xls highlighted, click on OK. When you quit Excel you will be asked if you wish to save the changes made to the personal macro workbook. If you click on Yes, the file personal.xls is opened as a hidden workbook. Personal.xls is stored in the folder (for a default installation of Windows NT): c:\winnt\profiles\username\application Data\Microsoft\Excel\XLStart OR: (for a default installation of Windows 2000/XP): C:\Documents and Settings\username\ApplicationData\Microsoft\Excel\XLSTART. The personal.xls workbook is opened next time you start Excel and is not available to other users. 4

9 Task 4 Editing a recorded macro Objectives Comments To introduce the Visual Basic Editor (VBE). Quite complicated macros can be written simply by recording tasks as you have done above. However, Excel converts these tasks to a programming language called Visual Basic. More advanced macros can be written in this language. 4.1 From the Tools menu, select Macro and Macros. Select Months and click on Edit. Figure 1 - Visual Basic editor (months macro) The Microsoft VBE appears similar to Figure 1. The left-hand pane shows what projects (i.e. workbooks) are being used and lists the items (Sheets and Modules) in a particular project. In general the macros you create are stored in a module. Double-clicking on this pane allows navigation between modules in the same or different workbooks. The right-hand pane contains the contents of the current module you are working on. Your macro is listed in the module window as a subroutine (Sub). 4.2 Take a look at the programming used for your Months macro. 4.3 You may also like to look at the Company_name macro created in task 2 to see how the relative references make a difference. Using the left-hand pane, navigate to VBA Project (Book1)/Modules/Module1 (replacing Book1 with the name of your workbook). 4.4 Return to the Months module and, if you wish, make a small change (such as the font size). Make sure that you modify the last occurrence of.size= in the macro. In some cases, such as the simple macros recorded so far, it may be quicker to delete and re-record the macro than edit the code. 5

10 4.5 From the File menu, select Close and Return to Microsoft Excel. If you made any changes to the code, run your macro again. 4.6 Close any open Excel workbooks, discarding changes. This example shows how some objects are referenced in VBA and illustrates the WITH END WITH programming structure. Appendices A and B define other programming structures, common programming terms, and give more information about Visual Basic objects. Now would be a good time to take a brief look at these notes. Lines that are just text comments and not Visual Basic commands are preceded with a single quotation mark. If you forget to assign a shortcut key (such as <Ctrl>+<m>) to a macro at the time of recording, you can assign one later by returning to the workbook and, from the Tools menu, selecting Macro/Macros and the Options button. 6

11 Task 5 Simple loop structures Objectives Comments To write a macro to enter values into a workbook using a simple loop structure. This task uses a single, self-contained subroutine and there is no need to explicitly declare any variables used. See the note at the end of this task for a caution on using variables in this manner. It introduces the cells object as a way of referencing a particular cell 5.1 Create a new (blank) workbook. 5.2 From the Tools menu, select Macro / Visual Basic Editor (or press <Alt>+<F11>). 5.3 From the Insert menu, select Module. A new (empty) module appears in the right-hand pane of the VBE (if Option Explicit is entered at the top of your module, highlight and delete it). This module will contain your Visual Basic code. 5.4 From the Insert menu, select Procedure. 5.5 In the name box, type myloop and click on OK. 5.6 In Excel spreadsheets we refer to cells by their column letters and row numbers (for example, A1). In a Visual Basic procedure we can use the cells object, for example cells(1, A ), to refer to cells in the same way see the following example. Enter the code (in bold below): Public Sub myloop() Rw = 1 For Numb = 1 To 100 Cells(Rw, A ) = Numb Rw = Rw + 1 Next Numb End Sub In this example the column used is fixed (A). The first number is entered in column A, row 1 and increased by 1 until all the numbers (up to 100) have been entered. In macros it is usually more flexible to refer to columns by a number rather then by a letter. The cells object allows this, for example cells(1, 2) refers to the same cell as cells(1, B ). 5.7 From the Run menu, select Run Sub/UserForm (or press <F5>). If you had more than one procedure (or form) you would be asked to select the one you wished to run. 5.8 Switch back to the worksheet to see the results (<Alt>+<F11>). Terminology - your recorded macro has been saved as a subroutine within a module in your workbook. Indentation is used in the program loop above. This makes it easier to follow the various structures within procedures. See Appendix A for a definition of common programming terms and examples of other ways of getting code to be repeated. 7

12 This example makes use of variables that we choose to call Rw and Numb. They contain temporary values that are changed as the macro is run. We have not specified what kind of values are to be stored in these variables. As programming beginners this is probably the best course of action. Visual Basic treats these variables as of type Variant and is very tolerant of the kind of information that can be stored in them. Sometimes this tolerance can lead to undesirable errors. See Appendix C for information on how you can specify variables more precisely. 8

13 Task 6 Objectives Comments Debugging a macro To introduce the Visual Basic debugger. Some mistakes in coding a program will cause Visual Basic to give an error message. Clicking on <Debug> will enter the VBE, highlighting the error. 6.1 Using the macro created in the previous task, switch to the VBE (press <Alt>+<F11>). 6.2 Alter the line Cells(Rw, "A") = Number to: Cells(Rww, "A") = Number Figure 2 - run-time error message box Re-run the macro; a runtime error message dialog box is displayed, see Figure 2. Click on Debug. You should now be in the Visual Basic run-time debug mode with the line causing the problem highlighted. 6.3 Position the mouse cursor over a variable, for example Number. that the current value for the variable is displayed. 6.4 Position the cursor over the misspelt variable, Rww. The text Rww = Empty is displayed. 6.5 Correct the mistake (remove the extra w). 6.6 From the Visual Basic Run menu, select either: Continue to resume processing the macro, OR: Reset and then switch to the worksheet before re-running the macro. When editing a Visual Basic macro you can position the cursor on a macro statement and set (or unset) breakpoints (from the Debug menu, select Toggle Breakpoint or press <F9>). When the macro is next run, execution will stop before the statement and enter into the debug mode. You can then inspect variables and see what is going on. To restart the macro, from the Run menu, select Continue. To clear all breakpoints, from the Debug menu, select Clear All breakpoints (or press <Ctrl>+<Shift>+<F9>). 9

14 Task 7 Using the Range object Objectives Comments To format a particular range of cells in a chosen way. This task introduces the Range and Selection objects and the With End With language construct. 7.1 Switch to the VBE. 7.2 Insert the following lines (in bold) immediately above the End Sub statement: Range( A1:A100 ).Select With Selection.Font.Name = Arial.Size = 14 End With We can refer to ranges of cells as Range("A1:J10") or even Range( A1, J10 ). The latter format allows us to specify two arguments which define the start and end cells respectively. Using the cells object to specify these arguments enables us to replace actual numbers with variables For example: Range(cells(1,2),cells(rw,2)) defines a range in column B that begins at row 1 and ends at the row rw (i.e. if rw contains 3 the range would be $B$1:$B$3) The Select method of the Range object is used to highlight a particular range. The Selection object refers to whatever range is highlighted. Cells can have their format attributes set directly. For example, Range( A1:A100 ).Font.Name = Arial Quite often it is convenient to use the With End With language construct so that the attributes of a range of cells can be set without repeating the range specification each time. NB References to objects within the construct that begin with. are assumed to have the With object as their parent object. 7.3 Switch to the spreadsheet, delete the contents and run the myloop macro. the effect of the formatting on the cells. 7.4 Close your workbook. There is no need to save it. 10

15 Task 8 Creating a function Objectives Comments To demonstrate how user-defined functions can be easily created and used. Excel has a large number of functions available, but there are times when it is necessary to create a user-defined function to perform a particular calculation. These functions cannot be created using the macro record and playback actions within Excel, but must be entered into the VBE. 8.1 Create a new workbook. 8.2 Open the VBE (use <Alt><F11> as a shortcut). 8.3 From the Insert menu, select Module. 8.4 From the Insert menu, select Procedure. In the Add Procedure dialog box, enter the name times100 and from the Type section, select Function (Public should already be selected from the Scope section). Click on OK. A user-defined function is used in the same way as an Excel function. It has a name (in this case, times100) and a number of arguments (in some cases, zero). We will define a function that takes one numeric argument, multiplies it by 100 and returns the result. 8.5 Place the cursor between the brackets on the first line. 8.6 Enter a variable name for the argument; for example, n. 8.7 Move the cursor to the empty line of the function and enter the command times100 = n * 100. Your function should be similar to the one below: Public Function times100(n) times100 = n * 100 End Function 8.8 Switch to the worksheet, select cell A1 and enter a value. 8.9 In cell B1, enter the function =times100(a1). Functions and subroutines created in VBA are not case-sensitive Try changing the value in cell A1 and note the result Close and Save this workbook; you will need the function in a later task. 11

16 Task 9 Rearrange macro Objectives Comments To create an application to rearrange student marks for processing. Try typing the subroutine in lower case and notice how the editor formats your commands. This task assumes a working knowledge of cell and range names (covered in document exl00-t3). It introduces the Set statement that is used to assign a range to a range object variable. This variable can then be used wherever you would normally use the range. 9.1 Open the file Exam1.xls (in Computer Centre training rooms, this is in the folder C:\User\Excel). The worksheet contains some subject results for fictional students (Figure 3). Figure 3 - Exam1.xls (fictional table of results) Figure 4 - sample of rotated data This task will rotate those results (Figure 4) in order to make use of other features within Excel such as Subtotals and PivotTables. 9.2 Highlight the range A1:G13 and define a range name, area. Click in cell I1 and define a name, areaoutstart. 9.3 Switch to the VBE and insert a new module. Insert a new procedure (subroutine) named rearrange. 12

17 9.4 Enter the code below (in bold): The following text is available in the working folder as task9_4.txt to copy and paste if you prefer not to type it. Take a few moments reading through the code to get an idea of the structure and what might be happening. Public Sub rearrange() Set ar = Range("area") Set arout = Range("areaoutstart") ncols = ar.columns.count nrows = ar.rows.count aroutr = 2 countblankcells = 0 arout.cells(1, 1) = "Name" arout.cells(1, 2) = "Subject" arout.cells(1, 3) = "Mark" For r = 2 To nrows For c = 2 To ncols If Not IsEmpty(ar.Cells(r, c)) Then arout.cells(aroutr, 1) = ar.cells(r, 1) arout.cells(aroutr, 2) = ar.cells(1, c) arout.cells(aroutr, 3) = ar.cells(r, c) aroutr = aroutr + 1 Else countblankcells = countblankcells + 1 End If Next c Next r End Sub The variable countblankcells is used to calculate the number of blank cells encountered when running the macro. The total number will be displayed at the end of the macro (see task 12). For programming flexibility we make use of variables (in this case ar and arout) to point at the input and output ranges. Such variables must be assigned values using the Set command rather then just using the = assignment statement. Without any leading range qualifier, cells references all the cells within the currently active worksheet. But with a leading range object it is made to reference the cells relative to that particular range. For example, ar.cells(1,1), references the first cell in whatever range that ar points at. The solution example, vbexam_a.xls, contains comments to explain the use of these variables and functions. 9.5 Switch back to the worksheet (click on the icon in the Status bar or use <Alt><F11>). 9.6 Save your workbook. 9.7 From the Tools menu, select Macro/Macros and with the rearrange macro selected, click on Run. 13

18 Task 10 Yes/No inputs Objectives Comments To display a message box requesting input from the user of the macro and use that input to determine what actions your macro will take. If you have not successfully completed the previous task, you will need to open the solution file vbexam_a.xls before starting Switch to the VBE At the top of your macro module (immediately below the line Public Sub rearrange()), insert a new line and add the line macroname = rearrange. This name will be used for message display in the dialog boxes created below Insert a new row between nrows = ar.rows.count and aroutr = 2. Type the following code (shown in bold): nrows = ar.rows.count arout.range(cells(1, 1), Cells(1, 3)).Select Msg = "This macro may overwrite cells starting at range shown." Reply = MsgBox(Msg & vbcr & _ "Do you want to continue?", vbyesno, macroname) If Reply <> vbyes Then MsgBox "Macro abandoned", vbokonly, macroname Exit Sub ' quit the macro End If aroutr = 2 As you type functions, for example MsgBox, you will notice that the editor displays the parameters required by that function. Appropriate dropdown boxes also provide shortcuts as you type your procedures. The ampersand character, &, is used to string together text strings and text variables whilst the underscore character, _, allows you to continue a single line command on the following line for display purposes. Blank spaces are ignored. Indentation in an application is used to make the program easier to read and debug. The standard constant vbcr is used to insert a carriage return into your dialog box. The standard constant vbyes is returned if the Yes button is clicked in reply to the message. The operator <> is used to denote not equal to Switch back to the worksheet and save your workbook Highlight and delete the results of the previous task and from the Tools menu, select Macro/Macros and with the rearrange macro selected, click on Run. Test your macro using both No and Yes inputs to your dialog box Take a few moments to read the comments (preceded by a single apostrophe) in the solution file vbexam_b.xls. 14

19 Task 11 Error trapping and GoTo Objectives Comments To introduce some error trapping. The rearrange macro created in the previous tasks requires that two range areas be defined before the macro is run. If these ranges are not defined, Excel will generate an error and the macro will fail. By checking for this error, you can display a sensible message and exit the macro cleanly Using the macro created in the previous task switch to the VBE. If you have not successfully completed the previous task, you will need to open the solution file, vbexam_b.xls, before starting Immediately beneath the line macroname = rearrange, insert a new line and type: On Error GoTo errmsg If the ranges area and areaoutstart have not been defined in your spreadsheet, the macro will jump to a point labelled errmsg (defined below in task 11.4) Beneath the lines set ar and set arout add the command On Error GoTo 0. This section of code should now resemble: On Error GoTo errmsg Set ar = Range("area") Set arout = Range("areaoutstart") On Error GoTo 0 Any errors encountered from this point on in your macro will display the normal system errors rather than the one you specify in the errmsg section Scroll to the end of the macro and add an errmsg section immediately above the last (End Sub) line: errmsg: MsgBox "Bad input/output range.", vbokonly End Sub 11.5 Immediately above the errmsg: line, add a new line Exit Sub to ensure that this error message is only reached from the GoTo command entered in task Switch to the spreadsheet and save your workbook Delete your previous output and check that the macro runs without error. Try deleting one or both of the range names (from the Insert menu, select Name / Define) and test the macro again. You may also wish to check that the selected input range ar is sufficiently big and that the output range areaoutstart is not within the input range, area. Your macro should then exit after displaying a dialog box. Open and examine the example spreadsheet vbexam_c.xls for a suggested solution to this additional checking Close and reopen your workbook without saving any changes. 15

20 Task 12 MsgBox: Text & numerical values Objectives Comments To calculate the number of lines output by the rearrange macro and output the result in a dialog box together with the total number of blank cells encountered (if any). The variables aroutr and countblankcells introduced in task 9 contain the values required for this exercise If you have not completed the previous tasks, first open vbexam_c.xls Switch to the VBE and scroll to the foot of your macro Between the lines Next r and Exit Sub, add the following code: If aroutr > 1 Then arout.cells(aroutr - 1, 3).Select MsgBox "This macro has output " & _ Str(aroutr - 2) & " lines." & vbcr & _ "It found " & Str(countblankcells) & _ " blank cells.", vbokonly, macroname Else MsgBox "No lines output!", vbyesno, macroname End If 12.4 From the File menu (still within the VBE), select Close and Return to Microsoft Excel Save your workbook and test the macro. Vbexam_d.xls contains a working solution to this exercise Close any open workbooks. There is no need to save changes. 16

21 Task 13 Applying formats using macros Objectives To produce a small Visual Basic Application (VBA) that checks the current formatting of cells within a worksheet and removes the percentage sign if a particular format has been used. Comments This task assumes that you have successfully completed task Open the file created in task 8 (Creating a function) and press <Alt>+<F11> to switch to the VBE. Insert a new Procedure, named RemoveSign (type = Sub, Scope = Public) We first need to select the last cell in use within the active worksheet. Enter the following code into your procedure: ActiveSheet.Cells.SpecialCells(xlLastCell).Select ir = ActiveCell.Row ic = ActiveCell.Column For rw = 1 To ir For col = 1 To ic If IsNumeric(Cells(rw, col)) And Not _ IsEmpty(Cells(rw, col)) Then in_no = Cells(rw, col) If Cells(rw, col).numberformat = "0.00%" Then Cells(rw, col) = times100(in_no) Cells(rw, col).numberformat = "General" End If End If Next col Next rw Working through this code from top to bottom: The last cell in the worksheet is located and the variables ir and ic are set to the row and column position values of that cell. The For Rw and For Col structures ensure that the procedure loops through each row and column used in the worksheet. The first If End If structure checks to see if the current cell is not empty and that its value is numerical. If these conditions are not met, the procedure moves to the next column/row. If the conditions are met, the variable in_no is set to the value of the current cell and the next If End If statement looks to see if the current value is formatted as a percentage with 2 decimal places. If it is, the value is multiplied by 100 (using the function created in task 8) and a general format applied Switch to the worksheet view, save your file and enter some values in your worksheet (ensuring you have one or more numeric values formatted as percentages with 2 decimal places) Test your VBA (vbformat.xls contains a working solution with some sample values to test it on) The second If End If statement in the above code could be extended to deal with Percentage formats with different numbers of decimal places (see the commented out section of vbformat.xls). 17

22 13.6 Close any open workbooks. 18

23 Task 14 Text functions Objectives Comments To create a function to reverse text strings and use this function to extract a surname from a text string containing a full name. The application assumes that the surname is the last word in a string. You may wish to extend this task to take into consideration surnames such as in Daphne du Maurier or van der Start a new workbook In cell A1, enter the text Name. Enter the names Mr A B Brown, Pat Smith, Dr White and A B C Evergreen in cells A2, A3, A4, A5 respectively. Resize column A to fit the text entered In cell E1, enter the text Surname Open the VBE Create the function rev as below: Public Function rev(t) rev = "" ct = Len(t) For i = ct To 1 Step 1 rev = rev & Mid(t, i, 1) Next i End Function StrReverse was introduced as an Excel Visual Basic function with the release of Excel If you are using Excel 2000, try the simpler method below: Public Function rev(t) rev = StrReverse(t) End Function 14.6 Return to the worksheet and select B2. Enter the formula =rev(a2) to calculate the reverse of the string in cell A2. Resize column B if necessary In cell C2, enter the formula =FIND(" ",B2) to find the location of the first space character in the text string in cell B2. As B2 now contains the reverse of the original text string, this locates the location of the last space character in the original string In cell D2, enter the formula =LEFT(B2,C2-1). This takes the left hand side of the reversed string up to, but not including, the space character. In other words, the surname part of the original text string reversed. If there are no spaces in the original name, then the formula in column C will produce an error. In this case additional steps can be taken to deal with this scenario In cell E2, enter the formula =rev(d2) to reverse the string and return the surname as required Copy the formulae in the range B2:E2 into rows 3 to 5. 19

24 14.11 Select columns B:D and from the Format menu, select Column/Hide. See vbreverse_a.xls for a working solution. This function could be extended to include the actions performed by columns B to E. The next task demonstrates this. 20

25 Task 15 Worksheet functions in VB Objectives Comments To extract the surname from a text string containing a name. This task reuses the text entered in the previous task but not the function rev nor the formulae If you completed the previous task, unhide columns B:D and delete the formulae in the range B2:E5. Otherwise enter the text as described in tasks 14.1 to 14.3 above Switch to the VBE Create the following VB function: Function getsurname(t) backtext = rev(t) spaceloc = Application.WorksheetFunction. _ Find(" ", backtext) backsurname = Left(backText, spaceloc - 1) getsurname = rev(backsurname) End Function 15.4 Switch to the worksheet and click in cell B2. Enter the formula =getsurname(a2) Copy (drag & fill) this formula into the range B3:B5. The file vbreverse_a.xls contains a working solution. Application.WorksheetFunction can be used before many (but not all) Excel Worksheet functions. Occasionally there is a VB function that does approximately the same job as a worksheet function in which case they will usually share the same name e.g. trim. the use of the word approximately the operation of VB trim is different from the worksheet function trim with respect to the treatment of internal spaces in strings! As you type your code, type Application.WorksheetFunction and examine the list of options displayed in the dropdown box. There is a Visual Basic function called InStr that does the same job as the Excel Find function and would be more efficient to use. This task simply demonstrates the use of an Excel worksheet function within a Visual Basic macro. 21

26 Task 16 InputBox Objectives To obtain and use input from the user. Comments You must first have successfully completed task With the worksheet created in task 15 open, switch to the VBE From the Insert menu, select Procedure Type the name Surname and click on OK Complete the procedure as shown in bold: Public Sub Surname() mystring = InputBox("What is the full name?") Msg = "The surname is " MsgBox Msg & getsurname(mystring), vbokonly End Sub 16.5 Run the procedure (press <F5> or from the Visual Basic Run menu, select Run Sub/UserForm) When prompted, enter the name Dr P A Brown and click on OK. See vbreverse_b.xls for a working solution together with additional code for allowing the user to select the Cancel button (or press the <Esc> key). The solution also deals with blank and numeric values entered into the dialog box. Using forms to obtain and display info. 22

27 Task 17 Creating and using a simple form Objectives Comments To create a simple form (also called a dialog box) to obtain and display info. More details about dialog boxes are given in document exlvba-t Open a new (blank) worksheet and switch to the VBE In the Project Explorer window double click the appropriate project for the new book This ensures you are going to be working on the new VB project rather than any other VB projects you may have worked on previously From the Insert menu, select Module You will need this module later to insert the macro code that will display the form when it has been created From the Insert menu, select Userform Notice that a new kind of item Forms is now displayed in the Project Explorer window. This is where forms get stored. In the windows to the right you should see an empty form design window labelled Userform1 and a Toolbox window 17.5 Use the mouse to select the following controls on the Toolbox and drag them onto the form labelled UserForm1 (once on the form you can still use the mouse to drag them to suitable positions avoid overlapping them) : the RefEdit control the TextBox control the CommandButton control In the Toolbox you can determine which control is which by resting the mouse on a control it will display the kind of control that it is in a popup window. If you ever lose the Toolbox window you can use the View / Toolbox VBE menu command to show it again Right click on any of the controls in the form and select Properties from the drop down list. A list of all the properties that control the behaviour and look of the selected control is shown. that there is a (name) property for each control - this is used to identify the control in VB code. It and the other properties can be altered either via the properties window or in VB code. Do not alter any of the properties now Double click on UserForm1 in the Project Explorer window to re-show the form currently being designed Right click on the CommandButton1 control in the form design window and select View Code from the drop down list. A window displaying the code that will be obeyed when the control gets clicked is displayed. Initially this code is: Private Sub CommandButton1_Click() End Sub 23

28 17.9 Insert the following line before the End Sub line: If refedit1.value <> then call doit (refedit1.value) This line tests the refedit1 value against the null string (two consecutive double quotes) and only calls doit if it has a non-null value. The <> character string means not equal to In the Project Explorer window double click on Module1 to bring up the empty module we inserted previously and type in the following code: Public Sub doit(add) Set rngvar = Range(add) UserForm1.TextBox1.Value = rngvar.value End Sub Public Sub showform() UserForm1.Show End Sub You have now provided a macro called showform that will display userform1 and a function called doit that gets called when the command button on the form gets clicked. doit gets the value from a particular address and copies it into the textbox1 control. Please note that by default the Show command displays a form so that the user cannot to do anything further within Excel until a response is made to the form. To remove a form click the "X" icon at the top right of the form Display the showform macro. To do this - switch to the Excel Workbook, enter some value into a cell and then run the showform macro. The form should now be displayed Click on the right hand part of the refedit1 control (this is a grey rectangle with a black underscore in it). A small popup window labelled UserForm1 with an icon that has a little red arrow on it is displayed Use the mouse to locate and click on the cell that you previously gave a value. that the address of that cell has now been entered in the popup window Click on the icon with the red arrow to return to the form Now click the CommandButton1 control on the form. You should find whatever value was in the cell has now been copied into the TextBox control. There are many types of controls that do fancy things. They are not always available by default. The controls are stored in special files. In general these files have to be located or downloaded. The VBE Tools, References menu item can then be used via its browser to make the object(s) available to the VB language. The Tools, Additional Controls menu item can then be used to add the control items onto the Toolbox window so they can be selected. The RefEdit control may not be available by default in Excel 97. It is contained in a file called REFEDIT.DLL which is usually stored in the Program Files/Microsoft Office/Office directory. It can be made available by 24

29 using the VBE Tools References and Additional Controls menus as outlined above. 25

30 Appendix A Programming structure Comments This appendix includes some definitions of programming terms and examples of common programming structures (constructs) available to you when writing VBA code. For further information on their use, please see the online help system. Where square brackets [ ] are used, this indicates that this part of the structure is optional. For our purposes you can regard a program (or macro) as a number of statements that are interpreted by the computer according to a set of syntactic rules. Each set of rules correspond to a particular language for instance there are languages called FORTRAN and VISUAL C. The language that is used in the Excel environment to provide macros is called VISUAL BASIC FOR EXCEL. This language is used with slight differences for many other Office applications e g there is VISUAL BASIC FOR WORD. These are all grouped together as a product called VISUAL BASIC FOR APPLICATIONS (or VBA for short). The facilities available are identical except for the objects that are made available for manipulation. For instance, by default, the ACTIVECELL object would be available in Excel but not in Word. They share a common editor (VBE for short) and navigation window environment (called the PROJECT EXPLORER). (There is also a stand alone product called just VISUAL BASIC which can be used to create stand alone executable programs and does not need an Office product to be running but this course is not concerned with this). Before you can start typing new macros or changing old ones you must go to the Visual Basic Editor (VBE) window, use the PROJECT EXPLORER window to select the project (i.e. the workbook your macros are associated with), and then either insert a new module or double click on an existing module - the statements associated with the module will then be shown in a separate window. Modules are attached to particular workbooks and used to store macros. There can be more then one module in a workbook and each module can hold many macros. A Macro will consist of one or more PROCEDURES. A procedure is a named set of programming statements. Statements normally get obeyed one at a time starting at the beginning. However you can use certain language constructs (i e special words ) to change what statements get obeyed next and also to instruct the computer to repeat certain instructions many times over. The statements themselves are case independent (but sometimes when you enter the statements into the VB editor it itself changes the case to get a consistent appearance). In general the amount of spacing between the words used in the language is left up to you (but you are advised to indent lines with leading spaces to improve the visual presentation of the program). Visual Basic for Excel 97/2000 (exlvba-t1) 26

31 The VB Programming Language A set of syntactic rules used to create a program. A program is defined by one or more subroutines and any number of functions. A procedure may be either a subroutine or a function. Each subroutine must have specific start and end instructions. Example Sub My_Program().. End Sub Each function must have specific start and end instructions. Example Function My_Function(arg).. End Function Scope of procedures Functions can be called (executed) from other VB subroutines or functions, or by a call via the contents of an Excel cell. Subroutines can be called from other subroutines or functions or via the Excel Tools Macro menu or via the VBE Run menu. If their scope is Public then the item can be called from any module in the workbook or from the Excel Tools Macro menu (if a Subroutine) or Excel cell (if a Function). If their scope is Private then the item can only be called from the module in which the item is defined. By default the scope is set to Public. Scope can be specifically set by preceding the Sub or Function definition by the desired scope. Example Public Function my_calc() Forms Besides procedures, VBE can also be used to create forms. These are special windows (known as custom dialog boxes) that contain a mixture of text and special controls (such as command buttons, pull down lists etc). These controls can be selected from a special toolbar called a toolbox and positioned in the window. VB code can be associated with the controls such that clicking on a control can start off programming activity. A separate course document called VB Excel 97/2000: Custom dialog boxes (document exlvba-t2 see Related Documentation section for the location of this document on the web) is available that deals with this. Before moving on to this subject you are advised to finish the current course document. Comments It is a good idea to include informative non-executable comments into a program. Any line or part of a line that begins with the character is ignored by VB language interpreter. Example Putting comments in a program is good practice Visual Basic for Excel 97/2000 (exlvba-t1) 27

32 Continuation Sometimes it is convenient to split a single statement over more then one line. To do this the underscore character preceded by at least one space character is used. Example Sub _ My_Program() Constants Fixed values such as say 12 or TRUE or "THIS IS AN ERROR" Variables A named item that can contain some information. There are some rules to the names you can choose. (No spaces are allowed). For clarity avoid the use of special programming words such as if and special Excel words such as range or cells. Declarations Optionally (in VB) you can list the variable (and its type) before its use, using declaration statements. Example dim i as integer Types of variable Variables can hold various types of information e.g. Boolean, Integer, Long (long integer), Single (single-precision floating-point), Double (double-precision floating-point), Currency, Date, String or Variant. If you do not specifically declare the type of a variable it will be given the Variant type. VB is very flexible when dealing with variant variables. Assigning values to variables Programming statements such as the following do this: Example x=12 errmsg="you have made a mistake" torf=true Expressions A mixture of constants, variables and operators that produce a value as their result. Example x+1 (x+y)/3 +4*z Objects Variables can also be "objects" such as Excel workbooks, worksheets, cell address ranges, type of fonts, charts etc. Objects have a position in a hierarchy. For example, the Range object is below the Worksheet object which is below the Workbook object. The VB help system will show this relationship. Visual Basic for Excel 97/2000 (exlvba-t1) 28

33 Often when referring to objects they will be defined by listing the parent object first and then the object itself e.g. Example Worksheets("Sheet1").Range("A1") A period is used as the separator between objects. Often if a parent object is not specified a default object will be assumed to be the parent. For example, the Activesheet object is assumed if a Range object is not qualified by a parent object. Properties and Methods of Objects Objects have Properties that describe certain attributes about them and Methods that operate on them to change their state. The size of a Font object for instance is referenced using the Size Property of the Font object. Example Range("A2").Font.Size=12 To clear the contents of a particular range you can use the Clear method of the Range object. Example Range("Z1:Z4").Clear A period is used as the separator between the object and the Property or Method. Quite often the properties and methods of an object will themselves have parameters that need be specified before getting the desired result. Example Range("A1").Cells(2,3) This results in a reference to a cell which is 2 rows down and three columns across from Cell A1. The Cell property can be given two arguments to qualify it. More information about objects is given in Appendix B. Testing variables You can use the IF.. THEN construct or IF.. THEN... ELSE constructs to do this. Example If x=1 then y=1 If ans="yes" Then test="test ONE" Else test= "TEST TWO" You can also use a multi-line IF... THEN [ELSE ] ENDIF construct to do testing. Example If ans="yes" Then test="test ONE" x=1 Else test= "TEST TWO" x=2 Endif Visual Basic for Excel 97/2000 (exlvba-t1) 29

34 Looping Various constructs enable you to get a set of instructions performed many times. For example, the FOR... NEXT construct does this. The complete program that follows illustrates this: Example Sub SumCol() colnum = 2 startrownum = 10 endrownum= 20 sumct = 0 For rownum= startrownum To endrownum ' we now use the CELLS property of the RANGE object to get the value of a particular cell, and then add it the current value of sumct and store the new total back into sumct overwriting what was there previously. sumct = sumct + Range("A1").Cells(rownum, colnum) If sumct > Then Exit For Next ' sumct will now have the sum of column 2 for rows 10 to 20. ' - Unless of course the sum was greater then when ' it will contain whatever sum forced the exit statement from the loop. MsgBox Str(sumct) ' MsgBox is a standard instruction that will output information to the screen. ' Str is a standard function that takes an argument of type numeric and converts it to type text, suitable for display purposes. End Sub Some Common Programming structures For To [Step ] Next Example For counter = startval To endval Step 2 tot=tot+counter if tot >1000 Then Exit For the Exit For instruction if executed causes a jump to the instruction that follows the Next statement. Next [counter] Do Loop Until Example ct=0 Do ct=ct+10 Loop Until ct>1000 Visual Basic for Excel 97/2000 (exlvba-t1) 30

35 If Then [ELSE ] Example If x=1 Then y=1 Else y=0 Alternatively, using the block syntax: Example If x=1 Then y=1 z=1 Else y=0 z=0 End If For Each Next Example For Each cht in Sheets( Sheet1 ).ChartObjects cht is set in turn to each embedded chart object on Sheet1 cht.chart.charttype = XlLine sets the specified chart type to be a Line Chart Next cht Example For Each cl in Selection The Selection object is the currently highlighted range. cl is set in turn to each cell in that range. cl.font.size=10 cl.value=0 Next cl With End With Example With Selection.Font.Size=12.Italic=true End With Select Case [Case Else ] End Select Example Select Case quantity the different kind of CASE constructs there can be. Case 0 To 49 discount = 0.1 Case 50 To 74: discount = 0.2 to get more then one statement on a line you can use : and follow it by a single statement. Case Is >= 75 discount = 0.25 Case Else discount=0 End Select Visual Basic for Excel 97/2000 (exlvba-t1) 31

36 Appendix B Visual Basic objects Comments Some of the items referred to in the examples are more complicated than simple numeric constants and values. Such variables are called objects. For instance the variables that refer to Excel ranges, worksheets, charts, and workbooks are objects. This appendix gives a very rough explanation of how to find out what objects there are and how they interact. Libraries Objects are grouped in classes (for example, Excel, Office) and their definitions stored in specific libraries. Visual Basic for Excel starts with a default set of libraries. Libraries can easily be added to the set (from the VBE Tools menu, select References). A reference to an object that is not in the current set of object definitions will cause an error. Object hierarchy Objects have a position in a hierarchy. For example the Range object is below the Worksheet object which is below the Workbook object. The VB help system will show this relationship. Often when referring to objects they will be defined by listing the parent object first and then the object itself e.g Example Worksheets("Sheet1").Range("A1") A period is used as the separator character in the hierarchy. Often if a parent object is not specified a default object will be assumed to be the parent. For example the Activesheet object is assumed if a Range object is not qualified by a parent object. Properties and methods Each object is defined by having a particular set of properties and methods. The period character is used as a separator when referring to the properties and methods of objects. For instance the Range object has a property called Cells that can be used to refer to a particular subset of the range. Example Range( A2:Z11 ).Cells(1,1) refers to cell A2 in the currently active worksheet. The object created by the use of the Cells property is itself a Range object. So the Font property of a Range object can be used to generate a Font object. The Size property of the Font object can then be used to set the size of the font. Example Range( A14:Z14 ).Cells(2,1).Font.Size=12 will set the font size of cell A15 to 12 points. A Range object has a Clear method that will clear all the cells in the range. Example Range( A1 ). Clear will clear the contents and formatting of cell A1. Methods cause acts to be done to the object, while Properties return simple values and objects that are associated with the object Visual Basic for Excel 97/2000 (exlvba-t1) 32

37 As can be seen from these examples, each property and method has its own set of rules defining what arguments are necessary to construct a valid reference to it. If present, the arguments are enclosed in parenthesis and separated by commas. Any text constant argument must be enclosed in double quotes. There is an alternative form of specifying arguments using keywords that is useful when there are many arguments. Example Workbooks.Open Filename:="C:\Sales.xls", ReadOnly:=True Collection objects There are many objects that are used to control collections of objects of the same type. For instance the Workbooks object can be used to control all the Workbook objects. It can be used to create a Workbook, provide the names of all the Workbook objects, a count of the Workbook objects, etc. In general the collection objects will share many methods and properties, for example, Count, Add, Item, Close. Finding information about objects If you already know the name of an object and require further help (or you merely want to browse), then the Object browser tool can be used: Figure 5 - object browser window (<F2>) From the VBE View menu, select Object Browser (or press <F2>). From the Project/Library dropdown box, select Excel (default <All Libraries>). Under classes, select a class, (Range in Figure 5). Right-click the mouse and select Help. A separate help window will be created (if it does not already exist) containing information about the chosen item. Quite often there will be Properties and Methods buttons that can be clicked to get information about all the properties and methods for the chosen object. Visual Basic for Excel 97/2000 (exlvba-t1) 33

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide

VBA Excel 2013/2016. VBA Visual Basic for Applications. Learner Guide VBA Visual Basic for Applications Learner Guide 1 Table of Contents SECTION 1 WORKING WITH MACROS...5 WORKING WITH MACROS...6 About Excel macros...6 Opening Excel (using Windows 7 or 10)...6 Recognizing

More information

EXCEL 2003 DISCLAIMER:

EXCEL 2003 DISCLAIMER: EXCEL 2003 DISCLAIMER: This reference guide is meant for experienced Microsoft Excel users. It provides a list of quick tips and shortcuts for familiar features. This guide does NOT replace training or

More information

A Tutorial for Excel 2002 for Windows

A Tutorial for Excel 2002 for Windows INFORMATION SYSTEMS SERVICES Writing Formulae with Microsoft Excel 2002 A Tutorial for Excel 2002 for Windows AUTHOR: Information Systems Services DATE: August 2004 EDITION: 2.0 TUT 47 UNIVERSITY OF LEEDS

More information

A Tutorial for Excel 2002 for Windows

A Tutorial for Excel 2002 for Windows INFORMATION SYSTEMS SERVICES Data Manipulation with Microsoft Excel 2002 A Tutorial for Excel 2002 for Windows AUTHOR: Information Systems Services DATE: August 2004 EDITION: 1.0 TUT 130 UNIVERSITY OF

More information

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41

Rev. C 11/09/2010 Downers Grove Public Library Page 1 of 41 Table of Contents Objectives... 3 Introduction... 3 Excel Ribbon Components... 3 Office Button... 4 Quick Access Toolbar... 5 Excel Worksheet Components... 8 Navigating Through a Worksheet... 8 Making

More information

As you probably know, Microsoft Excel is an

As you probably know, Microsoft Excel is an Introducing Excel Programming As you probably know, Microsoft Excel is an electronic worksheet you can use for a variety of purposes, including the following: maintain lists; perform mathematical, financial,

More information

MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION

MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION MICROSOFT EXCEL 2000 LEVEL 5 VBA PROGRAMMING INTRODUCTION Lesson 1 - Recording Macros Excel 2000: Level 5 (VBA Programming) Student Edition LESSON 1 - RECORDING MACROS... 4 Working with Visual Basic Applications...

More information

Microsoft Excel > Shortcut Keys > Shortcuts

Microsoft Excel > Shortcut Keys > Shortcuts Microsoft Excel > Shortcut Keys > Shortcuts Function Keys F1 Displays the Office Assistant or (Help > Microsoft Excel Help) F2 Edits the active cell, putting the cursor at the end* F3 Displays the (Insert

More information

Introduction... 1 Part I: Getting Started with Excel VBA Programming Part II: How VBA Works with Excel... 31

Introduction... 1 Part I: Getting Started with Excel VBA Programming Part II: How VBA Works with Excel... 31 Contents at a Glance Introduction... 1 Part I: Getting Started with Excel VBA Programming... 9 Chapter 1: What Is VBA?...11 Chapter 2: Jumping Right In...21 Part II: How VBA Works with Excel... 31 Chapter

More information

Macros enable you to automate almost any task that you can undertake

Macros enable you to automate almost any task that you can undertake Chapter 1: Building and Running Macros In This Chapter Understanding how macros do what they do Recording macros for instant playback Using the relative option when recording macros Running the macros

More information

Macros enable you to automate almost any task that you can undertake

Macros enable you to automate almost any task that you can undertake Chapter 1: Building and Running Macros In This Chapter Understanding how macros do what they do Recording macros for instant playback Using the relative option when recording macros Running the macros

More information

Intermediate Excel 2003

Intermediate Excel 2003 Intermediate Excel 2003 Introduction The aim of this document is to introduce some techniques for manipulating data within Excel, including sorting, filtering and how to customise the charts you create.

More information

Excel Advanced

Excel Advanced Excel 2016 - Advanced LINDA MUCHOW Alexandria Technical & Community College 320-762-4539 lindac@alextech.edu Table of Contents Macros... 2 Adding the Developer Tab in Excel 2016... 2 Excel Macro Recorder...

More information

Intro to Excel. To start a new workbook, click on the Blank workbook icon in the middle of the screen.

Intro to Excel. To start a new workbook, click on the Blank workbook icon in the middle of the screen. Excel is a spreadsheet application that allows for the storing, organizing and manipulation of data that is entered into it. Excel has variety of built in tools that allow users to perform both simple

More information

6. Essential Spreadsheet Operations

6. Essential Spreadsheet Operations 6. Essential Spreadsheet Operations 6.1 Working with Worksheets When you open a new workbook in Excel, the workbook has a designated number of worksheets in it. You can specify how many sheets each new

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Formatting a spreadsheet means changing the way it looks to make it neater and more attractive. Formatting changes can include modifying number styles, text size and colours. Many

More information

You can record macros to automate tedious

You can record macros to automate tedious Introduction to Macros You can record macros to automate tedious and repetitive tasks in Excel without writing programming code directly. Macros are efficiency tools that enable you to perform repetitive

More information

BASIC EXCEL SYLLABUS Section 1: Getting Started Section 2: Working with Worksheet Section 3: Administration Section 4: Data Handling & Manipulation

BASIC EXCEL SYLLABUS Section 1: Getting Started Section 2: Working with Worksheet Section 3: Administration Section 4: Data Handling & Manipulation BASIC EXCEL SYLLABUS Section 1: Getting Started Unit 1.1 - Excel Introduction Unit 1.2 - The Excel Interface Unit 1.3 - Basic Navigation and Entering Data Unit 1.4 - Shortcut Keys Section 2: Working with

More information

Rev. B 12/16/2015 Downers Grove Public Library Page 1 of 40

Rev. B 12/16/2015 Downers Grove Public Library Page 1 of 40 Objectives... 3 Introduction... 3 Excel Ribbon Components... 3 File Tab... 4 Quick Access Toolbar... 5 Excel Worksheet Components... 8 Navigating Through a Worksheet... 9 Downloading Templates... 9 Using

More information

MICROSOFT EXCEL KEYBOARD SHORCUTS

MICROSOFT EXCEL KEYBOARD SHORCUTS MICROSOFT EXCEL KEYBOARD SHORCUTS F1 Displays the Office Assistant or (Help > Microsoft Excel Help) F2 Edits the active cell, putting the cursor at the end F3 Displays the (Insert > Name > Paste) dialog

More information

Introductory Exercises in Microsoft Access XP

Introductory Exercises in Microsoft Access XP INFORMATION SYSTEMS SERVICES Introductory Exercises in Microsoft Access XP This document contains a series of exercises which give an introduction to the Access relational database program. AUTHOR: Information

More information

download instant at

download instant at CHAPTER 1 - LAB SESSION INTRODUCTION TO EXCEL INTRODUCTION: This lab session is designed to introduce you to the statistical aspects of Microsoft Excel. During this session you will learn how to enter

More information

Advanced Financial Modeling Macros. EduPristine

Advanced Financial Modeling Macros. EduPristine Advanced Financial Modeling Macros EduPristine www.edupristine.com/ca Agenda Introduction to Macros & Advanced Application Building in Excel Introduction and context Key Concepts in Macros Macros as recorded

More information

Microsoft Excel XP. Intermediate

Microsoft Excel XP. Intermediate Microsoft Excel XP Intermediate Jonathan Thomas March 2006 Contents Lesson 1: Headers and Footers...1 Lesson 2: Inserting, Viewing and Deleting Cell Comments...2 Options...2 Lesson 3: Printing Comments...3

More information

Civil Engineering Computation

Civil Engineering Computation Civil Engineering Computation First Steps in VBA Homework Evaluation 2 1 Homework Evaluation 3 Based on this rubric, you may resubmit Homework 1 and Homework 2 (along with today s homework) by next Monday

More information

Copyright. Trademarks Attachmate Corporation. All rights reserved. USA Patents Pending. WRQ ReflectionVisual Basic User Guide

Copyright. Trademarks Attachmate Corporation. All rights reserved. USA Patents Pending. WRQ ReflectionVisual Basic User Guide PROGRAMMING WITH REFLECTION: VISUAL BASIC USER GUIDE WINDOWS XP WINDOWS 2000 WINDOWS SERVER 2003 WINDOWS 2000 SERVER WINDOWS TERMINAL SERVER CITRIX METAFRAME CITRIX METRAFRAME XP ENGLISH Copyright 1994-2006

More information

MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTRODUCTION

MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTRODUCTION MICROSOFT EXCEL VISUAL BASIC FOR APPLICATIONS INTRODUCTION Welcome! Thank you for choosing WWP as your learning and development provider. We hope that your programme today will be a stimulating, informative

More information

2. create the workbook file

2. create the workbook file 2. create the workbook file Excel documents are called workbook files. A workbook can include multiple sheets of information. Excel supports two kinds of sheets for working with data: Worksheets, which

More information

BasicScript 2.25 User s Guide. May 29, 1996

BasicScript 2.25 User s Guide. May 29, 1996 BasicScript 2.25 User s Guide May 29, 1996 Information in this document is subject to change without notice. No part of this document may be reproduced or transmitted in any form or by any means, electronic

More information

1: Getting Started with Microsoft Excel

1: Getting Started with Microsoft Excel 1: Getting Started with Microsoft Excel The Workspace 1 Menu commands 2 Toolbars 3 Cell References 4 Cell Entries 4 Formatting 5 Saving and Opening Workbook Files 7 The Workspace Figure 1 shows the Microsoft

More information

Microsoft Excel Keyboard Shortcuts

Microsoft Excel Keyboard Shortcuts Microsoft Excel Keyboard Shortcuts Here is a complete list of keyboard shortcuts for Microsoft Excel. Most of the shortcuts will work on all Excel versions on Windows based computer. Data Processing Shortcuts

More information

KEYBOARD SHORTCUTS AND HOT KEYS

KEYBOARD SHORTCUTS AND HOT KEYS KEYBOARD SHORTCUTS AND HOT KEYS Page 1 This document is devoted to using the keyboard instead of the mouse to perform tasks within applications. This list is by no means the "be all and end all". There

More information

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet

Spreadsheet definition: Starting a New Excel Worksheet: Navigating Through an Excel Worksheet Copyright 1 99 Spreadsheet definition: A spreadsheet stores and manipulates data that lends itself to being stored in a table type format (e.g. Accounts, Science Experiments, Mathematical Trends, Statistics,

More information

European Computer Driving Licence. Advanced Spreadsheet Software BCS ITQ Level 3. Syllabus Version 2.0

European Computer Driving Licence. Advanced Spreadsheet Software BCS ITQ Level 3. Syllabus Version 2.0 ECDL Advanced European Computer Driving Licence Advanced Spreadsheet Software BCS ITQ Level 3 Using Microsoft Excel 2010 Syllabus Version 2.0 This training, which has been approved by BCS, The Chartered

More information

Getting started 7. Writing macros 23

Getting started 7. Writing macros 23 Contents 1 2 3 Getting started 7 Introducing Excel VBA 8 Recording a macro 10 Viewing macro code 12 Testing a macro 14 Editing macro code 15 Referencing relatives 16 Saving macros 18 Trusting macros 20

More information

Microsoft Excel 2010 Handout

Microsoft Excel 2010 Handout Microsoft Excel 2010 Handout Excel is an electronic spreadsheet program you can use to enter and organize data, and perform a wide variety of number crunching tasks. Excel helps you organize and track

More information

Learning Worksheet Fundamentals

Learning Worksheet Fundamentals 1.1 LESSON 1 Learning Worksheet Fundamentals After completing this lesson, you will be able to: Create a workbook. Create a workbook from a template. Understand Microsoft Excel window elements. Select

More information

194 useful Keyboard Shortcuts for Excel Excel 2010 Shortcuts

194 useful Keyboard Shortcuts for Excel Excel 2010 Shortcuts 194 useful Keyboard Shortcuts for Excel 2010. Excel 2010 Shortcuts 1. Navigate Inside Worksheets Arrow Keys Page Down / Page Up Alt + Page Down / Alt + Page Up Tab / Shift + Tab Ctrl + Arrow Keys Home

More information

Introduction to macros

Introduction to macros L E S S O N 7 Introduction to macros Suggested teaching time 30-40 minutes Lesson objectives To understand the basics of creating Visual Basic for Applications modules in Excel, you will: a b c Run existing

More information

Excel 2010: Getting Started with Excel

Excel 2010: Getting Started with Excel Excel 2010: Getting Started with Excel Excel 2010 Getting Started with Excel Introduction Page 1 Excel is a spreadsheet program that allows you to store, organize, and analyze information. In this lesson,

More information

Beginner s Guide to Microsoft Excel 2002

Beginner s Guide to Microsoft Excel 2002 Beginner s Guide to Microsoft Excel 2002 Microsoft Excel lets you create spreadsheets, which allow you to make budgets, track inventories, calculate profits, and design charts and graphs. 1. Open Start

More information

Section 8 Formatting

Section 8 Formatting Section 8 Formatting By the end of this Section you should be able to: Format Numbers, Dates & Percentages Change Cell Alignment and Rotate Text Add Borders and Colour Change Row Height and Column Width

More information

variables programming statements

variables programming statements 1 VB PROGRAMMERS GUIDE LESSON 1 File: VbGuideL1.doc Date Started: May 24, 2002 Last Update: Dec 27, 2002 ISBN: 0-9730824-9-6 Version: 0.0 INTRODUCTION TO VB PROGRAMMING VB stands for Visual Basic. Visual

More information

Using macros enables you to repeat tasks much

Using macros enables you to repeat tasks much An Introduction to Macros Using macros enables you to repeat tasks much more efficiently than tediously performing each step over and over. A macro is a set of instructions that you use to automate a task.

More information

EXCEL BASICS: MICROSOFT OFFICE 2007

EXCEL BASICS: MICROSOFT OFFICE 2007 EXCEL BASICS: MICROSOFT OFFICE 2007 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

More information

Excel. Spreadsheet functions

Excel. Spreadsheet functions Excel Spreadsheet functions Objectives Week 1 By the end of this session you will be able to :- Move around workbooks and worksheets Insert and delete rows and columns Calculate with the Auto Sum function

More information

Introduction to Excel 2007

Introduction to Excel 2007 Introduction to Excel 2007 These documents are based on and developed from information published in the LTS Online Help Collection (www.uwec.edu/help) developed by the University of Wisconsin Eau Claire

More information

Microsoft Excel 2007 Macros and VBA

Microsoft Excel 2007 Macros and VBA Microsoft Excel 2007 Macros and VBA With the introduction of Excel 2007 Microsoft made a number of changes to the way macros and VBA are approached. This document outlines these special features of Excel

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Excel contains numerous tools that are intended to meet a wide range of requirements. Some of the more specialised tools are useful to people in certain situations while others have

More information

Group sheets 2, 3, 4, and 5 1. Click on SHEET Hold down the CMD key and as you continue to hold it down, click on sheets 3, 4, and 5.

Group sheets 2, 3, 4, and 5 1. Click on SHEET Hold down the CMD key and as you continue to hold it down, click on sheets 3, 4, and 5. Data Entry, Cell Formatting, and Cell Protection in Excel 2004 In this workshop, you start by adding to the number of sheets in your workbook and then grouping four of the sheets to set up a small spreadsheet

More information

IP4 - Running reports

IP4 - Running reports To assist with tracking and monitoring HRIS recruitment and personnel, reports can be run from Discoverer Plus. This guide covers the following process steps: Logging in... 2 What s changed? Changed reference

More information

EXCEL 2010 BASICS JOUR 772 & 472 / Ira Chinoy

EXCEL 2010 BASICS JOUR 772 & 472 / Ira Chinoy EXCEL 2010 BASICS JOUR 772 & 472 / Ira Chinoy Virus check and backups: Remember that if you are receiving a file from an external source a government agency or some other source, for example you will want

More information

Skill Set 3. Formulas

Skill Set 3. Formulas Skill Set 3 Formulas By the end of this Skill Set you should be able to: Create Simple Formulas Understand Totals and Subtotals Use Brackets Select Cells with the Mouse to Create Formulas Calculate Percentages

More information

Kenora Public Library. Computer Training. Introduction to Excel

Kenora Public Library. Computer Training. Introduction to Excel Kenora Public Library Computer Training Introduction to Excel Page 2 Introduction: Spreadsheet programs allow users to develop a number of documents that can be used to store data, perform calculations,

More information

WEEK NO. 12 MICROSOFT EXCEL 2007

WEEK NO. 12 MICROSOFT EXCEL 2007 WEEK NO. 12 MICROSOFT EXCEL 2007 LESSONS OVERVIEW: GOODBYE CALCULATORS, HELLO SPREADSHEET! 1. The Excel Environment 2. Starting A Workbook 3. Modifying Columns, Rows, & Cells 4. Working with Worksheets

More information

Microsoft Excel 2010 Level 1

Microsoft Excel 2010 Level 1 Microsoft Excel 2010 Level 1 One Day Course Course Description You have basic computer skills such as using a mouse, navigating through windows, and surfing the Internet. You have also used paper-based

More information

Day : Date : Objects : Open MS Excel program * Open Excel application. Select : start. Choose: programs. Choose : Microsoft Office.

Day : Date : Objects : Open MS Excel program * Open Excel application. Select : start. Choose: programs. Choose : Microsoft Office. Day : Date : Objects : Open MS Excel program * Open Excel application. Select : start Choose: programs Choose : Microsoft Office Select: Excel *The interface of Excel program - Menu bar. - Standard bar.

More information

Cell to Cell mouse arrow Type Tab Enter Scroll Bars Page Up Page Down Crtl + Home Crtl + End Value Label Formula Note:

Cell to Cell mouse arrow Type Tab Enter Scroll Bars Page Up Page Down Crtl + Home Crtl + End Value Label Formula Note: 1 of 1 NOTE: IT IS RECOMMENDED THAT YOU READ THE ACCOMPANYING DOCUMENT CALLED INTRO TO EXCEL LAYOUT 2007 TO FULLY GRASP THE BASICS OF EXCEL Introduction A spreadsheet application allows you to enter data

More information

Lecture- 5. Introduction to Microsoft Excel

Lecture- 5. Introduction to Microsoft Excel Lecture- 5 Introduction to Microsoft Excel The Microsoft Excel Window Microsoft Excel is an electronic spreadsheet. You can use it to organize your data into rows and columns. You can also use it to perform

More information

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan

DATA 301 Introduction to Data Analytics Microsoft Excel VBA. Dr. Ramon Lawrence University of British Columbia Okanagan DATA 301 Introduction to Data Analytics Microsoft Excel VBA Dr. Ramon Lawrence University of British Columbia Okanagan ramon.lawrence@ubc.ca DATA 301: Data Analytics (2) Why Microsoft Excel Visual Basic

More information

Basic Microsoft Excel Skills

Basic Microsoft Excel Skills Basic Microsoft Excel Skills Note : This tutorial is based upon Microsoft Excel 2000. If you are using MSExcel 1997 or 2002, there may be some operations which look slightly different (e.g. graphs), but

More information

Microsoft Excel 2007

Microsoft Excel 2007 Learning computers is Show ezy Microsoft Excel 2007 301 Excel screen, toolbars, views, sheets, and uses for Excel 2005-8 Steve Slisar 2005-8 COPYRIGHT: The copyright for this publication is owned by Steve

More information

Open Office Calc (Spreadsheet) Tutorial

Open Office Calc (Spreadsheet) Tutorial Open Office Calc (Spreadsheet) Tutorial Table of Contents Introduction...3 What is a Spreadsheet?...3 Starting OpenOffice Calc...3 OpenOffice Calc (Spreadsheet) Basics...4 Creating a New Document...5 Entering

More information

INTRODUCTION... 1 UNDERSTANDING CELLS... 2 CELL CONTENT... 4

INTRODUCTION... 1 UNDERSTANDING CELLS... 2 CELL CONTENT... 4 Introduction to Microsoft Excel 2016 INTRODUCTION... 1 The Excel 2016 Environment... 1 Worksheet Views... 2 UNDERSTANDING CELLS... 2 Select a Cell Range... 3 CELL CONTENT... 4 Enter and Edit Data... 4

More information

EXCEL BASICS: MICROSOFT OFFICE 2010

EXCEL BASICS: MICROSOFT OFFICE 2010 EXCEL BASICS: MICROSOFT OFFICE 2010 GETTING STARTED PAGE 02 Prerequisites What You Will Learn USING MICROSOFT EXCEL PAGE 03 Opening Microsoft Excel Microsoft Excel Features Keyboard Review Pointer Shapes

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2013 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Basic Formulas Filling Data

More information

Microsoft Excel 2010 Linking Worksheets & Workbooks

Microsoft Excel 2010 Linking Worksheets & Workbooks Microsoft Excel 2010 Linking Worksheets & Workbooks Email: training@health.ufl.edu Web Page: http://training.health.ufl.edu Microsoft Excel 2010: Linking Worksheets & Workbooks 1.5 hour Topics include

More information

Lesson 2. Using the Macro Recorder

Lesson 2. Using the Macro Recorder Lesson 2. Using the Macro Recorder When the recorder is activated, everything that you do will be recorded as a Macro. When the Macro is run, everything that you recorded will be played back exactly as

More information

Excel 2007 Fundamentals

Excel 2007 Fundamentals Excel 2007 Fundamentals Introduction The aim of this document is to introduce some basic techniques for using Excel to enter data, perform calculations and produce simple charts based on that information.

More information

ECDL Module 4 REFERENCE MANUAL

ECDL Module 4 REFERENCE MANUAL ECDL Module 4 REFERENCE MANUAL Spreadsheets Microsoft Excel XP Edition for ECDL Syllabus Four PAGE 2 - ECDL MODULE 4 (USING MICROSOFT EXCEL XP) - MANUAL 4.1 USING THE APPLICATION... 4 4.1.1 FIRST STEPS

More information

239 Excel Keyboard Shortcuts

239 Excel Keyboard Shortcuts 239 Excel Keyboard Shortcuts WORK FASTER AND MORE EFFICIENTLY WITH THESE CLEARLY ILLUSTRATED EXCEL SHORTCUTS. My Online Training Hub https://www.myonlinetraininghub.com/ Below is a huge list of Excel keyboard

More information

Excel 2010 Foundation. Excel 2010 Foundation SAMPLE

Excel 2010 Foundation. Excel 2010 Foundation SAMPLE Excel 2010 Foundation Excel 2010 Foundation Excel 2010 Foundation Page 2 2010 Cheltenham Courseware Pty. Ltd. All trademarks acknowledged. E&OE. No part of this document may be copied without written permission

More information

Microsoft Excel 2010 Basics

Microsoft Excel 2010 Basics Microsoft Excel 2010 Basics Starting Word 2010 with XP: Click the Start Button, All Programs, Microsoft Office, Microsoft Excel 2010 Starting Word 2010 with 07: Click the Microsoft Office Button with the

More information

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010

DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010 DOING MORE WITH EXCEL: MICROSOFT OFFICE 2010 GETTING STARTED PAGE 02 Prerequisites What You Will Learn MORE TASKS IN MICROSOFT EXCEL PAGE 03 Cutting, Copying, and Pasting Data Filling Data Across Columns

More information

Section 1 Microsoft Excel Overview

Section 1 Microsoft Excel Overview Course Topics: I. MS Excel Overview II. Review of Pasting and Editing Formulas III. Formatting Worksheets and Cells IV. Creating Templates V. Moving and Navigating Worksheets VI. Protecting Sheets VII.

More information

Excel 2016: Part 1. Updated January 2017 Copy cost: $1.50

Excel 2016: Part 1. Updated January 2017 Copy cost: $1.50 Excel 2016: Part 1 Updated January 2017 Copy cost: $1.50 Getting Started Please note that you are required to have some basic computer skills for this class. Also, any experience with Microsoft Word is

More information

MS Excel Henrico County Public Library. I. Tour of the Excel Window

MS Excel Henrico County Public Library. I. Tour of the Excel Window MS Excel 2013 I. Tour of the Excel Window Start Excel by double-clicking on the Excel icon on the desktop. Excel may also be opened by clicking on the Start button>all Programs>Microsoft Office>Excel.

More information

Chapter 4: Single Table Form Lab

Chapter 4: Single Table Form Lab Chapter 4: Single Table Form Lab Learning Objectives This chapter provides practice with creating forms for individual tables in Access 2003. After this chapter, you should have acquired the knowledge

More information

This chapter is intended to take you through the basic steps of using the Visual Basic

This chapter is intended to take you through the basic steps of using the Visual Basic CHAPTER 1 The Basics This chapter is intended to take you through the basic steps of using the Visual Basic Editor window and writing a simple piece of VBA code. It will show you how to use the Visual

More information

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development

EXCEL Using Excel for Data Query & Management. Information Technology. MS Office Excel 2007 Users Guide. IT Training & Development Information Technology MS Office Excel 2007 Users Guide EXCEL 2007 Using Excel for Data Query & Management IT Training & Development (818) 677-1700 Training@csun.edu TABLE OF CONTENTS Introduction... 1

More information

Intermediate Microsoft Excel (Demonstrated using Windows XP) Using Spreadsheets in the Classroom

Intermediate Microsoft Excel (Demonstrated using Windows XP) Using Spreadsheets in the Classroom (Demonstrated using Windows XP) Using Spreadsheets in the Classroom Adapted from Taskstream Word Tutorial (2003) < http://www.taskstream.com > Updated 4/05 by Dr. Bruce Ostertag What Can Microsoft Excel

More information

Excel Simple Worksheets (with Functions)

Excel Simple Worksheets (with Functions) Excel 2007 Simple Worksheets (with Functions) Contents The Excel 2007 Window 4 Navigating in Excel... 7 Entering Data 8 Working with Ranges of Cells... 9 Selecting Ranges of Cells 9 Copy and Moving Cell

More information

Introduction to Microsoft Excel

Introduction to Microsoft Excel Athens-Clarke County Library Page 1 What is a spreadsheet program? Microsoft Excel is an example of a spreadsheet program that will maintain records for you relating to finances, products, activities,

More information

Workbook Also called a spreadsheet, the Workbook is a unique file created by Excel. Title bar

Workbook Also called a spreadsheet, the Workbook is a unique file created by Excel. Title bar Microsoft Excel 2007 is a spreadsheet application in the Microsoft Office Suite. A spreadsheet is an accounting program for the computer. Spreadsheets are primarily used to work with numbers and text.

More information

PART 7. Getting Started with Excel

PART 7. Getting Started with Excel PART 7 Getting ed with Excel When you start the application, Excel displays a blank workbook. A workbook is a file in which you store your data, similar to a three-ring binder. Within a workbook are worksheets,

More information

Tips & Tricks: MS Excel

Tips & Tricks: MS Excel Tips & Tricks: MS Excel 080501.2319 Table of Contents Navigation and References... 3 Layout... 3 Working with Numbers... 5 Power Features... 7 From ACS to Excel and Back... 8 Teacher Notes: Test examples

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Table of Contents The Excel Window... 2 The Formula Bar... 3 Workbook View Buttons... 3 Moving in a Spreadsheet... 3 Entering Data... 3 Creating and Renaming Worksheets... 4 Opening

More information

Microsoft Excel Level 2

Microsoft Excel Level 2 Microsoft Excel Level 2 Table of Contents Chapter 1 Working with Excel Templates... 5 What is a Template?... 5 I. Opening a Template... 5 II. Using a Template... 5 III. Creating a Template... 6 Chapter

More information

Microsoft Excel 2010 Basic

Microsoft Excel 2010 Basic Microsoft Excel 2010 Basic Introduction to MS Excel 2010 Microsoft Excel 2010 is a spreadsheet software in the new Microsoft 2010 Office Suite. Excel allows you to store, manipulate and analyze data in

More information

Using Microsoft Excel

Using Microsoft Excel About Excel Using Microsoft Excel What is a Spreadsheet? Microsoft Excel is a program that s used for creating spreadsheets. So what is a spreadsheet? Before personal computers were common, spreadsheet

More information

Using Microsoft Excel

Using Microsoft Excel Using Microsoft Excel Excel contains numerous tools that are intended to meet a wide range of requirements. Some of the more specialised tools are useful to only certain types of people while others have

More information

Part I - WORKING WITH ABSOLUTE REFERENCES

Part I - WORKING WITH ABSOLUTE REFERENCES INTRODUCTION TO COMPUTER CONCEPTS CSIT 100 LAB: MORE WORK with MS EXCEL Part I - WORKING WITH ABSOLUTE REFERENCES This is an implementation of a spreadsheet program. It contains 1,048,576 rows, and 16,384

More information

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller

Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Excel Basics Rice Digital Media Commons Guide Written for Microsoft Excel 2010 Windows Edition by Eric Miller Table of Contents Introduction!... 1 Part 1: Entering Data!... 2 1.a: Typing!... 2 1.b: Editing

More information

MS Excel Henrico County Public Library. I. Tour of the Excel Window

MS Excel Henrico County Public Library. I. Tour of the Excel Window MS Excel 2013 I. Tour of the Excel Window Start Excel by double-clicking on the Excel icon on the desktop. Excel may also be opened by clicking on the Start button>all Programs>Microsoft Office>Excel.

More information

1) Merge the cells that contain the title and center the title

1) Merge the cells that contain the title and center the title Supplies: You will need a storage location to save your spreadsheet for use in Session 2. You will need the 2 handouts pertaining to Session 1 Instructions: Follow the directions below to create a budget

More information

This book is about using Microsoft Excel to

This book is about using Microsoft Excel to Introducing Data Analysis with Excel This book is about using Microsoft Excel to analyze your data. Microsoft Excel is an electronic worksheet you can use to perform mathematical, financial, and statistical

More information

Adding records Pasting records Deleting records Sorting records Filtering records Inserting and deleting columns Calculated columns Working with the

Adding records Pasting records Deleting records Sorting records Filtering records Inserting and deleting columns Calculated columns Working with the Show All About spreadsheets You can use a spreadsheet to enter and calculate data. A spreadsheet consists of columns and rows of cells. You can enter data directly into the cells of the spreadsheet and

More information

Excel 2016 Basics for Windows

Excel 2016 Basics for Windows Excel 2016 Basics for Windows Excel 2016 Basics for Windows Training Objective To learn the tools and features to get started using Excel 2016 more efficiently and effectively. What you can expect to learn

More information

GCSE CCEA GCSE EXCEL 2010 USER GUIDE. Business and Communication Systems

GCSE CCEA GCSE EXCEL 2010 USER GUIDE. Business and Communication Systems GCSE CCEA GCSE EXCEL 2010 USER GUIDE Business and Communication Systems For first teaching from September 2017 Contents Page Define the purpose and uses of a spreadsheet... 3 Define a column, row, and

More information

Access Intermediate

Access Intermediate Access 2010 - Intermediate 103-134 Advanced Queries Quick Links Overview Pages AC116 AC117 Selecting Fields Pages AC118 AC119 AC122 Sorting Results Pages AC125 AC126 Specifying Criteria Pages AC132 AC134

More information