1. Spreadsheet Practical Analytical Tools A Strategic Approach to Spreadsheet Analysis An overview of Macros, Pivot Tables and VLOOKUP By Joselito Pérez
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12. VLOOKUP() Slide The function VLOOKUP() is a function that performs a vertical lookup for a value in the first column of the array. lookup_value The value to be found in the first column of the array. table_array The cell range or a range name containing the table of data. col_index_num The column number for the value you want returned. range_lookup (optional) True or False to specify whether to find an approximate or exact match. D . VLOOKUP
Tools>Options>Macro>Security> then select the security level you want to use. In the Macro name box, enter a name for the macro 3. Notes The first character of the macro name must be a letter. Other characters can be letters, numbers, or underscore characters. Spaces are not allowed in a macro name; an underscore character works well as a word separator. Do not use a macro name that is also a cell reference or you can get an error message that the macro name is not valid. 4. If you want to run the macro by pressing a keyboard shortcut key (shortcut key: A function key or key combination, such as F5 or CTRL+A, that you use to carry out a menu command. In contrast, an access key is a key combination, such as ALT+F, that moves the focus to a menu, command, or control.), enter a letter in the Shortcut key box. You can use CTRL+ letter (for lowercase letters) or CTRL+SHIFT+ letter (for uppercase letters), where letter is any letter key on the keyboard. The shortcut key letter you use cannot be a number or special character such as @ or #. Note The shortcut key will override any equivalent default Microsoft Excel shortcut keys while the workbook that contains the macro is open. 5. In the Store macro in box, click the location where you want to store the macro. If you want a macro to be available whenever you use Excel, select Personal Macro Workbook . If you want to include a description of the macro, type it in the Description box. Click OK .
If you want to run the macro from the module window, press F5. When you're finished writing your macro, click Close and Return to Microsoft Excel on the File menu. Tip You can view your Personal Macro Workbook file (Personal.xls) at any time by opening it in the Visual Basic Editor (Visual Basic Editor: An environment in which you write new and edit existing Visual Basic for Applications code and procedures. The Visual Basic Editor contains a complete debugging toolset for finding syntax, run-time, and logic problems in your code.) (Alt+F11). Because Personal.xls is a hidden workbook that is always open, you must unhide it if you want to copy a macro.
lookup_value: Contains the address of the cell that contains the value you want to look up in the table_array range. table_array: Contains the data's cell range. The values in the first column of table_array must be in ascending sort order, otherwise VLOOKUP may not return the correct value. col_index_num: Contains the column in which the retrieved value can be found. range_lookup: (Optional) A logical value that determines which type of search to perform. If you use the TRUE value or leave the argument blank, the function looks for the closest match to the value you seek. If you use FALSE, the function returns only an exact value. The lookup range must not include the column headings. If the value of range_lookup is FALSE and lookup_value column is formatted for text, you can use the wildcard characters -- question mark (?) and asterisk (*) -- in the lookup_value argument. A question mark matches any single character; an System sluggish? If you find that running Excel along with your other applications causes your old system to slow down, it may be time to invest in a new PC. » HP 5000 series desktop PCs » Desktop buying guide asterisk matches any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) before the character.