Vous êtes sur la page 1sur 126

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Microsoft Excel 2007 Basics Microsoft Excel 2007 has a completely redesigned user interface. The standard menus along the top have been removed and replaced with a series of toolbars Microsoft calls The Ribbon. These tool bars are changed using tabs at the top and try to automatically adjust themselves to the content you are working with. If you select an image it will automatically switch to the picture tools. The new layout seems to offer easier access to most of the features of Excel allowing for more complex documents to be created quicker. 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 mathematical calculations quickly. You use the window to interact with Excel start Microsoft Excel 2007. The Microsoft Excel window appears and your screen looks similar to the one shown here.

Note: Your screen will probably not look exactly like the screen shown. In Excel 2007, how a window displays depends on the size of your window, the size of your monitor, and the resolution to which your monitor is set. Resolution determines how much information your computer monitor can display. If you use a low resolution, less information fits on your screen, but the size of your text and images are larger. If you use a high resolution, more information fits on your screen, but the size of the text and images are smaller. Also, settings in Excel 2007, Windows Vista, and Windows XP allow you to change the color and style of your windows.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Microsoft Office Button

In the upper-left corner of the Excel 2007 window is the Microsoft Office button. When you click the button, a menu appears. You can use the menu to create a new file, open an existing file, save a file, and perform many other tasks. The Quick Access Toolbar

Next to the Microsoft Office button is the Quick Access toolbar. The Quick Access toolbar gives you with access to commands you frequently use. By default, Save, Undo, and Redo appear on the Quick Access toolbar. You can use Save to save your file, Undo to roll back an action you have taken, and Redo to reapply an action you have rolled back. The Title Bar

Next to the Quick Access toolbar is the Title bar. On the Title bar, Microsoft Excel displays the name of the workbook you are currently using. At the top of the Excel window, you should see "Microsoft Excel - Book1" or a similar name. The Ribbon

You use commands to tell Microsoft Excel what to do. In Microsoft Excel 2007, you use the Ribbon to issue commands. The Ribbon is located near the top of the Excel window, below the Quick Access toolbar. At the top of the Ribbon are several tabs; clicking a tab displays several related command groups. Within each group are related command buttons. You click buttons to issue commands or to access menus and dialog boxes. You may also find a dialog box launcher in the bottom-right corner of a group. When you click the dialog box launcher, a dialog box makes additional commands available. 2 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Worksheets

[BASIC TO ADVANCE MICROSOFT EXCEL]

Microsoft Excel consists of worksheets. Each worksheet contains columns and rows. The columns are lettered A to Z and then continuing with AA, AB, AC and so on; the rows are numbered 1 to 1,048,576. The number of columns and rows you can have in a worksheet is limited by your computer memory and your system resources. The combination of a column coordinate and a row coordinate make up a cell address. For example, the cell located in the upper-left corner of the worksheet is cell A1, meaning column A, row 1. Cell E10 is located under column E on row 10. You enter your data into the cells on the worksheet. The Formula Bar

Formula Bar If the Formula bar is turned on, the cell address of the cell you are in displays in the Name box which is located on the left side of the Formula bar. Cell entries display on the right side of the Formula bar. If you do not see the Formula bar in your window, perform the following steps: 1. Choose the View tab. 2. Click Formula Bar in the Show/Hide group. The Formula bar appears. Note: The current cell address displays on the left side of the Formula bar.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
The Status Bar

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Status bar appears at the very bottom of the Excel window and provides such information as the sum, average, minimum, and maximum value of selected numbers. You can change what displays on the Status bar by right-clicking on the Status bar and selecting the options you want from the Customize Status Bar menu. You click a menu item to select it. You click it again to deselect it. A check mark next to an item means the item is selected. Move Around a Worksheet By using the arrow keys, you can move around your worksheet. You can use the down arrow key to move downward one cell at a time. You can use the up arrow key to move upward one cell at a time. You can use the Tab key to move across the page to the right, one cell at a time. You can hold down the Shift key and then press the Tab key to move to the left, one cell at a time. You can use the right and left arrow keys to move right or left one cell at a time. The Page Up and Page Down keys move up and down one page at a time. If you hold down the Ctrl key and then press the Home key, you move to the beginning of the worksheet. Move Around the Worksheet The Down Arrow Key Press the down arrow key several times. Note that the cursor moves downward one cell at a time. The Up Arrow Key 4 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Press the up arrow key several times. Note that the cursor moves upward one cell at a time. The Tab Key 1. Move to cell A1. 2. Press the Tab key several times. Note that the cursor moves to the right one cell at a time. The Shift+Tab Keys Hold down the Shift key and then press Tab. Note that the cursor moves to the left one cell at a time. The Right and Left Arrow Keys 1. Press the right arrow key several times. Note that the cursor moves to the right. 2. Press the left arrow key several times. Note that the cursor moves to the left. Page Up and Page Down 1. Press the Page Down key. Note that the cursor moves down one page. 2. Press the Page Up key. Note that the cursor moves up one page. The Ctrl-Home Key 1. Move the cursor to column J. 2. Stay in column J and move the cursor to row 20. 3. Hold down the Ctrl key while you press the Home key. Excel moves to cell A1. Go To Cells Quickly The following are shortcuts for moving quickly from one cell in a worksheet to a cell in a different part of the worksheet. Go to -- F5 The F5 function key is the "Go To" key. If you press the F5 key, you are prompted for the cell to which you wish to go. Enter the cell address, and the cursor jumps to that cell. 1. Press F5. The Go To dialog box opens. 2. Type J3 in the Reference field. 3. Press Enter. Excel moves to cell J3. Go to -- Ctrl+G You can also use Ctrl+G to go to a specific cell. 1. Hold down the Ctrl key while you press "g" (Ctrl+g). The Go To dialog box opens. 2. Type C4 in the Reference field. 3. Press Enter. Excel moves to cell C4.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Name Box You can also use the Name box to go to a specific cell. Just type the cell you want to go to in the Name box and then press Enter.

1. Type B10 in the Name box. 2. Press Enter. Excel moves to cell B10.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Select Cells

[BASIC TO ADVANCE MICROSOFT EXCEL]

If you wish to perform a function on a group of cells, you must first select those cells by highlighting them. Select Cells To select cells A1 to E1: 1. Go to cell A1. 2. Press the F8 key. This anchors the cursor. 3. Note that "Extend Selection" appears on the Status bar in the lower-left corner of the window. You are in the Extend mode. 4. Click in cell E7. Excel highlights cells A1 to E7. 5. Press Esc and click anywhere on the worksheet to clear the highlighting.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Select Cells by Dragging You can also select an area by holding down the left mouse button and dragging the mouse over the area. In addition, you can select noncontiguous areas of the worksheet by doing the following:

1. Go to cell A1. 2. Hold down the Ctrl key. You won't release it until step 9. Holding down the Ctrl key enables you to select noncontiguous areas of the worksheet. 3. Press the left mouse button. 4. While holding down the left mouse button, use the mouse to move from cell A1 to C5. 5. Continue to hold down the Ctrl key, but release the left mouse button. 6. Using the mouse, place the cursor in cell D7. 7. Press the left mouse button. 8. While holding down the left mouse button, move to cell F10. Release the left mouse button. 9. Release the Ctrl key. Cells A1 to C5 and cells D7 to F10 are selected. 10. Press Esc and click anywhere on the worksheet to remove the highlighting.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Enter Data In this section, you will learn how to enter data into your worksheet. First, place the cursor in the cell in which you want to start entering data. Type some data, and then press Enter. If you need to delete, press the Backspace key to delete one character at a time. Enter Data

1. Place the cursor in cell A1. 2. Type John Jordan. Do not press Enter at this time.

Delete Data The Backspace key erases one character at a time. 1. Press the Backspace key until Jordan is erased. 2. Press Enter. The name "John" appears in cell A1.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Edit a Cell After you enter data into a cell, you can edit the data by pressing F2 while you are in the cell you wish to edit.

Edit a Cell Change "John" to "Jones." 1. Move to cell A1. 2. Press F2. 3. Use the Backspace key to delete the "n" and the "h." 4. Type nes. 5. Press Enter. Editing a Cell by Using the Formula Bar You can also edit the cell by using the Formula bar. You change "Jones" to "Joker" in the following exercise.

1. Move the cursor to cell A1. 2. Click in the formula area of the Formula bar.

10

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

3. Use the backspace key to erase the "s," "e," and "n." 4. Type ker. 5. Press Enter. Edit a Cell by Double-Clicking in the Cell You can change "Joker" to "Johnson" as follows:

1. Move to cell A1. 2. Double-click in cell A1. 3. Press the End key. Your cursor is now at the end of your text.

11

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

3. Use the Backspace key to erase "r," "e," and "k." 4. Type hnson. 5. Press Enter. Change a Cell Entry Typing in a cell replaces the old cell entry with the new information you type. 1. Move the cursor to cell A1. 2. Type Cathy. 3. Press Enter. The name "Cathy" replaces "Johnson."

12

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Wrap Text When you type text that is too long to fit in the cell, the text overlaps the next cell. If you do not want it to overlap the next cell, you can wrap the text. Wrap Text

1. Move to cell A2. 2. Type Text too long to fit. 3. Press Enter.

4. Return to cell A2. 5. Choose the Home tab. 6. Click the Wrap Text button

. Excel wraps the text in the cell.

Delete a Cell Entry To delete an entry in a cell or a group of cells, you place the cursor in the cell or select the group of cells and press Delete. 13 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

EXERCISE 7 Delete a Cell Entry 1. Select cells A1 to A2. 2. Press the Delete key. Save a File To save your file: 1. Click the Office button. A menu appears. 2. Click Save. The Save As dialog box appears. 3. Go to the directory in which you want to save your file. 4. Type Lesson1 in the File Name field. 5. Click Save. Excel saves your file. Close Excel Close Microsoft Excel. 1. Click the Office button. A menu appears. 2. Click Close. Excel closes.

The Ribbon

There are three basic components to the Ribbon: 1. Tabs: There are seven of them across the top. Each represents core tasks you do in Excel. 2. Groups: Each tab has groups that show related items together. 3. Commands: A command is a button, a box to enter information, or a menu. I will try in this post, and hopefully more posts to come, to give an overview of some of those new tabs. The Tabs. 1. The Home tab. Covers the most common task the people use in a regular basis like copy, paste and formatting. 2. The Insert tab. For inserting tables, charts, pictures, .. etc. 3. The Page Layout tab. For page setup and print formatting. 4. The Formulas tab. Formulas, defined names and calculations. 5. The Data tab. Connections, external data, sorting and filtering etc. 6. The Review tab. Check spelling, comments and protection. 7. The View tab. Custom views, zooming, show and hide etc.

14

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
The Home Tab

[BASIC TO ADVANCE MICROSOFT EXCEL]

The home tab the basic formatting tools found in Excel 2007. You will find seven sections, Clipboard, Font, Alignment, Number, Styles, Cells and Editing. Clicking the down arrow beside any of the icons here will drop down more options for that tool. Each section also contains an arrow in the bottom right corner which will open a window containing the options found in that section. Clipboard The Clipboard allows you to cut, copy, paste and copy formatting from one place to another.

Font The font section of the ribbon provides a section to handle the basic text formatting. Items such as bold, underline, strikethrough, highlight and font type can be changed here. Some items from this section and some items from the number section are also available by right clicking a cell. This saves having to move your cursor all the way to the top of the screen for some common formatting items.

Alignment The alignment section provides icons to justify, Vertical alignment, indents, text wrap, merge cells and centre text and text orientation.

Number The number section provides the options for formatting numbers. You can choose the type of number, like date, currency, percentage, fraction or general. You can also increase or decrease the number of decimal places shown.

15

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

.
Styles

[BASIC TO ADVANCE MICROSOFT EXCEL]

The styles section allows you to quickly change the formatting of a section of cells by choosing one of the predefined styles. You can choose different types of conditional formatting, table formatting or cell styles. These are used to change the visual appearance of a section to quickly show what is being displayed in an area.

Cells This section allows you to insert of delete cells, rows, columns, or sheets. You can also format the height or width of columns and rows, hide or unhide elements, organize or protect cells and sheets. There are a lot of features in this section under the format option.

Editing The editing section gives you options for inserting functions, filling formulas across cells, clearing formatting and formulas, sorting and finding. Again, there is a large number of options in this area. These options are also included in the image to left.

Insert Tab

The insert tab has five sections for inserting most types of objects. The sections are tables, illustrations, charts, links, text and symbols.

Tables The tables section has an option for pivot tables and charts and tables. You can select an area and turn it into a formatted table or pivot table with these options. Once you have created your table there is another tab which becomes available to work with the table design. This tab is shown below. Table Design

16

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Illustrations The Illustrations section allows you to insert pictures, clipart, shapes, and SmartArt. After inserting or selecting a picture you are provided with a new toolbar along the top shown here.

This toolbar gives you the ability to change the brightness, contrast, shape, position, text wrapping and other options for the picture. Clicking off the picture or on one of the other tabs will take you back to the standard toolbars. The Shapes option of the Illustrations section allows you to insert lines, arrows, boxes, basic flowchart shapes and a number of others. The SmartArt option provides features like org charts, flow charts, illustrated lists and processes. The Chart option is similar to Excel 2003 but it offers more options for your charts.

Charts The charts section provides drop down menus to insert different types of column, line, pie, bar, area, scatter and other types of charts. Once you create a chart you will get three additional tabs to work with your chart. They are shown below. Chart Design Tab

Chart Layout Tab

17

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Chart Format Tab

[BASIC TO ADVANCE MICROSOFT EXCEL]

Links The links section provides options for inserting hyperlinks to your spreadsheet.

Text Options in the text section include text box, header and footer, WordArt and a number of predefined text blocks like a signature line and symbols. There are a lot of option in here to setup on your own or you can use Excels predefined options. Page Layout Tab

The page layout tab has five sections, Themes, Page Setup, Scale to Fit, Sheet Options, and Arrange.

Themes The themes section provides a quick way to format your document. By choosing a theme you will have a set colour scheme, font combinations, and effects. You can choose one of the provided themes, modify any provided theme or create your own. You can also go online in this section and browse Microsoft.com for additional themes. Be aware that changing your theme after creating a document may require you to reformat some items as themes also include some layout options.

Page Setup Page setup provides you with the tools to change margins, size, orientation, columns, breaks, backgrounds and add print titles to the document.

18

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Scale To Fit This section allows you to scale to fit your document onto a certain number of pages or to scale it to a certain percentage of its current size.

Sheet Options This section gives you checkboxes to view or print headings and gridlines.

Arrange The arrange section is also found in the image toolbar when an image is selected. Here you can change an images position, the alignment, grouping and rotation or the image. Formulas Tab

The formulas tab contains four sections, function library, defined names, formula auditing and calculation.

Function Library This section gives you access to the large number of predefined Excel functions. There are Auto Sum functions, financial, logical, text, date and time, lookup and reference, math and trig, and additional functions. It also provides a section for recently used functions so you can get back to the ones that you use the most quickly.

Defined Names The defined names section allows you to create names or variables to be referenced in other areas. This would be like assigning taxrate to cell b2 so in a formula you can easily see what you were referencing when you look at a formula months after creating it. The formula =A10*taxrate means more later than =a10*b2

Formula Auditing This section provides tools to manage formulas to ensure that they are correct. You can use the tools here to find out what cells your formula depends on, what cells depend on the current cell, and show the formula in a cell instead of the resulting value. There is also a tool for error checking which will look for common errors in formulas. 19 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Calculation Here you can turn on or off automatic calculation from formulas. If you turn off automatic calculations you can use this area to calculate the current cell or the whole sheet. Data Tab

The data tab contains five sections, get external data, connections, sort and filter, data tools, and outline.

Get External Data This is a single drop down item which allows you to refresh data from an external source. You can pull in data from Access, the Internet, text files or from other external sources.

Connections Here is where you manage any connections to outside sources. The setup done here is what allows you to pull data from the external sources listed above.

Sort & Filter Here you can sort or filter your data based on criteria you specify. You can use simple alphabetical sorting or create more complex filters to manipulate your data.

Data Tools With the data tools section you can take text and turn it into columns, remove duplicates, check your data to make sure it is valid based on different criteria. Are they all whole numbers? Are they all properly formatted dates? You can also consolidate data or do What if analysis where you can check you data against different scenarios.

20

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

.
Outline

[BASIC TO ADVANCE MICROSOFT EXCEL]

The final section in the data tab provides tools to group or ungroup rows or columns and obtain subtotals for grouped items. Review Tab

The review tab offers three sections which include proofing, comments, and changes.

Proofing The proofing section provides the standard spelling and grammar check, a thesaurus, and research tools that include MSN search and Microsoft Encarta encyclopedia. You will also find translation tools to help with single words or the whole document. The translation of the entire document is done by an online service called Wordlingo.

Comments The comments section allows you to add comments to a document for easier collaboration. You can cycle through the comments to find out what notes you left for yourself or others and you can delete a comment that was made when it is no longer relevant.

Changes The changes section allows you to protect a sheet or the entire workbook, you can also share a workbook. Some of the sharing features are only available to users on a Windows domain. This authenticates the users against the domain for access so this will not work for many people. View Tab

The view tab offers five sections which include workbook views, show/hide, zoom, window and macros.

21

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]


Workbook Views

The workbook views section switches your display between normal view, page layout, full screen and page break preview. The page layout will show you what will be on each page and provide a way to add headers and footers to each page. The page break preview will show you a scaled version of your spreadsheet with dotted lines showing where the page breaks will be. There is also a way to work with custom views here.

Show/Hide The show/hide section will toggle certain tools on or off the screen including rulers, gridlines, message bar, formula bar and headings. The rulers will show along the top and left side of the screen. Gridlines will show the grids around each cell. They will be visible on screen but dont print.

Zoom The zoom section provides tools to zoom into or out of the document. You can choose your own zoom factor or use the predefined zoom factor of 100% or you can select a section and zoom so it fills your screen.

Window The window section allows you to create a new window, arrange your windows one on top of the other or split your window so the same document is viewed in two screens one on top of the other. You can also hid and unhide a window. Once you have arranged your windows the way you like them you can save the workspace so you can open to this setup when you need to work on these items again. This is very handy for setups where you need to work on multiple documents at once and you have to do this a lot. You can also choose which window to work on through the switch windows drop down menu. Macros The macros section provides the tools required to work with and create basic macros. You can view existing macros or record your own. Choose record macro from the drop down and then perform the functions you do often, like change the page layout, and style of the document. Once you have done those tasks then stop recording. You will be able to use that macro over again to shorten the steps you need to take every time you need to perform that set of tasks.

22

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]


FUNCTIONS OF MICROSOFT EXCEL

CLEAN FUNCTION The Excel CLEAN function takes a supplied text string and removes all non-printable characters. The function is designed to remove the non-printable characters, represented by numbers 0 to 31 of the 7-bit ASCII code, which are often found at the start of data that has been imported into Excel from other applications. The Syntax of the function is : =CLEAN (Text) where the 'text' argument can be supplied to the function either directly, as a text string returned from another formula, or a reference to a cell containing text. Clean Function Examples The example below shows the Excel Clean function used on four different text strings.

All four of the above examples give the same result, which is the string, "clean text"

TRIM FUNCTION The Excel Trim function takes a supplied text string and removes any spaces, except for single spaces between words or characters. The syntax of the function is : =TRIM (Text) Where the 'text' argument can be supplied to the function either directly, as a text string returned from another formula, or a reference to a cell containing text. Note that the Trim function differs from the Clean Function in that the Trim function removes additional spaces (represented by the ASCII numeric code 32), while the Clean Function removes the non-printable characters, represented by the ASCII numerics codes 0 to 31.

23

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Trim Function Examples The example below shows the Trim function used on four different text strings.

In all four of the above cases, the result is the string "Trim Text" With no spaces at the start or end and just one space in the middle.

REPLACE FUNCTION The Excel Replace function replaces all or part of a text string with another string. The Syntax of the function is : =REPLACE( old_text, start_num, num_chars, new_text ) Where the function arguments are: old_text start_num - The original text string, that you want to replace a part of. - The position, within the old_text string, of the first character that you want to replace.

num_chars - The number of characters to replace. new_text - The replacement text.

The Excel Replace function is similar to the Excel Substitute Function, but the Replace function replaces text in a specified position of a supplied string, while the Substitute function replaces one or more instances of a given text string. Note: that the Excel Replace Function is not suitable for languages that use the double-byte character set (eg. Chinese, Japanese, Korean). These languages should use the ReplaceB function, which is explained on the official Microsoft website

24

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Replace Function Examples The following spreadsheets show examples of use of the Excel Replace Function. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results. Formulas: A 1 test string 2 second test string B =REPLACE( A1, 7, 3, "X" ) =REPLACE( A2, 8, 4, "MS" ) Results: A 1 test string 2 second test string B test sXng second MS string

SUBSTITUTE FUNCTION The Excel Substitute function replaces occurrences of a search text string, within an original text string, with the supplied replacement text. The syntax of the function is : SUBSTITUTE( text, old_text, new_text, [instance_num] ) Where the function arguments are: text old_text new_text - The original text string containing the text to be replaced. - The text to be found and replaced by new_text. - The new text that is used to replace the old_text.

[instance_num] - An optional argument which specifies which occurrence of old_text should be replaced by the new_text. If [instance_Num] is specified, just that instance of the old_text is replaced; Otherwise, all instances of old_text are replaced with the new_text. The Excel Substitute function is similar to the Excel Replace Function, but the Substitute function replaces one or more instances of a given text string, while the Replace function replaces text in a specified position of a supplied string. Note also, that the Excel Substitute function is case sensitive. Therefore, if the old text argument is the text string "A", this will NOT replace instances of the lower case text string "a". Substitute Function Examples:The spreadsheets below show examples of use of the Excel Substitute Function. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results. Formulas: Results:

25

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

BAHTTEXT FUNCTION The Excel Bahttext function converts a number into Thai text, with the the suffix "Baht". The syntax of the function is : =BAHTTEXT( number ) Where the number argument can be supplied to the function either directly, or as a reference to a cell containing a number. Bahttext Function Examples: The following spreadsheet shows two simple examples of the Excel Bahttext function. The format of the function is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right. Formulas: Results

DOLLAR FUNCTION The Excel DOLLAR function rounds a supplied number to a specified number of decimal places and then converts this into text, using a currency format. The Syntax of the function is : =DOLLAR( Number, [Decimals] ) Where the arguments are as follows : Number - The number to be converted into a text string

[Decimals] - An optional numerical argument which specifies the number of decimal places to be shown after the decimal point Note : -If Decimals is omitted, it takes on the default value of 2 If Decimals is negative, the supplied Number is rounded up to the left of the decimal point -If Decimals is a decimal (rather than an integer), it is truncated to an integer

Note that the Excel Dollar function uses the currency that is set as the default on your computer. The examples below use UK pounds sterling (). Example: The spreadsheet below shows examples of use of the Excel Dollar Function. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results.

26

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Formulas

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results

FIXED FUNCTION The Excel FIXED function rounds a supplied number to a specified number of decimal places and then converts this into text. The Syntax of the function is : =FIXED( Number, [Decimals], [No_commas] ) Where the arguments are as follows : Number [Decimals] - The number to be converted into a text string - An optional numerical argument which specifies the number of decimal places to be shown after the decimal point Note : -If Decimals is omitted, it takes on the default value of 2 If Decimals is negative, the supplied Number is rounded up to the left of the decimal point If Decimals is a decimal (rather than an integer), it is truncated to an integer

[No_commas] - An optional logical argument which specifies if the returned text should separate thousands by commas. Possible values are : TRUE -Commas are not included in the resulting text FALSE-Commas are included in the resulting text If the [No_commas] argument is omitted, it takes on the default value of FALSE. Example are: The spreadsheet below shows examples of use of the Excel Fixed Function. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results.

27

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

.
Formulas

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results

TEXT FUNCTION The Excel TEXT function converts a supplied value into text, in a user-specified format. The Syntax of the function is : =TEXT( value, format_text ) Where the function arguments are: value - A numeric value, that you want to be converted into text

format_text - A text string that defines the formatting that you want to be applied to the supplied value The format definitions that can be used in the Excel Text function are shown in the table below. These definitions have the same meaning when used in the custom style of Excel Cell Formatting. 0 - Forces the display of a digit in its place # - Display digit if it adds to the accuracy of the number (but don't display if a leading zero or a zero at the end of a decimal) . - Defines the position that the decimal place takes d - Day of the month or day of week d = one or two digit representation (eg. 1, 12) dd = 2 digit representation (eg. 01, 12) ddd = abbreviated day of week (eg. Mon, Tue) dddd = full name of day of week (eg. Monday, Tuesday) m - Month (when used as part of a date) m = one or two digit representation (eg. 1, 12) mm = two digit representation (eg. 01, 12) mmm = abbreviated month name (eg. Jan, Dec) mmmm = full name of month (eg. January, December) y - Year yy = 2-digit representation of year(eg. 99, 08) yyyy = 4-digit representation of year(eg. 1999, 2008) h - Hour h = one or two digit representation (eg. 1, 20) h = two digit representation (eg. 01, 20) 28 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
m

[BASIC TO ADVANCE MICROSOFT EXCEL]

- Minute (when used as a part of a time) m = one or two digit representation (eg. 1, 55) m = two digit representation (eg. 01, 55) s - Second s = one or two digit representation (eg. 1, 45) ss = two digit representation (eg. 01, 45) AM/PM - Indicates that a time should be represented using a 12-hour clock, followed by "AM" or "PM" Text Function Example 1 Problem with Simple Concatenation of Dates Because an Excel date is stored as a simple number in Excel, if you attempt to join a name and date into a text string by just using the simple & operator, this will be displayed as a name followed by a number. For example, if used in cell C2 of the spreadsheet below, the formula: =A2 & " " & B2 gives the following result:

One of my most common uses of the Excel Text function is to insert dates into text strings. Without the use of the Text function, the simple concatenation of a text string with a date gives an unexpected result (see right). The spreadsheet below shows the Excel Text function used to produce the required merged text string. As shown in the formula bar, the formula used is: =A2 & " " & TEXT( B2, "dd/mm/yyyy" )

Text Function Example 2 The examples below show use the Text function, with a variety of specified formats. The spreadsheet on the left shows the function formats and the spreadsheet on the right shows the results.

29

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Formulas:

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results:

Note that the results of the Text function, in column B of the spreadsheet above, are all text values, rather than numeric values.

VALUE FUNCTION The Excel VALUE Function converts a text string into a numeric value. Excel stores values as either text or numeric values, so, for example, if you attempt to use the text value "10" in an addition, multiplication, or other numeric operation, you will get an error. Therefore, if you want to extract a numeric value from a text string, you need to convert this to a number, before Excel will be able to recognize it as a numeric value. The VALUE function can be used to do this. The Syntax of the Value function is : =VALUE (Text) Where the text argument is a text string that can be translated into a number. If the VALUE function is not able to convert the supplied text value into a number, it will return the #VALUE! error. Value Function Examples The following spreadsheet shows the VALUE function being used for four different examples. The spreadsheet on the left shows the format of the function and the spreadsheet on the right shows the results : Formulas: 1 2 3 4 A =VALUE( "50" ) =VALUE( "1.0E-07" ) =VALUE( "5,000" ) =VALUE( "$50" ) 1 2 3 4 Results: A 50 0.0000001 5000 #VALUE!

30

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

CONCATENATE FUNCTION The Excel CONCATENATE function joins together a series of supplied text strings or other values, into one combined text string. The Syntax of the function is : =CONCATENATE( text1, [text2], ... ) Where the text arguments are a set of one or more text strings or other values that you want to join together. In Excel 2007 and Excel 2010, you can supply up to 255 text arguments, but in Excel 2003, the Concatenate function can only accept up to 30 text arguments. Concatenate Function Examples: The following spreadsheets show the Concatenate function, used to join together the strings in columns A - C of the example spreadsheet. The formulas are shown in the top spreadsheet and the results are shown in the spreadsheet below. Formulas:

Results:

LEFT FUNCTION The Excel Left function returns a specified number of characters from the start of a supplied text string. The Syntax of the function is : =LEFT( text, [num_chars] ) Where the function arguments are: Text - The original text string

[num_chars] - An optional argument that specifies the number of characters to be returned from the start of the supplied text If omitted, the [num_chars] argument takes on the default value of 1 Note that, the Left function always returns a text string, even though this may be contain digits and may look like a number. This may be important if you wish to use the result of the function within further functions or formulas. 31 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Left Function Examples: The spreadsheet below shows three examples of the Excel Left function. The format of the functions are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

MID FUNCTION The Excel Mid function returns a specified number of characters from the middle of a supplied text string. The Syntax of the function is : =MID( text, start_num, num_chars ) Where the function arguments are: text start_num - The original text string. - An integer that specifies the position of the first character that you want to be returned.

num_chars - An integer that specifies the number of characters (beginning with start_num), to be returned from the supplied text. The Mid function always returns a text string, even though this may be contain digits, and therefore may look like a number. This should be borne in mind if you wish to use the result of the function within further functions and formulas. Mid Function Examples: The spreadsheet below shows three examples of the Mid function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

Note that, the example in cell B3 returns the text value "5". Although the text string contains a number, this is stored as a text string in Excel.

32

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

RIGHT FUNCTION The Excel Right function returns a specified number of characters from the end of a supplied text string. The Syntax of the function is : =RIGHT( text, [num_chars] ) Where the function arguments are: text - The original text string

[num_chars] - An optional argument that specifies the number of characters to be returned from the end of the supplied text If omitted, the [num_chars] argument takes on the default value of 1 Note that, the Right function always returns a text string, even though this may be contain digits and may look like a number. This may be important if you wish to use the result of the function within further functions or formulas. Right Function Examples: The spreadsheet below shows three examples of the Excel Right function. The format of the functions are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

Note that, the example in cell B3 returns the text value "5". Although the text string contains a number, this is stored as a text string in Excel.

REPT FUNCTION The Excel Rept function returns a supplied text string, repeated a specified number of times. The Syntax of the function is : =Rept ( Text, Number_times ) Where the arguments are as follows : Text Number_times The string to be repeated The number of times that the supplied Text is to be repeated. Note : - If Number_times is zero, the function returns an empty string - If Number_times is a decimal, it is truncated to an integer

The resulting text string must be no longer than 32,767 characters. If it is longer than this, the Rept function returns the Excel #VALUE! error. 33 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Examples: The following spreadsheet shows several examples of the Excel Rept function. The format of the function is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right. Formulas Results

Note that in the above examples: In cell B2, the Number_times argument is set to 0, so the Rept function returns the empty string In cell B4, the the '&' operator has been used with the Rept function, to join together different text strings

LOWER FUNCTION The Excel Lower function converts all characters in a supplied text string to lower case. The Syntax of the function is : =LOWER( text ) Where the text argument is the original text string, that you want to convert to lower case. Lower Function Examples: The spreadsheet below shows four examples of the Lower function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

PROPER FUNCTION The Excel Proper function converts all characters in a supplied text string to proper case (ie. all letters that do not follow another letter are set to upper case and all other characters are lower case) The Syntax of the function is : =PROPER( text ) Where the text argument is the original text string, that you want to convert to proper case. 34 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Note that, as well as the first letter of every word, letters following numbers or other punctuation are converted to upper case by the Excel Proper function. This may be in places that you might not expect for example, the function converts the "s" in the text string "Bob's Boat" to upper case - i.e. "Bob'S Boat". Proper Function Examples: The spreadsheet below shows four examples of the Proper function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

UPPER FUNCTION The Excel Upper function converts all characters in a supplied text string to upper case. The Syntax of the function is : =UPPER ( text ) Where the text argument is the original text string, that you want to convert to upper case. Upper Function Examples: The spreadsheet below shows four examples of the Upper function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

LEN FUNCTION The Excel LEN function returns the length of a supplied text string. The syntax of the function is: =LEN( text ) Where the text argument is the text string that you want to find the length of. This can be supplied to the Len function in any of the following ways: 35 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

directly as a text string returned from another formula as a reference to a cell containing a text string Excel Len Function Examples: The examples in the spreadsheet below show the Len function used to return the length of three different text strings (one of which is empty). The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results: A B A B C 1 test string =LEN( A1 ) 1 test string 11 2 test string 2 =LEN( A2 ) 2 test string 2 13 3 =LEN( A3 ) 3 0 - empty string has length 0

FIND FUNCTION The Excel FIND function returns the position of a specified character or string within a supplied text string. The function is case-sensitive. If you want to perform a non-case-sensitive search, use the Excel Search function instead. The Syntax of the Find function is : =FIND( find_text, within_text, [start_num] ) Where the function arguments are: find_text - The character or text string that you wish to find

within_text - The text string that is to be searched [start_num] - An optional argument that specifies the position of the character from which the search should begin If omitted, this takes on the default value of 1 (i.e. begin the search at the start of the within_text string) If the supplied find_text is found, the Find function returns a number, representing the position of the find_text in the within_text. If the supplied find_text is not found, the Excel #VALUE! error is returned. Find Function Examples: The following spreadsheet shows examples of the Excel Find function used to find various characters in the text string "Original Text". The format of the functions are shown in the spreadsheet on the left and the resulting values are shown in the spreadsheet on the right.

36

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

.
Formulas:

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results:

Note that, in the above examples: Due to the case-sensitivity of the Find function, the upper- and lower-case find_text values, "T" and "t", return different results (see cells B1 & B2). In the example in cell B4, the [start_num] argument is set to 4. Therefore the search begins at the fourth character of the within_text string and so returns position 5 as the position for the character "i". Example 2 - Use of the Find Function to Show Cells Containing Specific Text Formulas:

Results:

The example on the right uses the Excel Find function to highlight cells containing a specific text string. The example spreadsheet lists members of staff for a company, alongside a list of skills. The Find function is used in columnn C, to pick out the members of staff who have the skill 'Typing'. When the string "Typing" is found, the function returns the position of the start of this string within the searched cell. If the string "Typing" is not found, the function returns the #VALUE! error. You might want to tidy up the results of the Find function in the example above. This can be done using the If and Iserrorfunctions. For example, the formula in cell C1 could be written as =IF( ISERROR( FIND( "Typing", B1 ) ), 0, 1 ) This would return the value 1 if the text "Typing" was found in cell B1 and 0 otherwise.

SEARCH FUNCTION The Excel SEARCH function returns the position of a specified character or string within a supplied text string. The function is not case-sensitive. The function is case-sensitive. If you want to perform a case-sensitive search, use the Excel Find function instead. 37 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The syntax of the Search function is : =SEARCH( search_text, within_text, [start_num] ) Where the function arguments are: search_text - The character or text string that you wish to search for within_text - The text string that is to be searched [start_num] - An optional argument that specifies the position of the character from which the search should begin If omitted, this takes on the default value of 1 (i.e. begin the search at the start of the within_text string) If the supplied search_text is found, the Search function returns a number, representing the position of the search_text in the within_text. If the supplied search_text is not found, the Excel #VALUE! error is returned. Search Function Examples: The following spreadsheet shows examples of the Excel Search function used to search for various characters in the text string "Original Text". The format of the functions are shown in the spreadsheet on the left and the resulting values are shown in the spreadsheet on the right. Formulas: Results:

Note that, in the above examples: As the Search function is not case sensitive, the upper- and lower-case search_text values, "T" and "t", return the same result (see cells B1 & B2). In the example in cell B4, the [start_num] argument is set to 4. Therefore the search begins at the fourth character of the within_text string and so returns position 5 as the position for the character "i". Example 2 - Use of the Search Function to Show Cells Containing Specific Text Formulas:

Results:

38

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The example on the right uses the Excel Search function to highlight cells containing a specific text string. The example spreadsheet lists a company's members of staff, in column A and their office skills in column B. The Search function is used in columnn C, to highlight the members of staff who have the skill 'Typing'. If the string "Typing" is found, the Search function returns the position of the start of this string within the searched cell. If the string "Typing" is not found, the function returns the #VALUE! error. Note that cell B3 contains the string "typing" (in lower case). However, because the Search function is not case sensitive, it still matches this with the search_text "Typing" and so returns the start position 19 (see cell C3). You might want to tidy up the results of the Search function in the example above. This can be done using the If and Iserrorfunctions. For example, the formula in cell C1 could be written as =IF( ISERROR( SEARCH( "Typing", B1 ) ), 0, 1 ) This would return the value 1 if the text "Typing" was found in cell B1 and 0 otherwise.

EXACT FUNCTION The Excel Exact function tests if two supplied text strings are exactly equal and if so, returns TRUE; Otherwise, the function returns FALSE. The function is case-sensitive. The Syntax of the Exact function is : =Exact( Text1, Text2 ) Where the Text1 and Text2 arguments can be supplied to the function directly or as references to cells containing text. The Exact function will also work with numbers and logical values Examples The following spreadsheet shows several examples of the Excel Exact function. The format of the function is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right. Formulas Results

39

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Note that, in the above examples: As the Excel Exact function is case-sensitive, the function in cell C2 returns FALSE The time 12:00 (in cell B4) actually has the underlying value of 0.5 in Excel. Therefore the values in cells A4 and B4 are exactly equal - it is just the formatting of these two cells that is different.

T FUNCTION The Excel T function tests if a supplied value is text and if so, returns the supplied text; Otherwise, the function returns an empty text string. The Syntax of the function is : =T( Value ) Where the Value argument can be supplied to the function directly or as a reference to a cell containing a value. Examples The following spreadsheet shows several examples of the Excel T function. The format of the function is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right.

Formulas

Results

Note that, in cells B2 and B3 of the above example spreadsheet, the T function returns an empty string. This is because the supplied arguments are the number 25 and the logical value FALSE, not text values.

CHAR FUNCTION The Excel Char function returns the character relating to a supplied number (from 1 to 255), within the character set used by your computer. - note that the character set may vary across different operating systems and so the Char function may return different results on different computers. The syntax of the Char function is : =CHAR( number ) Where the number argument is a number from 1 to 255, and can be supplied to the function either directly or as a reference to a cell containing a number. Char Function Examples 40 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Example 1 The following spreadsheet uses the Excel Char function to return the character associated with different supplied numeric values. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right - Note that these results are from the Ansi character set (used on the Windows operating system). Formulas: Results: A B A B 1 =CHAR( 65 ) 1 A 2 =CHAR( 97 ) 2 a 3 63 =CHAR( A3 ) 3 63 ? 4 51 =CHAR( A4 ) 4 51 3 Example 2 One handy use of the char function is when inserting line breaks into text. This is shown in the example below (Note that, in the Ansi character set, the line break is given by the numer code 10) : Formula: A 1 ="This line contains a" & CHAR( 10 ) & "line break" Result: A This line contains a 1 line break Note that, in the example above, in order to display the result with the line break, you will need to ensure that the cell text wrapping is enabled. To do this : Right click on the cell and select Format Cells ... Select the 'Alignment' tab and check the Wrap text option Click OK

CODE FUNCTION The Excel Code function converts the first character of a supplied text string into the associated numeric character set code used by your computer. - note that this code may vary across different computer systems. The syntax of the Code function is : =CODE( text ) Where the text argument is a text string, which is supplied to the function either directly or as a reference to a cell containing a string. Code Function Examples The following spreadsheet shows examples of the Excel Code function used to return the numeric code for a number of different text strings. 41 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right - Note that these results are from the Ansi character set (used on the Windows operating system). Formulas: Results: A B A B 1 Alpha =CODE( A1 ) 1 Alpha 65 - returns the code for the character "A" 2 alpha =CODE( A2 ) 2 alpha 97 - returns the code for the character "a" 3 =CODE( "?" ) 3 63 4 =CODE( "3" ) 4 51

EXCEL LOGICAL FUNCTIONS AND FUNCTION The Excel AND function tests a number of user-defined conditions and returns a result of: - TRUE if ALL of the conditions evaluate to TRUE Or - FALSE otherwise (i.e. if ANY of the conditions evaluate to FALSE) The syntax of the function is : =AND( logical_test1, [logical_test2], ... ) where the arguments, logical_test1, [logical_test2], etc, are conditions that evaluate to either TRUE or FALSE. In Excel 2007 or 2010, you can enter up to 255 logical_test arguments to the Excel And function. However, in Excel 2003, the function can only handle up to 30 arguments. Note that, if the logical_tests evaluate to numbers, instead of logical values, the value zero evaluates to FALSE and all non-zero values are treated as the logical value TRUE. Excel And Function Examples The following spreadsheet shows three examples of the Excel And function, with different conditions. The spreadsheet on the left shows the formulas and the spreadsheet on the right shows the results. Formulas: Results: A B C A B C 1 5 10 =AND( A1>0, A1<B1 ) 1 5 10 TRUE 2 5 10 =AND( A2>0, A2<B2, B2>12 ) 2 5 10 FALSE 3 5 10 =AND( A3<0, A3>B3, B3>12 ) 3 5 10 FALSE Note that, in the above example spreadsheet: the function in cell C1 evaluates to TRUE, as BOTH of the supplied conditions are TRUE the function in cell C2 evaluates to FALSE, as the third condition, B2>12, is FALSE the function in cell C3 evaluates to FALSE, as ALL of the supplied conditions are FALSE OR FUNCTION The Excel OR function tests a number of supplied conditions and returns either: - TRUE if ANY of the conditions evaluate to TRUE 42 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Or - FALSE otherwise (i.e. if ALL of the conditions evaluate to FALSE) The syntax of the function is : =OR( logical_test1, [logical_test2], ... ) where the logical_test arguments are one or more conditions that evaluate to either TRUE or FALSE. You can enter up to 255 conditions to the Excel Or function in Excel 2007 or 2010. However, in Excel 2003, the function can only handle up to 30 arguments. Note that, if the logical_tests return numbers, instead of logical values, zero is treated as the logical value FALSE all non-zero numbers are treated as the logical value TRUE. Excel Or Function Examples The following spreadsheet shows three examples of the Excel Or function. The spreadsheet on the left shows the formulas and the spreadsheet on the right shows the results. Formulas: Results: A B C A B C 1 5 10 =OR( A1>0, A1<B1 ) 1 5 10 TRUE 2 5 10 =OR( A2>0, A2>B2, B2>12 ) 2 5 10 TRUE 3 5 10 =OR( A3<0, A3>B3, B3>12 ) 3 5 10 FALSE Note that, in the above examples: the function in cell C1 evaluates to TRUE, as BOTH of the supplied conditions are TRUE the function in cell C2 evaluates to TRUE, as the first condition, A2>0, is FALSE the function in cell C3 evaluates to FALSE, as ALL of the supplied conditions are FALSE

NOT FUNCTION The Excel NOT function receives a logical value and simply returns the opposite logical value. I.e. if supplied with the value TRUE, the Not function returns FALSE and if supplied with the value FALSE, the function will return the value TRUE. The syntax of the function is: =Not( logical ) Where the supplied logical argument can be supplied as a direct value, a value returned from another function, or as a reference to a cell containing a logical value. Note that any numeric values, except zero are treated as the logical value TRUE, and the value zero is treated as the logical value FALSE. Excel Not Function Examples The following spreadsheet shows examples of use of the Excel Not Function. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results.

43

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Formulas:

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results:

IF FUNCTION The Excel IF function tests a user-defined condition and returns one result if the condition is true, and another result if the condition is false. The Syntax of the function is : =IF( logical_test, value_if_true, value_if_false ) Where the arguments are as follows: logical_test - The user-defined condition that is to be tested and evaluated as either TRUE or FALSE

value_if_true - The result that is to be returned from the function if the supplied logical_test evaluates to TRUE value_if_false - The result that is to be returned from the function if the supplied logical_test evaluates to FALSE Nesting the Excel If Function The If function is frequently 'nested' in Excel. I.e. the value_if_true or the value_if_false argument is replaced with another call to the If function (see Example 3 below). Excel 2003 allows up to 7 levels of nested If functions, but Excel 2007 and Excel 2010 allow up to 64 levels of nesting. For Example, the following formula (which has 8 levels of nesting), will result in an error in Excel 2003 but will work correctly in Excel 2007 or Excel 2010 : =IF(A1=1,"red", IF(A1=2,"blue", IF(A1=3,"green", IF(A1=4,"brown", IF(A1=5,"purple", IF(A1=6,"orange", IF(A1=7,"yellow", IF(A1=8,"grey", IF(A1=9,"pink", "black" ) ) ) ) ) ) ) ) ) If you do find yourself using multiple levels of nesting, you should probably consider other Excel functions that can be used to obtain the same result more succinctly. For example, the above function could be made much simpler by using the Excel Choose function. Excel If Function Example 1 The following example shows the Excel If function applied to two sets of numbers. In this example, the logical_test checks whether the corresponding value in column B is equal to 0, and the function returns : The text string "div by zero" if the value in column B is equal to 0 Or

44

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The value in column A divided by the value in column B if the value in column B is not equal to zero

If Function Example 2 The logical_test within the Excel If function can be any type of expression that returns a TRUE or FALSE result. The following example shows some more examples of the function, using different types of logical_test.

If Function Example 3 The following example shows nesting of the Excel If function. The outer function has the same logical_test as in Example 1 above. However, in the example, the value_if_true argument is a further If function. Therefore: If the value in column B is equal to 0, a further call to 'If' is made, to test the value in column C If the value in column B is not equal to zero, the function returns the value in column A divided by the value in column B

IFERROR FUNCTION The Excel Iferror function tests if an initial supplied value (or expression) returns an error, and if so, returns a second supplied argument; Otherwise the function returns the initial tested value. The Iferror function is new to Excel 2007, so is not available in earlier versions of MS Excel The Syntax of the function is: =IFERROR( value, value_if_error ) Where the arguments are as follows : value - The initial value or expression that should be tested

value_if_error - Value or expression to be returned if the initial Value argument returns an error. Improvement Compared to Excel 2003 The Excel Iferror function is a useful addition which was first introduced in Excel 2007. 45 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Previously, in Excel 2003, many users of the Excel Vlookup function would combine this with the If function and the Iserror function, to test for an error, and return an appropriate result. This is shown in the following formula: =IF( ISERROR(VLOOKUP(...)), "", VLOOKUP(...) ) the above formula checks if the Vlookup function returns an error, and if so, returns a blank (""). Otherwise the value returned by the Vlookup is used. Although this formula is long and inefficient (as it requires 2 seperate calls to the Vlookup function), it is useful because it helps to keep your spreadsheet cells tidy and free from error messages. In Excel 2007 or 2010, the above action can be performed much more efficiently and neatly, by using the Iferror function. The new formula is written as: IFERROR( VLOOKUP(...), "" ) This is illustrated in the example below. IFERROR Function Example The following spreadsheet shows two examples of the Excel Iferror function. The formulas are shown in the top spreadsheet and the results are shown in the spreadsheet below. Formulas: A B C 1 Beth Class 1 =IFERROR( VLOOKUP( "Jim", A1:B5, 2 FALSE ), "not found" ) 2 Bob Class 2 =IFERROR( VLOOKUP( "Mary", A1:B5, 2 FALSE ), "not found" ) 3 Alf Class 2 4 Jim Class 3 5 Ann Class 3 Results: A 1 Beth 2 Bob 3 Alf 4 Jim 5 Ann B Class 1 Class 3 Class 2 not found Class 2 Class 3 Class 3 C

ISNUMBER FUNCTION The Excel Isnumber function tests if a supplied value is a number. If so, the function returns TRUE; Otherwise it returns FALSE. The Syntax of the function is: =ISNUMBER( value ) Where the supplied 'value' argument can be supplied directly, or can be a value returned from a formula, or a reference to a cell containing a value.

46

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

ISNUMBER Function Examples The spreadsheets below show examples of the Excel Isnumber function. The spreadsheet on the left shows the formulas used, and the spreadsheet on the right shows the results: Formulas: Results: A B A B 1 =ISNUMBER( 1 ) 1 TRUE 2 =ISNUMBER( "text" ) 2 FALSE 3 =ISNUMBER( 10/2 ) 3 TRUE 4 =ISNUMBER( B4 ) #VALUE! 4 FALSE #VALUE! 5 =ISNUMBER( B5 ) 10 5 TRUE 10 6 =ISNUMBER( B6 ) 6 FALSE

ISEVEN FUNCTION The Excel Iseven function tests if an initial supplied number (or expression) evaluates to an even number, and if so, returns TRUE; Otherwise, the function returns FALSE. The Syntax of the function is: =ISEVEN( number ) Where the supplied 'number' argument can be a simple number, a formula that returns a numeric value, or a reference to a cell that contains a number. ISEVEN Function Examples Several examples of the Excel Iseven function are shown in the spreadsheet below. The spreadsheet on the left shows the formulas used and the spreadsheet on the right shows the results: Formulas: Results: A B A B 1 =ISEVEN( 0 ) 1 TRUE 2 =ISEVEN( 1 ) 2 FALSE 3 =ISEVEN( 2 ) 3 TRUE 4 =ISEVEN( 20/4 ) 4 FALSE 5 =ISEVEN( B5 ) 10 5 TRUE 10 6 =ISEVEN( B6 ) 6 TRUE Note that the example in cell A1 shows that the Iseven function returns True for a zero value. Also, as seen in cell A6, an empty cell evaluates to zero and so the Iseven function also returns True in this case.

ISODD FUNCTION The Excel Isodd function tests if an initial supplied number (or expression) evaluates to an odd number, and if so, returns TRUE; Otherwise, the function returns FALSE. The Syntax of the function is: =ISODD( number ) 47 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Where the supplied 'number' argument is either a simple number, a formula that returns a numeric value, or a reference to a cell that contains a number. ISODD Function Examples The spreadsheets below show examples of the Excel Isodd function. The formulas are displayed in the spreadsheet on the left and the results are shown in the spreadsheet on the right: Formulas: Results: A B A B 1 =ISODD( 0 ) 1 FALSE 2 =ISODD( 1 ) 2 TRUE 3 =ISODD( 2 ) 3 FALSE 4 =ISODD( 20/4 ) 4 TRUE 5 =ISODD( B5 ) 11 5 TRUE 11

ISBLANK FUNCTION The Excel ISBLANK function tests if a specified cell is blank (empty) and if so, returns TRUE; Otherwise the function returns FALSE. The Syntax of the function is: =ISBLANK( value ) Where the supplied 'value' argument is a reference to a cell. ISBLANK Function Examples The spreadsheets below show examples of the Excel Isblank function, used to determine whether a cell is empty or not. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right: Formulas: Results: A B A B 1 10=ISBLANK( A1 ) 1 10 FALSE 2 Text =ISBLANK( A2 ) 2 text FALSE 3 =ISBLANK( A3 ) 3 TRUE

ISTEXT FUNCTION The Excel Istext function tests if a supplied value is text, and if so, returns TRUE; Otherwise, the function returns FALSE. The syntax of the function is: =ISTEXT( value ) Where the supplied 'value' argument can be supplied directly, or can be a value returned from a formula, or a reference to a cell containing a value. ISTEXT Function Examples The spreadsheets below show several examples of the Excel Istext function. The spreadsheet on the left shows the formulas used, and the spreadsheet on the right shows the results: 48 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Formulas: 1 2 3 4 5 6

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results: 1 2 3 4 5 6 A FALSE TRUE FALSE FALSE TRUE FALSE B

A B =ISTEXT( TRUE ) =ISTEXT( "Peter" ) =ISTEXT( 10/2 ) =ISTEXT( B4 ) #VALUE! =ISTEXT( B5 ) Peter =ISTEXT( B6 )

#VALUE! Peter

ISNONTEXT FUNCTION The Excel Isnontext function tests if a supplied value is text. If not, the function returns TRUE; If the supplied value is text, the function returns FALSE. The syntax of the function is: =ISNONTEXT( value ) Where the supplied 'value' argument can be supplied directly, or can be a value returned from a formula, or a reference to a cell containing a value. Isnontext Function Examples The spreadsheets below show examples of the Excel Isnontext function. The spreadsheet on the left shows the formulas used, and the spreadsheet on the right shows the results: Formulas: Results: A B A B 1 =ISNONTEXT( TRUE ) 1 TRUE 2 =ISNONTEXT( "Peter" ) 2 FALSE 3 =ISNONTEXT( 10/2 ) 3 TRUE 4 =ISNONTEXT( B4 ) #VALUE! 4 TRUE #VALUE! 5 =ISNONTEXT( B5 ) Peter 5 FALSE Peter 6 =ISNONTEXT( B6 ) 6 TRUE

ISREF FUNCTION The Excel Isref function tests if a supplied value is a reference. If so, the function returns TRUE; Otherwise it returns FALSE. The syntax of the function is: =ISREF( value ) Where the supplied 'value' argument can be supplied directly, or can be a value returned from a formula, or a reference to a cell containing a value.

ISREF Function Examples The spreadsheets below show examples of the Excel Isref function. The spreadsheet on the left shows the formulas used, and the spreadsheet on the right shows the results: 49 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Formulas: A 1 2 3 4 5 6

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results: B 1 2 3 4 5 6 A TRUE TRUE TRUE FALSE TRUE FALSE B

=ISREF( B1 ) =ISREF( B1:B2 ) =ISREF( B1:D4 C1:C5 ) =ISREF( "B1" ) =ISREF( INDIRECT( "B1" ) ) =ISREF( B1 * B2 )

Note that, in the above examples: The text value "B1", supplied as the argument in cell A4 is a text value, not a reference. However, this text value can be converted to a reference, using the Indirect function, as shown in cell A5. In cell A6, the expression B1 * B2 returns a value (the product of the values in two cells), and so in this case, the Isref function returns FALSE

TYPE FUNCTION The Excel TYPE function receives a value and returns an integer, that represents the supplied value's data type. The syntax of the function is: =TYPE( value ) Where the supplied value can be input either directly, as a value returned from a formula, or as a reference to a cell that contains a value. The integers returned by the Excel Type function and their corresponding data types are shown in the table below : 1 2 4 16 64 Number Text Logical Value Error Value Array

Type Function Examples The spreadsheets below show examples of the Excel Type function. The formulas are displayed in the spreadsheet on the left and the results are shown in the spreadsheet on the right: Formulas: Results: A B A B 1 =TYPE( 2 ) 1 1 2 =TYPE( "text" ) 2 2 3 =TYPE( TRUE ) 3 4 4 =TYPE( {1, 2, 3} ) 4 64 5 =TYPE( 10/2 ) 5 1 6 =TYPE( B6 ) #VALUE! 6 16 #VALUE! 50 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
7 =TYPE( B7 )

[BASIC TO ADVANCE MICROSOFT EXCEL]


7 1

Note that, in the example above, the Type function in cell A7, has evaluated the empty cell B7 as the value 0. The function has therefore returned the integer 1, to denote a numeric value.

CELL FUNCTION The Excel CELL function returns information about a given cell. This can be information in relation to the contents, formatting or location of the cell. The format of the function is: =CELL( info_type, reference ) Where the arguments are as follows: info_type - Specifies the type of information to be returned. This can be either: "address" - returns the cell reference, as text "col" - returns the cell's column number "color" - returns 1 if the cell is formatted in color for negative values, or 0 otherwise "contents" - returns the value of the cell (not a formula) "filename" - returns the full path and filename of the workbook and worksheet that the supplied cell is in (returns "" (blank) if the workbook containing the cell has not yet been saved) "format" - returns a text value representing the formatting style of the cell. This may be either: "G" General Format or # ?/? or # ??/?? "F0" 0 "D1" d-mmm-yy or dd-mmm-yy ",0" #,##0 "D2" d-mmm or dd-mmm "F2" 0.00 "D3" mmm-yy ",2" #,##0.00 "D4" m/d/yy or mm/dd/yy or m/d/yy h:mm "C0" Currency Format "D5" mm/dd (no decimal places) "C2" Currency Format "D6" h:mm:ss AM/PM (2 decimal places) "P0" 0% "D7" h:mm AM/PM "P2" 0.00% "D8" h:mm:ss "S2" 0.00E+00 "D9" h:mm Added to the end of Format Types: "-" indicates cell is formatted in color for negative values "()" indicates cell is formatted with parentheses for positive or all values "parentheses" - returns 1 if the cell is formatted with parentheses for positive or all values; returns 0 otherwise "prefix" - returns a text value corresponding to the 'label prefix' of the cell 51 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

.
"protect" "row" "type"

[BASIC TO ADVANCE MICROSOFT EXCEL]


- returns 1 if the cell is locked and 0 otherwise - returns the cell's row number - returns a text value corresponding to the type of data in the cell. This can be either "b" for blank (or empty); "l" for label (ie. text constant), or "v" for value (for any other data type) - returns the cell's column width

"width"

reference - The cell that the information is to be returned for. Note: If a range of cells is supplied, the returned information relates to the top left cell of the range If the reference is omitted, then the returned information relates to the last cell that was changed

Examples of the Excel Cell Function The following spreadsheets shows examples, of the Excel Cell function being used to return different properties of the cell A1. It should be noted that, in the example spreadsheet below, the cell A1 is formatted with the Custom Format #,##0; [Red] #,##0 Formulas: Results:

Note that, in cell B6 of the above example spreadsheet, the "format" type is returned as ",0-". This is comprised of two parts: the ",0" part, which represents the #,##0 number format, and the "-" part, which indicates that the cell is formatted in color for negative values. Tip: If we changed the formatting of cell in the above spreadsheet, the formulas in cells B1-B12 will not automatically recalculate. You can force them to recalculate by pressing the F9 key. INFO FUNCTION The Excel Info function returns a text string containing information about the current operating environment. The syntax of the function is: =INFO( type_text ) 52 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Where the type_text argument is a text string that specifies the type of information to be returned. The different types of information that the Info function can return are shown in the table below : type_text "directory" "numfile" "origin" "osversion" "recalc" "release" "system" Information Returned Path of the current directory The number of active worksheets in all currently open Excel Workbooks Returns the top left cell reference of the current worksheet (generally A1) and the top left cell that is currently visible in the scrolled area of the current worksheet. Current operating system version Current recalculation mode (either "Automatic" or "Manual") Current version of Microsoft Excel Current operating environment ("mac" = Macintosh or "pcdos" = Windows)

Info Function Examples The following spreadsheets show examples of the Excel Info function. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Obviously, the results may be different for your own operating system. Formulas: Results: A A 1 =INFO( "directory" ) 1 C:\Documents and Settings\ 2 =INFO( "origin" ) 2 $A:$A$1 3 =INFO( "osversion" ) 3 Windows (32-bit) NT 6.01 4 =INFO( "recalc" ) 4 Automatic 5 =INFO( "system" ) 5 pcdos

DATE FUNCTION The Excel Date function, when supplied with integers representing a year, month and day, returns an Excel date. The syntax of the function is : =DATE( year, month, day ) Date Function Examples The following spreadsheet shows the Date function applied to different sets of values. Formulas: Results: A B C D A B C D 1 Day Month Year Date 1 Day Month Year Date 2 =DATE( 2001, 1, 2 ) 2 02-Jan-2001 3 31 5 1998 =DATE( C3, B3, A3 ) 3 31 5 1998 31-May-1998 4 21 5 1984 =DATE( C4, B4, A4 ) 4 21 5 1984 21-May-1984 5 9 1 2012 =DATE( C5, B5, A5 ) 5 9 1 2012 09-Jan-2012 53 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Month and Day Arguments Typically, the month will be between 1 and 12 and the day will be between 1 and 31. However, these values can extend below or above these ranges, in which case, they behave as follows: month - If the supplied month argument is negative or is greater than 12, the date extends back or forward, into the previous or following year. For example: DATE( 2012, -1, 1 ) = 1st November 2011 DATE( 2012, 0, 1 ) DATE( 2012, 1, 1 ) DATE( 2012, 2, 1 ) . . . DATE( 2012, 12, 1 ) DATE( 2012, 13, 1 ) DATE( 2012, 14, 1 ) day = = = = = = 1st December 2011 1st January 2012 1st February 2012 . . . 1st December 2012 1st January 2013 1st February 2013

- If the supplied day argument is negative or is greater than 31, the date extends back or forward, into the previous or following month. For example: DATE( 2012, 6, -1 ) = 30th May 2012 DATE( 2012, 6, 0 ) DATE( 2012, 6, 1 ) DATE( 2012, 6, 2 ) . . . DATE( 2012, 6, 30 ) DATE( 2012, 6, 31 ) DATE( 2012, 6, 32 ) = = = = = = 31st May 2012 1st June 2012 2nd June 2012 . . . 30th June 2012 1st July 2012 2nd July 2012

TIME FUNCTION The Excel Time function accepts three integer arguments representing hours, minutes and seconds, and returns an Excel time. The Syntax of the function is: =TIME( hour, minute, second ) Where the hour, minute and second arguments are integer values that can be supplied to the function either directly, as values returned from other formulas, or as references to cells containing integers.

54

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

If any of the Time function arguments are supplied as decimals, these are truncated to integers. Note also that, if the hour value is greater than 23, this value is divided by 24 and the remainder is used as the hour (for example, if you supply the function with the value 25 as the hour argument, the value 1 is used). Time Function Examples The following spreadsheet shows several examples of the Time function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right: Formulas: Results: A B C D E A B C D E 1 Hrs Mins Secs Time 1 Hrs Mins Secs Time 2 =TIME( 5, 44, 32 ) 2 05:44:32 3 =TIME( 2+3, 44, 32 ) 3 05:44:32 4 5 21 55 =TIME( A4, B4, C4 ) 4 5 21 55 05:21:55 5 0 0 73 =TIME( A5, B5, C5 ) 5 0 0 73 00:01:13 The results in column E of the above spreadsheet, are formatted with the Time format hh:mm:ss. Also note that, in cell E5 of the example above, the Excel Time function successfully converts the supplied value, 73 seconds, into the time 1 minute and 13 seconds. More details and examples of the Excel Time function are provided on the Microsoft Office website.

DATEVALUE FUNCTION The Excel Datevalue function converts a text representation of a date, into an Excel date. - ie. the function converts a text string representing a date, into the serial number that represents the date in Excel's date-time code. The Syntax of the Datevalue function is : =DATEVALUE( date_text ) where the date_text argument is a text string representing a date. Interpretation of Date Text Strings When reading in the supplied date_text argument, the Datevalue function follows simple rules that are the same as if you type a date directly into a cell. These are :

If just a date and month are provided, the date returned will have the current year. The default settings for the year are that one- and two-digit years are interpreted as follows: The numbers 0 through to 29 are interpreted as the years 2000 to 2029 The numbers 30 through to 99 are interpreted as the years 1930 to 1999 Datevalue Function Examples The following spreadsheet shows examples of the Excel Datevalue function: Formulas: Results: A A B 55 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
1 2 3 4 5

[BASIC TO ADVANCE MICROSOFT EXCEL]


1 40909 - represents the date 01/01/2012 2 40909 - represents the date 01/01/2012 3 40909 - represents the date 01/01/2012 4 47119 - represents the date 01/01/2029 5 10959 - represents the date 01/01/1930 * Note that the date serial numbers shown in the above results spreadsheet may vary, depending on your computer system

=DATEVALUE( "01/01/2012" ) =DATEVALUE( "01/01/12" ) =DATEVALUE( "01/01" ) =DATEVALUE( "01/01/29" ) =DATEVALUE( "01/01/30" )

In the above example spreadsheet: The text string in cell A3 contains just a day and month, and so the function returns a date in the current year. As these examples were input into Excel in the year 2012, the returned date has the year 2012. The cells in the results spreadsheet all have the general formatting type. These values can be displayed as dates by setting the cell formatting to the date type. To do this: Highlight the cell(s) to be formatted Results with date Right click with the mouse formatting: Select the Format Cells ... option and ensure the Number tab is A selected 1 01/01/2012 Under the Category heading, select the option Date. Select a 2 01/01/2012 date format from the list on the right and click OK 3 01/01/2012 The resulting formatted spreadsheet is shown on the right. 4 01/01/2029 For more details on formatting in Excel, go to the Excel Formatting page. 5 01/01/1930

TIMEVALUE FUNCTION The Excel Timevalue function converts a text representation of a time, into an Excel time. - ie. the function converts a text string representing a time, into the decimal value that represents the time in Excel. The syntax of the Timevalue function is : =TIMEVALUE( time_text ) Where the time_text argument is a text string representing a time. Within this text string, the hours, minutes and seconds should be separated by colons. Interpretation of Time Text Strings If just two values are supplied (eg. 02:54), this will be treated as hours and minutes, not minutes and seconds. If you want to represent 2 minutes and 54 seconds, this must be supplied with the hour specified as zero (eg. "00:02:54"). Note also that, if the time_text argument contains a date and time, the Timevalue function ignores the date part of the text string. These rules are illustrated in the examples below. Timevalue Function Examples The following spreadsheet shows several examples of the Excel Timevalue function. The format of the function is shown in the spreadsheet on the left and the result is shown in the spreadsheet on the right. 56 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Formulas:

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results:

In the above example spreadsheet: The value in cell A6 is a date and time, and so in this case, the Timevalue function has ignored the date part of the value, and just used the time portion. The cells in the results spreadsheet all have the general formatting. These values can be displayed as times by changing the cell formatting. To do this: Highlight the cell(s) to be formatted Right click with the mouse Select the Format Cells ... option and ensure the Number tab is selected Under the Category heading, select the option Time. Select a time format from the list on the right and click OK

NOW FUNCTION The Excel Now function returns the current date and time. The function has no arguments and Therefore, the syntax of the function is: =NOW() The NOW function updates every time your Excel worksheet is refreshed, and so any cells containing the function will be continually changing. Now Function Examples The following example shows use of the NOW function, combined with the If function, to highlight when an appointment is due. The function format is shown in the upper spreadsheet and the results, at 2 different times, are shown in the two spreadsheets below. Formula: A B 1 Appointment Due: 2 16-Nov-2010 17:00 =IF( A2-NOW() < 1/24, "!!! Due within 1 hr !!!", "Not yet due" ) Result at 15:59 hrs on 16-Nov-2010: A B 1 Appointment Due: 2 16-Nov-2010 17:00 Not yet due Result at 16:01 hrs on 16-Nov-2010: A B 1 Appointment Due: 2 16-Nov-2010 17:00 !!! Due within 1 hr !!! 57 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

In the above example, the current time (returned by the NOW function) is subtracted from the appointment time and the result is compared against 1 hour (=1/24 - see the page on Excel Dates & Times for an explanation of this). If the current time is less than 1 hour from the appointment time, the alert is shown; otherwise no text is shown in cell B2. The contents of cell B2 have also been formatted to have red bold text, to make the alert stand out more. Note that: The above alert formula could be made more sophisticated by adding more conditions to the IF function, to highlight when the appointment time has been passed, etc. The above appointment alert will only work if your spreadsheet is being continually updated. While the spreadsheet is unused, the contents of cell B2 will stay the same as at the last evaluation.

TODAY FUNCTION The Excel Today function returns the current date. The function has no arguments and therefore, the Syntax of the function is simply: =TODAY() Today Function Examples The following spreadsheets show 2 simple examples of calls to the Today function, which were made on 6th January 2011. The first example shows the function used alone, and the second example shows the function used as a part of a formula that calculates the number of days that have passed since 31-Dec2009. The spreadsheet on the left shows the format of the formulas and the spreadsheet on the right shows the results. Formulas: Results: A B A B 1 =TODAY() 1 06-Jan-2011 2 31-Dec-2009 =TODAY() - A2 2 31-Dec-2009 371

HOUR FUNCTION The Excel HOUR function returns an integer representing the hour component of a supplied Excel time. The syntax of the Datevalue function is : =HOUR( serial_number ) Where the serial_number argument is the time from which you want to extract the hour component. This can be supplied to the function either directly (as a text representation of a time or as a decimal value), as a reference to a cell containing a time, or as a time value returned from another function or formula. Note that, if the serial_number argument contains a date and time, the Hour function ignores the date part of the argument.

58

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Hour Function Examples The following spreadsheet shows the Excel Hour function applied to several different supplied times. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results. Formulas: Results:

Note that, in the above spreadsheet, the time shown in cell A4 is actually a whole day plus the time 05:11:22. Therefore, when supplied with this value, the Hour function ignores the full day and simply returns the hour value 5. Similarly, the date part of the value in cell A5 is ignored, and the hour function simply returns the hour value 8.

MINUTE FUNCTION The Excel Minute function returns an integer representing the minutes component of a supplied Excel time. The syntax of the Datevalue function is : =MINUTE( serial_number ) Where the serial_number argument is the time from which you want to extract the minutes component. This can be supplied to the function either directly (as a text representation of a time or as a decimal value), as a reference to a cell containing a time, or as a time value returned from another function or formula. Note that, if the serial_number argument is a date and time, the date part of the argument is ignored by the Minute function. Minute Function Examples The following spreadsheet shows the Excel Minute function applied to several different times. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results. Formulas: Results:

59

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

SECOND FUNCTION The Excel Second function returns an integer representing the seconds component of a supplied Excel time. The syntax of the Datevalue function is : =SECOND( serial_number ) where the serial_number argument is the time from which you want to extract the seconds component. This can be supplied to the function either directly (as a text representation of a time or as a decimal value), as a reference to a cell containing a time, or as a time value returned from another function or formula. Note that, if the serial_number argument is a date and time, the date part of the argument is ignored by the Second function. Second Function Examples The following spreadsheet shows the Excel Second function applied to several different times. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results. Formulas: Results:

MONTH FUNCTION The Excel MONTH function, when supplied with a date, returns an integer representing the month of the year (from 1 - 12). The format of the function is : =MONTH( date ) Where the date argument can be supplied to the function as either : A reference to a cell containing a date or A date returned from another formula or function Warning: If you attempt to input the date argument as text, there is a chance that Excel may misinterpret this, depending on the date system, or date interpretation settings on your computer. Also, although you can input the date as a serial number, this is not recommended, as the serial numbers may vary across different computer systems. Month Function Examples The following example shows the month function used to extract the month from 3 different dates. The spreadsheet on the left shows the format of the function and the spreadsheet on the right shows the results for the 3 dates.

60

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Formulas: 1 2 3

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results: 1 2 3 A 29-May-2008 05-Mar-1984 B 5 3 7

A B 29-May-2008 =MONTH( A1 ) 05-Mar-1984 =MONTH( A2 ) =MONTH( DATE(2010, 7, 1) )

Note that, in the above examples, as recommended by Microsoft, the date value is always supplied as either a reference to a cell containing a date, or as a value returned from another function.

YEAR FUNCTION The Excel Year function returns an integer representing the year of a supplied date. The syntax of the function is : =YEAR( serial_number ) Where the serial_number argument is the date that you want to return the year from. This can be supplied to the Year function as either: A reference to a cell containing a date or A date returned from another function or formula Warning: If you attempt to input the date argument as text, there is a chance that Excel may misinterpret this due to different date systems, or date interpretation settings. Year Function Examples The following example shows the Year function used to extract the year from 3 different dates. Formulas: Results: A B A B 1 Date Year 1 Date Year 2 29-May-2012 =YEAR( A2 ) 2 29-May-2012 2012 3 05/03/1984 =YEAR( A3 ) 3 05/03/1984 1984 4 =YEAR( DATE(2013, 1, 1) ) 4 2013 Note that, in the above examples, as recommended by Microsoft, the serial_number argument is always supplied as either a reference to a cell containing a date, or as a value returned from another function. Year Function Common Problem WEEKNUM FUNCTION For a supplied a date, the Excel Weeknum function returns an integer representing the week number (from 1 to 53) of the year. The syntax of the function is : =WEEKNUM( serial_number, [return_type] ) Where the arguments are as follows: serial_number - The Excel date, that you want to return the week number for. 61 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
[return_type]

[BASIC TO ADVANCE MICROSOFT EXCEL]

- An optional argument, that specifies which numbering system to be used and which weekday should be treated as the start of the week. The two different numbering systems are: system The week containing January 1st is numbered week 1 1 system The week containing the first Thursday of the year is numbered 2 week 1 The possible values of [return_type] are: [return_type] Meaning 1 2 11 12 13 14 15 16 17 21 Week runs from Sunday to Saturday; Uses numbering system 1 Week runs from Monday to Sunday; Uses numbering system 1 Week runs from Monday to Sunday; Uses numbering system 1 Week runs from Tuesday to Monday; Uses numbering system 1 Week runs from Wednesday to Tuesday; Uses numbering system 1 Week runs from Thursday to Wednesday; Uses numbering system 1 Week runs from Friday to Thursday; Uses numbering system 1 Week runs from Saturday to Friday; Uses numbering system 1 Week runs from Sunday to Monday; Uses numbering system 1

Week runs from Monday to Sunday; Uses numbering system 2 If omitted, the [return_type] argument is set to the default value 1 (i.e. the function assumes that a week starts on Sunday and numbering system 1 is used). Note that only options 1 and 2 above are available in Excel 2007 and earlier. Note that Microsoft advises that you do not type dates directly into functions, as Excel may interpret text representations of dates differently, depending on the date interpretation settings on your computer. Therefore the serial_num argument for the Weeknum function should be input as either: A reference to a cell containing a date or A date returned from another function or formula

62

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Weeknum Function Examples The spreadsheet below shows 5 examples of the Excel Weeknum Function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results: A B A B 1 Sat 01-Jan-2011 =WEEKNUM( A1 ) 1 Sat 01-Jan-2011 1 2 Sun 02-Jan-2011 =WEEKNUM( A2 ) 2 Sun 02-Jan-2011 2 3 Sun 02-Jan-2011 =WEEKNUM( A3, 2 ) 3 Sun 02-Jan-2011 1 4 Mon 03-Jan-2011 =WEEKNUM( A4 ) 4 Mon 03-Jan-2011 2 5 Mon 03-Jan-2011 =WEEKNUM( A5, 2 ) 5 Mon 03-Jan-2011 2

Weeknum Function Example 2 One use for the Excel Weeknum function is if you have a large number of events and you want to analyse the peak weeks throughout the year. The spreadsheet below shows part of a spreadsheet in which the days of specific events are stored in column A, and the Weeknum function is used in column B, to show the week number of each event. Formulas: Results: A B A B 1 Date Week No. 1 Date Week No. 2 Tue 01-Jan-2008 =WEEKNUM( A2 ) 2 Tue 01-Jan-2008 1 3 Wed 02-Jan-2008 =WEEKNUM( A3 ) 3 Wed 02-Jan-2008 1 4 Wed 02-Jan-2008 =WEEKNUM( A4 ) 4 Wed 02-Jan-2008 1 5 Fri 04-Jan-2008 =WEEKNUM( A5 ) 5 Fri 04-Jan-2008 1 6 Mon 07-Jan-2008 =WEEKNUM( A6 ) 6 Mon 07-Jan-2008 2 7 Mon 07-Jan-2008 =WEEKNUM( A7 ) 7 Mon 07-Jan-2008 2 8 Wed 09-Jan-2008 =WEEKNUM( A8 ) 8 Wed 09-Jan-2008 2 9 Sat 12-Jan-2008 =WEEKNUM( A9 ) 9 Sat 12-Jan-2008 2 10 Sun 13-Jan-2008 =WEEKNUM( A10 ) 10 Sun 13-Jan-2008 3 11 Mon 14-Jan-2008 =WEEKNUM( A11 ) 11 Mon 14-Jan-2008 3 12 Mon 14-Jan-2008 =WEEKNUM( A12 ) 12 Mon 14-Jan-2008 3 13 Tue 15-Jan-2008 =WEEKNUM( A13 ) 13 Tue 15-Jan-2008 3 14 Wed 16-Jan-2008 =WEEKNUM( A14 ) 14 Wed 16-Jan-2008 3 15 Wed 16-Jan-2008 =WEEKNUM( A15 ) 15 Wed 16-Jan-2008 3 16 Wed 16-Jan-2008 =WEEKNUM( A16 ) 16 Wed 16-Jan-2008 3 17 Mon 21-Jan-2008 =WEEKNUM( A17 ) 17 Mon 21-Jan-2008 4 18 Mon 21-Jan-2008 =WEEKNUM( A18 ) 18 Mon 21-Jan-2008 4 19 Fri 25-Jan-2008 =WEEKNUM( A19 ) 19 Fri 25-Jan-2008 4 20 Wed 30-Jan-2008 =WEEKNUM( A20 ) 20 Wed 30-Jan-2008 5 21 Sat 02-Feb-2008 =WEEKNUM( A21 ) 21 Sat 02-Feb-2008 5 63 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
22 23 24

[BASIC TO ADVANCE MICROSOFT EXCEL]


22 23 24 Sun 03-Feb-2008 Sun 03-Feb-2008 Mon 04-Feb-2008 6 6 6

Sun 03-Feb-2008 =WEEKNUM( A22 ) Sun 03-Feb-2008 =WEEKNUM( A23 ) Mon 04-Feb-2008 =WEEKNUM( A24 )

The WEEKNUM data can now be used in an Excel Pivot Table, to show the number of events occurring during each week. A pivot table made from the small sample of data above is shown on the right. The pivot table enables you to clearly see that the peak week for the events is week number 3 (13th-19th January), which accounts for a total of 7 events.

WEEKDAY FUNCTION The Excel Weekday function returns an integer representing the day of the week for a supplied date. The Syntax of the function is : =WEEKDAY( serial_number, [return_type] ) Where the function arguments are as follows: serial_number - The Excel date, that you want to return the weekday of. [return_type] - An optional integer argument, that specifies which integers are to be assigned to each weekday. Possible values are: [return_type] Weekday Numbering 1 2 3 11 12 13 14 15 16 Sunday = 1, Monday = 2, ... , Saturday = 7 Monday = 1, Tuesday = 2, ... , Sunday = 7 Monday = 0, Tuesday = 1, ... , Sunday = 6 Monday = 1, Tuesday = 2, ... , Sunday = 7 Tuesday = 1, Wednesday = 2, ... , Monday = 7 Wednesday = 1, Thursday = 2, ... , Tuesday = 7 Thursday = 1, Friday = 2, ... , Wednesday = 7 Friday = 1, Saturday = 2, ... , Thursday = 7 Saturday = 1, Sunday = 2, ... , Friday = 7

17 Sunday = 1, Monday = 2, ... , Saturday = 7 If omitted, the [return_type] argument is set to the default value 1 (i.e. Sunday = 1, Monday = 2, ... , Saturday = 7). Only options 1, 2 & 3 above are available in Excel 2007 and earlier. 64 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Note that Microsoft advises that you do not type dates directly into functions, as Excel may interpret text representations of dates differently, depending on the date interpretation settings on your computer. Therefore the serial_num argument for the Weekday function should be input as either: A reference to a cell containing a date or A date returned from another function or formula Weekday Function Examples Column A of the spreadsheet below stores the dates of a series of events. The Weekday function has been inserted into the cells of column B, to show the weekday of each date in column A. Formulas: Results: A B A B 1 Date Weekday 1 Date Weekday 2 31-Dec-2012 =WEEKDAY( A2 ) 2 31-Dec-2012 2 3 01-Jan-2013 =WEEKDAY( A3 ) 3 01-Jan-2013 3 4 03-Jan-2013 =WEEKDAY( A4 ) 4 03-Jan-2013 5 5 04-Jan-2013 =WEEKDAY( A5 ) 5 04-Jan-2013 6 6 08-Jan-2013 =WEEKDAY( A6 ) 6 08-Jan-2013 3 7 12-Jan-2013 =WEEKDAY( A7 ) 7 12-Jan-2013 7 8 15-Jan-2013 =WEEKDAY( A8 ) 8 15-Jan-2013 3 9 16-Jan-2013 =WEEKDAY( A9 ) 9 16-Jan-2013 4 10 18-Jan-2013 =WEEKDAY( A10 ) 10 18-Jan-2013 6 11 22-Jan-2013 =WEEKDAY( A11 ) 11 22-Jan-2013 3 12 23-Jan-2013 =WEEKDAY( A12 ) 12 23-Jan-2013 4 13 29-Jan-2013 =WEEKDAY( A13 ) 13 29-Jan-2013 3 14 03-Feb-2013 =WEEKDAY( A14 ) 14 03-Feb-2013 1 15 05-Feb-2013 =WEEKDAY( A15 ) 15 05-Feb-2013 3 The Weekday function data can now be used in an Excel Pivot Table, to show the number of events occurring on each weekday. A pivot table made from the sample of data above is shown on the right. The pivot table enables you to clearly see that the peak weekday for the events was Tuesday (represented by day number 3), which accounts for a total of 18 events.

Displaying Weekdays as Text If you use the Weekday function with the [return_type] argument set to 1, then you can use Excel formatting to display the weekday names instead of showing numbers. To format the weekday to show the weekday name:

65

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Select the column containing the weekdays Right click on this column with the mouse and selectFormat_Cells... from this menu From within the Number tab, select the Category Custom Under the Type heading, type ddd Click OK Note, this only works with the [return_type] set to 1. The resulting pivot table is shown on the right.

DAY FUNCTION The Excel DAY function, when supplied with a date, returns an integer representing the day of the month (from 1 - 31). SYNTAX: =DAY( date ) Where the date argument can be supplied to the function as either : A date returned from another formula or function or A references to a cell containing a date Warning: If you attempt to input the date argument as text, there is a chance that Excel may misinterpret this, due to different date systems, or date interpretation settings. Also note that, although you can input the date argument as a serial number, this is not recommended, as the serial numbering may vary across different computer systems. Day Function Examples The following example shows the function used to extract the day from 3 different dates. The spreadsheet on the left shows the format of the function and the spreadsheet on the right shows the results for the 3 dates. Formulas: Results: A B A B 1 31-May-2010 =DAY( A1 ) 1 31-May-2010 31 2 21-Mar-1984 =DAY( A2 ) 2 21-Mar-1984 21 3 =DAY( DATE(2010, 1, 1) ) 3 1 Note that, in the above examples, as recommended by Microsoft, the date value is always supplied as either a reference to a cell containing a date, or as a value returned from another function.

66

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

EDATE FUNCTION The Excel Edate function returns a date that is a specified number of months before or after a supplied start date. The Syntax of function is: =EDATE( start_date, months ) Where the arguments are as follows: start_date - The initial date, from which to count the number of months. months - The number of months to add to (or subtract from) the start_date.

Note that Microsoft advises that you do not type dates directly into functions, because Excel interprets text representations of dates differently, depending on the date interpretation settings on your computer. Therefore the start_date argument for the Edate function should be input as either: A reference to a cell containing a date or A date returned from another function or formula Warning: Although you can input date arguments as date serial numbers, this is not recommended as date serial numbering does vary across different computer systems. Edate Function Examples The following spreadsheets show examples of the Edate function. The formulas are shown in the spreadsheet on the left, and the results are shown in the spreadsheet on the right. Formulas: Results: A B A B 1 31-Jan-2008 =EDATE( A1, 9 ) 1 31-Jan-2008 31-Oct-2008 2 31-Jan-2008 =EDATE( A2, 22 ) 2 31-Jan-2008 30-Nov-2009 3 31-Jan-2008 =EDATE( A3, -16 ) 3 31-Jan-2008 30-Sep-2006 4 28-Feb-2008 =EDATE( A4, 12 ) 4 28-Feb-2008 28-Feb-2009 5 29-Feb-2008 =EDATE( A5, 12 ) 5 29-Feb-2008 28-Feb-2009 The above examples illustrate that: You can use negative values for the months argument, to get a date that is before the supplied start_date. The function is able to cope with months that do not contain the same day number as the start_date. For example, there is no 31st day of November, so the function returns the 30th. Similarly, the function can handle the leap year day - returning 28/02/2009 as the date 12 months after 29/02/2008. Note also that, as recommended by Microsoft, in all calls to the Edate function, the start_date has been supplied as a cell reference.

EOMONTH FUNCTION The Excel Eomonth function returns the last day of the month, that is a specified number of months before or after an initial supplied start date. 67 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The syntax of the function is: =EOMONTH( start_date, months ) Where the arguments are as follows: start_date - The initial date months - The number of months to add to (or subtract from) the start_date, before returning the last day of the resulting month

Note that, when supplying a date to a function, this should be input as either: A reference to a cell containing a date or A date returned from another function or formula Warning: - If you attempt to input a date argument as text, the interpretation of this may differ, depending on the date system and date interpretation settings on your computer. - Although you can enter dates as serial numbers, this is not recommended, as date serial numbering varies across different computer systems. Eomonth Function Examples The following spreadsheet shows examples of the Eomonth function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results: A B A B 1 01-Jan-2012 =EOMONTH( A1, 9 ) 1 01-Jan-2012 31-Oct-2012 2 01-Jan-2012 =EOMONTH( A2, -12 ) 2 01-Jan-2012 31-Jan-2011 3 01-Jan-2012 =EOMONTH( A3, 0 ) 3 01-Jan-2012 31-Jan-2012 4 29-Feb-2012 =EOMONTH( A4, 12 ) 4 29-Feb-2012 28-Feb-2013 5 28-Feb-2011 =EOMONTH( A5, 12 ) 5 28-Feb-2011 29-Feb-2012 Note how you can use negative values for the months argument, to get a date that is before the supplied start_date. You can also set the months argument to zero, to get the last day of the original start_date.

WORKDAY FUNCTION The Excel Workday function returns a date that is a supplied number of working days (excluding weekends and holidays) ahead of a given start date. The format of the function is: =WORKDAY( start_date, days, [holidays] ) Where the arguments are as follows: start_date - The initial date, from which to count the number of workdays days 68 - The number of workdays to add onto start_date HELLO:= 0333-7061644

Prepared By: MANZOOR ALI SOLANGI

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

[holidays] - An optional argument, which specifies an array of dates (in addition to weekends) that are not to be counted as working days Note that the start_date and [holidays] arguments should be input as either: References to cells containing dates or Dates returned from formulas - If you attempt to input these date arguments as text, Excel may misinterpret them, due to different date systems, or date interpretation settings. Warning: Although you can input date arguments as date serial numbers, this is not recommended as date serial numbering does vary across different computer systems. Examples The spreadsheets below show simple examples of the Excel Workday function. The format of the function is shown in the top spreadsheet and the results are shown below. Formulas:

Results:

In the above spreadsheets : In the example in cell D2 the holidays array has been omitted. Therefore the calculation excludes Saturdays and Sundays but includes all other weekdays, including the holidays at Christmas and New Year. In the examples in cells D3 and D4 the holidays array (in cells B2 - B4) is provided to the Workday function. Therefore the calculation excludes Saturdays and Sundays and the listed Christmas and New Year holidays. Note also that, as recommended by Microsoft, in all three calls to the Workday function, the start_date and [holidays] arguments have been supplied as either cell references or the return value from a function (in this case the Excel Date function).

DAYS360 FUNCTION The Excel Days360 function returns the number of days between 2 dates, based on a 360-day year (12 x 30 months). The format of the function is : =DAYS360( Start_date, End_date, [Method] ) 69 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Where the arguments are as follows: Start_date - The start of the period End_date [Method] - The end of the period - An optional logical argument, which gives the method to be used in the calculation. This can be either: FALSE (or omitted) - US (NASD) method used or TRUE - European method used

US vs. European Method US Method: If start date is last day of month it is set to 30th of that month If end date is last day of month, then: If start date is last day of month the end date is set to the 1st of the following month Otherwise, the end date is set to 30th of that month European Method: If start date is last day of month it is set to 30th of that month If end date is last day of month, then it is set to 30th of that month The financial day count basis rules are explained in more detail on the Wikipedia Day Count Convention page Note that the Start_date and End_date arguments should be input as either: References to cells containing dates or Dates returned from formulas - If you attempt to input the Start_date and End_date as text, there is a chance that Excel may misinterpret this due to different date systems, or date interpretation settings. Warning: Although you can input the dates as serial numbers, this is not recommended as the serial numbers may vary across different computer systems. Examples The spreadsheets below show simple examples of the Excel Days360 function. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

In the above example : In the function is cells B1 and B4 the Method argument has been omitted. Therefore, the US (NASD) method is used. 70 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

In cells B2, the Method is set to TRUE, so the European method is used. Note that this gives a different result from the function in cell B1, which uses the same two dates with the US (NASD) method. Note also that, as recommended by Microsoft, in all four calls to the Days360 function, the Start_date and End_date arguments have been supplied as either cell references or the return values from functions (in the example the Excel Date function is used to supply theEnd_date argument to the function in cell B4).

NETWORKDAYS FUNCTION The Excel Networkdays function calculates the number of whole work days between two supplied dates. This includes all weekdays (Mon - Fri), excluding a supplied list of holidays. The format of the function is: =NETWORKDAYS( start_date, end_date, [holidays] ) Where the arguments are as follows: start_date - The start of the period for which we are counting days (the start date is counted in the returned number of days) end_date - The end of the period for which we are counting days (the end date is counted in the returned number of days)

[holidays] - An optional argument, which specifies an array of dates (in addition to weekends) that are not to be counted as working days

Note that the start_date, end_date and [holidays] arguments should be input as either: References to cells containing dates or Dates returned from formulas - If you attempt to input these date arguments as text, Excel may misinterpret them, due to different date systems, or date interpretation settings. Warning: Although you can input date arguments as date serial numbers, this is not recommended as date serial numbering does vary across different computer systems. Examples The spreadsheets below show simple examples of the Excel Networkdays function calculating the number of work days between the two dates 01-Dec-2010 and 05-Jan-2011. The format of the function is shown in the top spreadsheet and the results are shown below.

71

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Formulas:

[BASIC TO ADVANCE MICROSOFT EXCEL]

Results:

In the above spreadsheet : The holidays array has been omitted from the calculation in cell A8. Therefore this result excludes Saturdays and Sundays but includes all other weekdays, including the holidays at Christmas and New Year. In the examples in cells A9 and A10 the holidays array (in cells B3 - B5) is provided to the Networkdays function. Therefore the calculation excludes Saturdays and Sundays and the listed Christmas and New Year holidays. Note also that, as recommended by Microsoft, in all three calls to the Networkdays function, the start_date, end_date, and [holidays] arguments have been supplied as either cell references or the return value from a function (in this case the Excel Date function).

YEARFRAC FUNCTION The Excel Yearfrac function returns the fraction of a year that is represented by the number of whole days between two supplied dates. The syntax of the function is : =YEARFRAC( start_date, end_date, [basis] ) Where the arguments are as follows: start_date - The start of the period (this date also is included in the calculation) end_date [basis] - The end of the period (this date is included in the calculation) - An optional argument, which specifies the type of day count basis to be used Possible values of [basis] and their meanings are: [basis] Day Count Basis Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

72

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]


US (NASD) 30/360 actual/actual actual/360 actual/365 European 30/360

0 (or omitted) 1 2 3 4

The financial day count basis rules are explained in more detail on the Wikipedia Day Count Convention page Note that Microsoft advises that you do not type dates directly into functions, as Excel may interpret text representations of dates differently, depending on the date interpretation settings on your computer. Therefore the start_date and end_date arguments for the Yearfrac function should be input as either: References to cells containing dates or Dates returned from other functions or formulas Yearfrac Function Examples The spreadsheets below show examples of the Excel Yearfrac function used to calculate the year fraction between 1st January 2011 and 31st March 2011, using each of the different Day Count Basis types. The formulas for the functions are shown in the spreadsheet on the left, and the results are shown in the spreadsheet on the right. Formulas: Results:

EXCEL LOOKUP AND REFERENCE FUNCTIONS ADDRESS FUNCTION The Excel Address function takes row and column numbers and returns a cell reference as a text string. The syntax of the function is: =ADDRESS( row_num, column_num, [abs_num], [a1], [sheet_text] ) 73 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Where the arguments are as follows: row_num - The row number to use in the reference

column_num - The column number to use in the reference [abs_num] - An optional argument, which specifies whether the reference should contain absolute or relative references. abs_num can take on the following values : 1 - denotes absolute row & column reference 2 - denotes absolute row & relative column reference 3 - denotes relative row & absolute column reference 4 - denotes relative row & column reference If this argument is omitted, it takes on the default value 1 (absolute references) - An optional logical argument that defines the style of the returned reference. This can be either : True - to denote that the reference is in A1 style False - to denote that the reference is in R1C1 style If this argument is omitted, it takes on the default value "True" (For more details, see the page on Excel Reference Styles) - An optional text argument that specifies the sheet name. If this argument is omitted, the sheet name is blank (ie. the reference relates to the current worksheet)

[a1]

[sheet_text]

Address Function Examples The following spreadsheets show simple examples of the Excel Address function. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results:

Note that cell A5 in the above spreadsheet combines the ADDRESS function with the ROW function and the COLUMN function to display the reference to the current cell. The Array Format of the Excel INDEX Function The Array format of the Index function is the most basic form of the function, and is used when you want to look up a reference to a cell within a single range.

74

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The syntax of the function is : =INDEX( array, row_num, col_num ) Where the arguments are as follows : array - The specified array or range of cells

row_num - Denotes the row number of the specified array If set to zero or blank, this defaults to all rows in the supplied array col_num - Denotes the column number of the specified array If set to zero or blank, this defaults to all columns in the supplied array

The function is best explained through the following examples: Example 1 In the following example, the Index function returns a reference to row 5 of the supplied range, which is cell C5. This evaluates to the value 8 Formula Result

Example 2 In the following example, the Index function returns a reference to row 5 and column 2 of the supplied range, which is cell D5. This evaluates to the value 3 Formula Result

Example 3 In the following example, as the supplied col_num is set to 0, the Index function returns a reference to all of row 5 of the supplied range, which is the range C5:D5. The sum of this range evaluates to the value 11

75

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Formula

[BASIC TO ADVANCE MICROSOFT EXCEL]


Result

Array Formulas: To input an array formula, you need to first highlight the range of cells for the function result. Type your function into the first cell of the range, and press CTRL-SHIFT-Enter. Example 4 In the following example, the supplied row_num is set to 0, and so the Index function returns a reference to all of column 2 of the supplied range. I.e. the function returns a reference to the rangeD1:D5. In this case, the function is input into cells A1:A5, as an Array Formula. Therefore, the values of the five cells returned by the Index function are displayed in cells A1:A5. Formula Result

The Range Format of the Excel INDEX Function The Range format of the Index function can be used to extract references from ranges that are made up of more than one area. The format of the function is : =INDEX( range, row_num, col_num, area_num ) Where the arguments are as follows : array - The specified range of cells Note: If multiple areas are input directly into the function, the individual areas should be separated by commas and surrounded by brackets - ie. ( A1:B2, C3:D4, etc)

row_num - Denotes the row number of the specified array If set to zero or blank, this defaults to all rows in the supplied array col_num - Denotes the column number of the specified array If set to zero or blank, this defaults to all columns in the supplied array Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

76

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

area_num - If the initial specified range is made up of more than one area, the area_num argument specifies the number of the area to be used (Note that the areas are numbered by the order they are specified) This form of the Index function is illustrated via the following examples: Example 1 In the following example, the Index function returns a reference to row 4 and column 2 of the 1st area (ie. C1:D5) in the supplied range. This is cell D4. This evaluates to the value 5 Formula Result

Example 2 In the following example, the Index function returns a reference to row 3 and column 1 of the 3rd area (ie. B10:D12) in the supplied range. This is cell B12, which evaluates to the value 7 Formula Result

Example 3 In the following example, as the supplied col_num is blank, the Index function returns a reference to all of row 3 of the 3rd area (ie. B10:D12) of the supplied range. This is the range B12. 77 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The sum of this range evaluates to the value 10. Formula

Result

INDIRECT FUNCTION The Excel INDIRECT function takes a text string and converts this into a cell reference. Excel does not understand the text string "B1" to mean a reference to the cell B1. Therefore, if you extract or build up a reference to a cell or range using text, you will need to use the INDIRECT function to convert this into a reference that Excel can understand. The format of the function is : =INDIRECT( Ref_text, A1 ) INDIRECT Function Examples The following spreadsheets show simple examples of the Excel INDIRECT function. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right.

Note that, in the above examples : Although the Excel INDIRECT function always returns a cell (or range) reference, in cells A1 - A3, the cells are evaluated and it is this value that is shown in the cell. In cell A3, the ROW function has been used to return the reference to the current row number (ie. 3), and use this to form part of the cell reference. In cell A4, the INDIRECT function returns a reference to the range C1:E1, which has been fed into the Excel SUM function. This SUM therefore evaluates to the sum of 8 + 9 + 0 = 17

OFFSET FUNCTION 78 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Excel Offset function returns range of cells that is a specified number of rows and columns from an initial supplied range. The user can specify the size of the returned cell range. The syntax of the function is : =OFFSET( reference, rows, cols, [height], [width] ) Where the function arguments are as follows : reference - The initial cell range that is to be offset (can be either a single cell or multiple cells) rows cols [height] [width] - The number of rows from the start (upper left) of the initial supplied range, to the the start of the returned range - The number of columns from the start (upper left) of the initial supplied range, to the the start of the returned range - An optional argument that specifies the height of the returned range If omitted, the returned range is the same height as the supplied range - An optional argument that specifies the width of the returned range If omitted, the returned range is the same width as the supplied range

If the optional [height] and [width] arguments are omitted, the returned range is the same height and width as the supplied range. However, if the specified returned range goes off the edge of the spreadsheet, the function returns an error. Offset Function Examples Example 1 The following examples show the ranges that are referenced by four different calls to the Excel Offset function. In each example, the initial supplied range is highlighted in green and the returned range is shown in red. =OFFSET( B1:B6, 4, 2 ) (note the height and width arguments are omitted and so the returned range has the same dimensions as the original range)

=OFFSET( D3, 1, -2 )

79

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]


=OFFSET( B2, 2, 1, 1, 4 )

=OFFSET( B2, 3, 0, 3, 2 )

Inputting an Array Formula To input an array formula, you need to first highlight the range of cells for the function result. Type your function into the first cell of the range, and press CTRL-SHIFT-Enter. Go to the Excel array formulas page for more details. The Offset Function as an Array Formula In each of the above examples, the Offset function returns a cell range and so the result must either be entered into a range of cells (as an Array Formula), or must be supplied to a further Excel formula that uses an array as an argument. Both of these options are shown in example 2 below. Offset Function Example 2 The following example shows a practical use of the Offset function, in which the results are used in a further Excel function. In this example, the Offset function returns the cell range containing the earnings for the weekday 'Tuesday'. Cell B2 contains the formula to simply reference the cell range, and the formula in cell B3 calculates the total of these values, using the Excel Sumfunction.

In the above spreadsheet, the arguments to the Offset function in both cells, B2 and B3, are as follows: The initial cell range is cell A6. This is the cell from which the offset is applied. 80 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The 'rows' argument is set to 2, specifying that the start of the returned range is offset by 2 rows from the start cell (i.e. an offset of 2 rows from row 6) The 'cols' argument is set to 1, specifying that the start of the returned range is offset by 1 column from the start cell (i.e. an offset of 1 column from column A). The 'height' argument is set to 1, so the returned range is 1 cell high The 'width' argument is set to 4, so the returned range is 4 cells wide These arguments cause the Offset function to return a reference to the range of cells B8-E8, which contains the earnings for the weekday 'Tuesday'. As the formula in cell B2 returns a range of four cells, this must be entered into a range of four cells, as an Array Formula. The resulting spreadsheet is shown below:

In the above spreadsheet, the formula in cell B2 is displayed in the formula bar. The curly brackets around the formula show that it has been input as an Array Formula. The formula in cell B3 is not entered as an Array Formula, as the result of the Offset function is fed directly into the Sum function. Advanced Offset Formula If, in the example above, you want the offset function to retrieve the earnings for any weekday that is displayed in cell B1, you can do this by combining the Excel Match function with the Offset function. This is shown below.

81

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

In this example, the Match function identifies which row (from A6 to A12) contains the specified weekday shown in cell B1. This will give the result, 1 if B1="Sunday", 2 if B1="Monday", etc. This number then becomes the 'rows' argument for the Offset function.

ROW FUNCTION The Excel Row function returns the first row number within a supplied reference, or if no reference is supplied, the function returns the number of the current row in the currently active Excel spreadsheet. The syntax of the Row function is : =ROW( [reference] ) Where [reference] is an optional argument that specifies the Excel reference that you want to return the row number of. If [reference] is omitted, the function returns the row number of the current cell (i.e. the cell that the function is entered into). Row Function Examples The spreadsheets below show examples of the Excel Row function. The spreadsheet on the left shows the formulas and the spreadsheet on the right shows the results: Formulas: Results: A B A B 1 =ROW( ) =ROW( ) 1 1 1 2 =ROW( ) =ROW( ) 2 2 2 3 =ROW( E7 ) =ROW( G9 ) 3 7 9 Note that the examples in cells A1-B2 of the above spreadsheet omit the [reference] argument. Therefore, the Excel Row function returns the row number of the cell that the function is entered into.

COLUMN FUNCTION The Excel Column function returns the first column number within a supplied reference, or if no reference is supplied, the function returns the number of the current column in the currently active Excel spreadsheet. 82 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The syntax of the Column function is : =COLUMN( [reference] ) Where [reference] is an optional argument that specifies the Excel reference that you want to return the column number of. If [reference] is omitted, the function returns the column number for the current cell (i.e. the cell that the function is entered into). Column Function Examples The spreadsheets below show six examples of the Excel Column function. The spreadsheet on the left shows the formulas and the spreadsheet on the right shows the results: Formulas: Results: A B C A B C 1 =COLUMN( ) =COLUMN( ) =COLUMN( E6 ) 1 1 2 5 2 =COLUMN( ) =COLUMN( ) =COLUMN( G2 ) 2 1 2 7 Note that the examples in cells A1-B2 of the above spreadsheet omit the [reference] argument. Therefore, the Excel Column function returns the column number of the cell that the function is entered into.

ROWS FUNCTION The Excel Rows function takes an Excel range and returns the number of rows that are contained within the range. The syntax of the function is: =ROWS( array ) Where the array argument is the range that you want to know the number of rows in. Rows Function Examples The following spreadsheets show simple examples of the Excel Rows function. The spreadsheet on the left shows the formulas used, and the spreadsheet on the right shows the results. Formulas: Results: A A 1 =ROWS( B1 ) 1 1 2 =ROWS( B1:E5 ) 2 5 3 =ROWS( B:B ) 3 1048576 Note that the above functions were calculated in Excel 2010. Therefore, the formula in cell A3 of the above spreadsheet returns the value 1,048,576, as this is the number of rows in Excel 2010. The same result would be returned in Excel 2007, but if this example were run in Excel 2003, it would return the number 65,536.

COLUMNS FUNCTION The Excel Columns function receives an Excel range and returns the number of columns that are contained within the range. 83 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The syntax of the function is: =COLUMNS( array ) Where the array argument is the Excel range that you want to know the number of columns in. Columns Function Examples The following spreadsheets show simple examples of the Excel Columns function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results: A A 1 =COLUMNS( B1 ) 1 1 2 =COLUMNS( B1:E5 ) 2 4 3 =COLUMNS( 1:1 ) 3 16384 Note that the above functions were calculated in Excel 2010. Therefore, the formula in cell A3 of the above spreadsheet returns the value 16,384, as this is the number of columns in Excel 2010. The same result would be returned in Excel 2007, but if this example were run in Excel 2003, it would return the number 256.

AREAS FUNCTION The Excel Areas function takes an Excel reference and returns the number of areas that make up the reference. The format of the function is : =AREAS( Reference ) Where the Reference argument can be input directly or can be a named range. If the Reference argument is input directly, the different areas of cells are input as a list, separated by commas and surrounded by brackets. This is seen in the examples below. Example 1 The following spreadsheets show simple examples of the Excel Areas function. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right.

Example 2 The following spreadsheet shows another example of the AREAS function, where the Reference is the named range 'TestRange', which is made up of the 3 areas shown on the spreadsheet on the left. As shown in the spreadsheet on the right, the Areas function returns the result 3.

84

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

HLOOKUP FUNCTION The Excel Hlookup function 'looks up' a given value in the top row of a data array (or table), and returns the corresponding value from another row of the array. The syntax of the function is : =HLOOKUP( lookup_value, table_array, row_index_num, [range_lookup] ) Where the function arguments are as follows: lookup_value table_array - The value that you want to look for, in the first row of the supplied data array - The data array or table, that you want to search the first row of, for the supplied lookup_value

row_index_num - The row number, within the supplied array, that you want the corresponding value to be returned from [range_lookup] - An optional logical argument, which can be set to TRUE or FALSE, meaning : TRUE - if the function cannot find an exact match to the supplied lookup_value, it should use the closest match below the supplied value (Note: If range_lookup is set to TRUE, the top row of the table_array must be in ascending order) FALSE - if the function cannot find an exact match to the supplied lookup_value, it should return an error

Examples Hlookup Example 1 Cells A2-F6 of the spreadsheet below, show the exam scores for 5 students in 4 different subjects. If you want to look up a specific score (eg. Biology) for one of the students (eg. Ed), this can be done using the Hlookup function, as shown in cell B10 of the spreadsheet. In the example below, the formula is shown in cell B10 of the spreadsheet on the left, and the result is shown in the spreadsheet on the right.

85

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Formulas:

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results:

In the above example, the Hlookup function searches through the top row of the table_array (the range A2-A6), to find a match for the lookup_value (the name "Ed", in cell A10). When the the name 'Ed' is found, the function returns the corresponding value from the 5th row of the lookup_table.

This is illustrated on the right. The function finds the name 'Ed' in the top row of the table_array and then returns the value from the 5th row of the table_array. If we change the name in the individual spreadsheet from 'Ed' to 'Cara', the Hlookup functions would automatically recalculate the functions to display the exam results for Cara. Hlookup Example 2 Cells A1-F3 of the spreadsheet below, show body types relating to body mass index (BMI), for the ranges 0 - 18.4, 18.5 - 24.9, 25.0 - 29.9 and over 30. Cell C6 shows the user's current BMI, which is 23.5, and cell C7 shows the Hlookup function that is used to look up the body type that relates to this BMI.

The Hlookup function in the above spreadsheet returns the result "Normal Weight", which is the correct body type for a BMI of 23.5.

86

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Note that, in this example, the range_lookup argument is set to TRUE, to tell that function that, if it cannot find an exact match to the supplied lookup_value, it should use the closest match below this value. Therefore, for all BMIs up to and including 18.4 the function would return "Underweight", for all BMIs between 18.5 and 24.9, the function would return "Normal Weight", etc.

VLOOKUP FUNCTION The Excel VLOOKUP function 'looks up' a given value in the left-hand column of a data array (or table), and returns the corresponding value from another column of the array. The Syntax of the function is: =VLOOKUP( lookup_value, table_array, col_index_num, [range_lookup] ) where the arguments are as follows: lookup_value table_array - The value that you want to look for, in the left-hand column of the supplied data array - The data array or table, that you want to search the left hand column of, for the supplied lookup_value

col_index_num - The column number, within the supplied array, that you want the corresponding value to be returned from [range_lookup] - An optional logical argument, which can be set to TRUE or FALSE, meaning : TRUE - if the function cannot find an exact match to the supplied lookup_value, it should use the closest match below the supplied value (Note: If range_lookup is set to TRUE, the left-hand column of the table_array must be in ascending order) FALSE - if the function cannot find an exact match to the supplied lookup_value, it should return an error Vlookup Examples Vlookup Example 1 In the spreadsheet below, columns A and B list an inventory of grocery items, and their prices, and cell E2 of the spreadsheet shows a simple example of the Vlookup function being used to look up the price of an item from the inventory.

87

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The above Vlookup function returns the price for "Cornflakes", which is $3.50. In this example: -the lookup_value is the text string "Cornflakes", which is located in cell D2 -the table_array is columns A-B of the spreadsheet -the col_index_num is set to 2, to denote that the value returned should be taken from column 2 of the table_array -the range_lookup argument is set to FALSE, to indicate that we only want a result to be returned if an exact match to the lookup_value is found Vlookup Example 2 In the spreadsheet below, columns A-C list the grades that are assigned to examination marks lying within the ranges 0-44%, 45%-54%, etc. Cell F2 shows the score of 52% that was achieved by the student "Anne" in an examination. The Vlookup function in cell G2 looks up this score in column A of the spreadsheet and returns the associated grade from column C. Note that, in this example, if the exact score of 52% is not found in column A, we want, instead, to use the nearest value below this score.

The above Vlookup function returns the grade for the score 52%, which is E. In this example: -the lookup_value is the value 52%, which is located in cell F2 -the table_array is the range A2-C7 of the spreadsheet -the col_index_num is set to 3, to denote that the value returned should be taken from column 3 of the table_array -the range_lookup argument is set to TRUE, to indicate that, if an exact match to the lookup_value is not found, we want to use the closest value below the lookup_value

88

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

LOOKUP FUNCTION The Excel LOOKUP function 'looks up' a supplied value within a data set and returns the corresponding value from a second data set. If the function fails to find an exact match to the supplied 'lookup' value, it uses the largest value that is less than or equal to the supplied 'lookup' value. Because the function finds a 'nearest' match, it is not suitable for all lookups - if you require an exact match to your 'lookup' value, or an error message if this isn't found, consider using the Vlookup or the Hlookup Function. For the Lookup function to work correctly, it is necessary that the data to be searched be ordered (ascending numerically or alphabetically). If the data is not ordered, the function may return unpredictable results. The Excel Lookup function has two forms - the Vector form and the Array form. These are described individually below. The Vector Form of the Excel Lookup Function The vector form of the Lookup function 'looks up' a value in a data vector (ie. a 1-dimensional list of data) and returns the corresponding value from a second data vector. The format of the function is : =LOOKUP( lookup_value, lookup_vector, result_vector ) Where the arguments are as follows : lookup_value - the value that you want to look up in the supplied lookup_vector

lookup_vector - A 1-dimensional list of data, which we want to search for the lookup_value result_vector - A 1-dimensional list of data, from which we want to return a value (must be the same length as the lookup_vector)

Example of the Vector Form of the Lookup Function In the spreadsheet below, cells A1-E3 relate to a variable interest rate, that is paid on a bank account. For balances of 0-$999.99, the interest rate is 3%, for balances of $1000-$1,999.99, the interest rate is 4%, etc. Cell A6 of the spreadsheet shows the balance of a specific bank account and cell B6 shows the vector form of the Excel Lookup function being used to look up the interest rate relating to this balance.

89

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The above Lookup function returns the interest rate of 5%, which is the correct interest rate to apply to a bank account with a balance of $45,000. In this example: -the lookup_value is the value $45,000.00, which is located in cell A6 -the lookup_array is the vector of data in cells B1-E1 of the spreadsheet -the result_array is the vector of data in cells B3-E3 of the spreadsheet Note that the vector form of the Excel Lookup function can be used with any two sets of data that have one-on-one matching values. For example, two columns of data, two rows of data, or even a column and a row would work, as long as the lookup_vector was ordered (alphabetically or numerically), and the two data sets were the same length. The Array Form of the Excel Lookup Function The array form of the Lookup function 'looks up' a supplied value in the first column or row of a supplied data array (ie. a 2-dimensional table of data) and returns the corresponding value from the last column or row of the array. The format of the function is : =LOOKUP( lookup_value, array ) Where the arguments are as follows : lookup_value - the value that you want to look up in the supplied data array array - A 2-dimensional array (or table) of data which we want to search the first column or row of, for the lookup_value, and which contains the values to be returned in the last column or row

Example of the Array Form of the Lookup Function In the spreadsheet below, columns A-C list the grades that are assigned to examination marks lying within the ranges 0-44%, 45%-54%, etc. Cell F2 shows the score of 82% that was achieved by the student "Chris" in an examination. The Lookup function in cell G2 looks up this score in column A of the spreadsheet and returns the associated grade from column C. Note that, in this example, if the exact score of 82% is not found in column A, we want, instead, to use the nearest value below this score.

The above Lookup function returns the grade for the score 82%, which is B. In this example: 90 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

-the lookup_value is the value 82%, which is located in cell F2 -the array is the vector of data in cells A2-C7 of the spreadsheet Note: In this example, the Excel Lookup function recognised that it was searching for the lookup_value in the first column of the supplied array, and returning a value from the last column. However if the array is transposed so that the data runs across 3 rows, the function will recognise this, and will still return the correct values. CHOOSE FUNCTION The Excel Choose function returns a value from a list, that corresponds to a supplied index number. It may help to think of the Choose function as a function that returns the nth entry in a given list. The Syntax of the function is : =CHOOSE( index_num, value1, [value2], ... )

Excel Choose Function Examples Imagine you are working on the spreadsheet below and you want to set the cells in Column B, to have the following values, depending on the value of the corresponding cell in Column A. 1 - red; 2 - blue; 3 - green; 4 - brown The Excel Choose function can be used to assign the correct below: Formulas: A B 1 4 =CHOOSE( A1, "red", "blue", "green", "brown" ) 2 2 =CHOOSE( A2, "red", "blue", "green", "brown" ) 3 3 =CHOOSE( A3, "red", "blue", "green", "brown" ) 4 1 =CHOOSE( A4, "red", "blue", "green", "brown" ) value to the cells of Column B, as shown Results: A B 1 4 brown 2 2 blue 3 3 green 4 1 red

MATCH FUNCTION The Excel MATCH function finds the relative position of a value in a supplied array. The user can request either an exact match or can request the position of the closest match (above or below), if an exact match is not found. The Syntax of the function is: =MATCH( lookup_value, lookup_array, [match_type] ) Excel Match Function Example 1 The following spreadsheet shows the Excel Match function used with the [match_type] argument set to 0. Therefore, in these examples, the function only returns a result if an exact match to the lookup_value is found. Otherwise, the function returns an error.

91

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Formulas: Results: A B A B C 1 cccc =MATCH( "aaaa", A1:A5, 0 ) 1 cccc 3 - matches "aaaa" so returns position 3 2 dddd =MATCH( "?eee", A1:A5, 0 ) 2 dddd 5 - matches "eeee" so returns position 5 3 aaaa =MATCH( "*b", A1:A5, 0 ) 3 aaaa 4 - matches "bbbb" so returns position 4 4 bbbb 4 bbbb 5 eeee 5 eeee Note that, in the above examples, as the [match_type] argument is set to 0, the text strings in the lookup_array (cells A1-A5) do not need to be ordered. Match Function Example 2 The following spreadsheet also shows the Excel MATCH function used with the [match_type] argument set to 0, but in this case the function is used to look up numeric values. Formulas: Results: A B A B C 1 7 =MATCH( 4, A1:A6, 0 ) 1 7 3 - returns position 3 2 2 =MATCH( 8, A1:A6, 0 ) 2 2 5 - returns position 5 3 4 =MATCH( 10, A1:A6, 0 ) 3 4 #N/A - no exact match - returns error 4 1 4 1 5 8 5 8 6 11 6 11 As in the previous examples, as the [match_type] argument is set to 0, the values in the lookup_array (cells A1-A6) do not need to be ordered. Match Function Example 3 The following spreadsheet shows the Excel MATCH function used with the [match_type] argument set to 1. Therefore, in this example, the data in the lookup_array must be in ascending order, and the function returns the position of the exact match to the lookup_value if this is found, or the position of the closest value below the lookup_value if an exact match is not found. Formulas: Results: A B A B C 1 4 =MATCH( 6, A1:A6, 1 ) 1 4 2 - returns position 2 2 6 =MATCH( 8, A1:A6, 1 ) 2 6 3 - returns position 3 (nearest value below 8) 3 7 =MATCH( 15, A1:A6, 1 ) 3 7 5 - returns position 5 (nearest value below 15) 4 10 4 10 5 11 5 11 6 16 6 16 Note that the [match_type] argument could have been omitted from the functions in this spreadsheet, as this argument takes the value 1 by default.

92

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

HYPERLINK FUNCTION The Excel Hyperlink function creates a hyperlink to a document in a supplied location. The Syntax of the function is : =HYPERLINK( link_location, friendly_name ) Hyperlink Function Examples Excel Hyperlinks are an excellent way of organising your data. This is shown in the spreadsheet the right, which collates details of sales invoices, and uses the Excel Hyperlink function to create links to individual invoices. The spreadsheet below shows the functions used to create the hyperlinks :

As the current spreadsheet is located in the directory C:\Invoices, the Excel hyperlink functions in cells B2 and B3, create links to the invoice files Invoice_B001.pdf and Invoice_B002.pdf, which are both located in the directory C:\Invoices. The result is shown in the spreadsheet below :

The hyperlinks in cells B2 and B3 allow you to open up the files Invoice_B001.pdf and Invoice_B002.pdf simply by clicking on the cells B2 and B3. Note that, in this example, cell B2 uses an absolute reference, while B3 uses a relative reference. As the current spreadsheet is located in the directory C:\Invoices, the relative reference in cell B3 links to the file C:\Invoices\Invoice B002.pdf.

TRANSPOSE FUNCTION The Excel Transpose function 'transposes' an array of cells (ie. the function copies a horizontal range of cells into a vertical range and vice versa). The Syntax of the function is : =TRANSPOSE( array ) Where the array argument is a range of Excel spreadsheet cells. As the transpose function returns an array of values, it must be entered as an Array Formula.

93

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Example 1 In the example on the right, the simple vertical range of cells A1-A6 is transposed into the horizontal range B1-F1. The formula for the function can be seen in the formula bar. The curly braces { } show that the function has been input as an Array Formula.

Example 2 In the spreadsheet on the right, the range of cells A1D2 is transposed into the range F1-G4. Again the curly braces { } shown in the formula bar indicate that the function has been input as an Array Formula.

ABS FUNCTION The Excel ABS function returns the absolute value (ie. the modulus) of any supplied number. The Syntax of the function is : =ABS( number ) where the number argument is a numeric value, that can be supplied to the function as either a simple number, a reference to a cell containing a number, or as a numeric value returned from another function or formula. Abs Function Examples The following spreadsheet shows several examples of the Excel Abs function. The format of the functions are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results:

94

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

SIGN FUNCTION The Excel SIGN function returns the sign (+1, -1 or 0) of a supplied number. ie. if the number is positive, the Sign function returns +1, if the number is negative, the function returns -1 and if the number is 0 (zero), the function returns 0. The System of the Sign function is : =SIGN( Number ) Examples The following spreadsheets show simple examples of the Excel Sign function. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results

GCD FUNCTION The Excel GCD function returns the greatest common divisor of two or more supplied integers. The Syntax of the function is : =GCD( Number1, Number2, ...) Example Column A of the spreadsheet below, shows examples of the Excel Gcd Function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results A A 1 =GCD( 1, 5 ) 1 1 2 =GCD( 15, 10, 25 ) 2 5 3 =GCD( 0, 8, 12 ) 3 4 4 =GCD( 7, 2 ) 4 1

LCM FUNCTION The Excel LCM function returns the least common multiple of two or more supplied integers. The Syntax of the function is : =LCM( Number1, Number2, ...) Example Column A of the spreadsheet below, shows examples of the Excel Lcm Function.

95

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas Results A A 1 =LCM( 1, 5 ) 1 5 2 =LCM( 15, 10, 25 ) 2 150 3 =LCM( 1, 8, 12 ) 3 24 4 =LCM( 7, 2 ) 4 14

SUM FUNCTION The Excel SUM function adds together a supplied set of numbers and returns the sum of these values. The Syntax of the function is : =SUM( number1, [number2], ... ) Excel Sum Function Examples The following spreadsheet shows the Excel Sum function used to calculate the sum of the numbers 5, 6, 7, 8 & 9. In each of the five examples, the numbers are supplied to the Sum function differently. The spreadsheet on the left shows the formulas and the spreadsheet on the right shows the results. Formulas: Results: A B A B 1 5 =SUM( A1:A5 ) 1 5 35 2 6 =SUM( 5+6, 7, 8, 9 ) 2 6 35 3 7 =SUM( A1:A3, 8, 9 ) 3 7 35 4 8 =SUM( A1, A2, A3, "8", "9" ) 4 8 35 5 9 =SUM( {5,6,7}, 8, 9 ) 5 9 35 Note that, in the above example spreadsheet: the numbers can be supplied to the function either directly, as results of other Excel formulas or as cell references. each argument can be supplied as a single value or cell, or as an array of values or cells (note that in cell B5, the argument {5,6,7} is an array of numbers). when supplied directly to the function, text representations of numbers are included in the Sum calculation.

PRODUCT FUNCTION The Excel PRODUCT function returns the product (multiplication) of a supplied set of numerical values. The Syntax of the function is : =PRODUCT( number1, [number2], ... ) Excel Product Function Examples The following spreadsheet shows four different ways to input five numbers into the Excel Product function. The example illustrates how the number arguments can be input as either: 96 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]


individual number individual numbers arrays cells

- cell ranges ... or a combination of all of these. Formulas: A B 1 3 =PRODUCT( 3, 6, 2, 8, 5 ) 2 6 =PRODUCT( A1:A5 ) 3 2 =PRODUCT( 3, 6, 2, A4, A5 ) 4 8 =PRODUCT( {3,6}, A3:A5 ) 5 5

Results: A 1 2 3 4 5

3 6 2 8 5

B 1440 1440 1440 1440

POWER FUNCTION The Excel Power function calculates a given number, raised to a supplied power. The Syntax of the function is : =POWER( number, power ) Excel Power Function Examples The following spreadsheet shows examples of the Excel Power function. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results:

MOD FUNCTION The Excel MOD function returns the remainder of a division between two supplied numbers. The Syntax of the function is : =MOD( Number, Divisor ) Where the arguments are as follows: Number Divisor The number to be divided The value that divides the Number argument

These arguments can be supplied to the function either as simple numbers, as references to cells containing numbers, or as values returned from other functions. This is shown in the examples below. Examples The following spreadsheets show simple examples of the Excel Mod function. The format of the function is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right.

97

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

.
Formulas

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results

SUBTOTAL FUNCTION The Excel Subtotal function performs a specified calculation (eg. the sum, product, average, etc.) for a supplied set of values. The Syntax of the function is: =SUBTOTAL( function_num, ref1, [ref2], ... ) Where the arguments are as follows: function_num - A number that denotes the calculation type (eg. sum, product, average, etc.) ref1, [ref2], ... - One or more references to cells containing the values that the calculation is to be performed on.

function_num function_num Function (include hidden values) (ignore hidden values) 1 101 AVERAGE 2 102 COUNT 3 103 COUNTA 4 104 MAX 5 105 MIN 6 106 PRODUCT 7 107 STDEV 8 108 STDEVP 9 109 SUM 10 110 VAR 11 111 VARP Subtotal Function Examples The following examples use a simple spreadsheet that shows monthly sales figures, between January and March, for 3 teams. In each of the examples, the spreadsheet on the left shows the format of the Subtotal function, and the spreadsheet on the right shows the result. Example 1 In this example, the Subtotal function is used to calculate the sum and the average monthly sales per team. As all of the cells in the range of sales figures are visible, the calculations include all values in the sales column: 98 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Formulas:

[BASIC TO ADVANCE MICROSOFT EXCEL]


Results:

Note that, in the example above, as all cells are visible, we could have set the function_num argument to either 9 or 109 for the sum - both values would give the same result. Similarly, using either 1 or 101 for the average would give the same results. Example 2 In this example, the teams have been filtered, using the Excel Autofilter, to show Team 1 only. In this case, the Subtotal function's calculations will be for the visible cells only (ie. for Team 1 only) : Formulas: Results:

Note that, in the example above, because the rows for Teams 2 & 3 have been filtered out, using the Excel Autofilter, we could have used a function_num argument of either 9 or 109 to give the same sum, (ie. the sum for the Team 1 sales only). Similarly, we could have used either 1 or 101 to give the same the average calculation. Example 3 In this example, rows 3, 4, 6, 7, 9, and 10 of the spreadsheet have been hidden using row formatting i.e. by highlighting these rows, right clicking with the mouse and selecting Hide. In the spreadsheet below, the Subtotal function is used to calculate the sum and the average monthly sales across ALL teams. Because we are using the values of 9 and 1 for the function_num arguments, the hidden cells are included in the calculations : Formulas: Results:

99

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Note that, in the example above, we could exclude the hidden values from the calculations by using the function_num values of 109 and 101 for the sum and average functions respectively. Further information on the Excel Subtotal Function is provided on the Microsoft Office website.

EVEN FUNCTION The Excel Even function rounds a supplied number away from zero (ie. rounds a positive number up and a negative number down), to the next even number. The Syntax of the function is: =EVEN( number ) Where the number argument is the numeric value that you want to round. This can be supplied directly to the function, or it can be provided as a reference to a cell containing a number, or a value returned from another function or formula. Even Function Examples The following spreadsheets show the Excel Even function used to round several different numbers. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right: Formulas: Results: A B A B 1 =EVEN( 23 ) 1 24 2 2.22 =EVEN( A2 ) 2 2.22 4 3 =EVEN( A2+4 ) 3 8 4 0 =EVEN( A4 ) 4 0 0 5 -0.3 =EVEN( A5 ) 5 -0.3 -2 6 -11 =EVEN( A6 ) 6 -11 -12 7 -4 =EVEN( A7 ) 7 -4 -4 The above examples show how the Even function always rounds away from zero, to the next even number. - ie. If the supplied number is positive, it is rounded up (more positive), but if the supplied number is negative, it is rounded down (less negative).

INT FUNCTION The Excel Int function truncates a supplied number down to the nearest integer below. The Syntax of the function is: =INT( number ) Where the number argument is any numerical value. This can be supplied directly to the function, or it can be provided as a reference to a cell containing a number, or a value returned from another function or formula.

100

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

INT Function Examples The following spreadsheets show the Excel Int function applied to several different supplied numbers: Formulas: Results: A B A B 1 =INT(100.9) 1 100 2 5.22 =INT( A2 ) 2 5.22 5 3 5.99 =INT( A3 ) 3 5.99 5 4 99.5 =INT( A4 ) 4 99.5 99 5 -6.1 =INT( A5 ) 5 -6.1 -7 6 -100.9 =INT( A6 ) 6 -100.9 -101

MROUND FUNCTION The Excel Mround function rounds a supplied number up or down to the nearest multiple of a given number. The Syntax of the function is: =MROUND( number, multiple ) Where the arguments are as follows: number - The initial number

multiple - The multiple that the supplied number should be rounded to. Note: The multiple argument should have the same sign (positive or negative) as the initial number argument. Mround Function Examples The following spreadsheet shows several examples of the Mround function: Formulas: Results: A B A B 1 number Mround 1 number Mround 2 333.7 =MROUND( A2, 0.5 ) 2 333.7 333.5 3 333.8 =MROUND( A3, 1 ) 3 333.8 334 4 333.3 =MROUND( A4, 2 ) 4 333.3 334 5 555.3 =MROUND( A5, 400 ) 5 555.3 400 6 555 =MROUND( A6, 1000 ) 6 555 1000 7 -555.7 =MROUND( A7, -1 ) 7 -555.7 -556 8 -555.4 =MROUND( A8, -1 ) 8 -555.4 -555 9 -1555 =MROUND( A9, -1000 ) 9 -1555 -2000

101

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

ODD FUNCTION The Excel Odd function rounds a supplied number away from zero (ie. rounds a positive number up and a negative number down), to the next odd number. The Syntax of the function is: =ODD( number ) Where the number argument is the numeric value that you want to round. This can be supplied directly to the function, or it can be provided as a reference to a cell containing a number, or a value returned from another function or formula. Odd Function Examples The following spreadsheets show the Excel Odd function used to round several different numbers. The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right: Formulas: Results: A B A B 1 =ODD( 22 ) 1 23 2 1.22 =ODD( A2 ) 2 1.22 3 3 =ODD( A2+4 ) 3 7 4 0 =ODD( A4 ) 4 0 1 5 -1.3 =ODD( A5 ) 5 -1.3 -3 6 -10 =ODD( A6 ) 6 -10 -11 7 -3 =ODD( A7 ) 7 -3 -3

ROUND FUNCTION The Excel Round function rounds a supplied number up or down, to a specified number of decimal places. The Syntax of the function is: =ROUND( number, num_digits )

Where the arguments are as follows: number - The initial number.

num_digits - The number of decimal places to round the supplied number to. Note that: a positive num_digits value specifies the number of digits to the right of the decimal point a num_digits value of 0 specifies rounding to the nearest integer a negative num_digits value specifies the number of digits to the left of the decimal point

102

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Round Function Examples The following spreadsheet shows the Excel Round function used with different argument values : Formulas: Results: A B A B 1 =ROUND( 100.319, 1 ) 1 100.3 2 5.28 =ROUND( A2, 1 ) 2 5.28 5.3 3 5.9999 =ROUND( A3, 3 ) 3 5.9999 6 4 99.5 =ROUND( A4, 0 ) 4 99.5 100 5 -6.3 =ROUND( A5, 0 ) 5 -6.3 -6 6 -100.5 =ROUND( A6, 0 ) 6 -100.5 -101 7 -22.45 =ROUND( A7, 1 ) 7 -22.45 -22.5 8 999 =ROUND( A8, -1 ) 8 999 1000 9 991 =ROUND( A9, -1 ) 9 991 990

TRUNC FUNCTION The Excel Trunc function truncates a supplied number, to a specified number of decimal places. The Syntax of the function is: =TRUNC( number, [num_digits] ) Where the arguments are as follows: number - The initial number that is to be truncated.

[num_digits] - An optional argument that specifies the number of decimal places to truncate the supplied number to. The default value is 0. Note that: a positive [num_digits] value specifies a number of digits to the right of the decimal point if [num_digits] is omitted or has a value of 0, this specifies rounding to an integer a negative [num_digits] value specifies a number of digits to the left of the decimal point Trunc Function Examples The following spreadsheet shows the Excel Trunc function used with different argument values: Formulas: Results: A B A B 1 =TRUNC( 99.999, 1 ) 1 99.9 2 99.999 =TRUNC( A2, 2 ) 2 99.999 99.99 3 99.999 =TRUNC( A3 ) 3 99.999 99 4 99.999 =TRUNC( A4, -1 ) 4 99.999 90 5 -99.999 =TRUNC( A5, 2 ) 5 -99.999 -99.99 6 -99.999 =TRUNC( A6, -1 ) 6 -99.999 -90

103

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

104

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
SUMIF FUNCTION

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Excel Sumif function finds values in a supplied array, that satisfy a given criteria, and returns the sum of the corresponding values in a second supplied array. The Syntax of the function is : =SUMIF( range, criteria, [sum_range] ) Where the function arguments are: range criteria - An array of values (or range of cells containing values) to be tested against the supplied criteria - The condition to be tested against each of the values in range

[sum_range] - An optional array of numeric values (or cells containing numbers) which are to be added together, ifthe corresponding range entry satisfies the supplied criteria If the sum_range argument is omitted, the values from the range argument are used instead Excel Sumif Function Examples Example 1 The following example shows the Excel Sumif function using critia based on text strings. The spreadsheet on the left shows the format of the functions and the spreadsheet on the right shows the results from the function calls. Formulas: A B C 1 Month Team Sales 2 Jan North 1 $36,693 3 Jan North 2 $22,100 4 Jan South 1 $53,321 5 Jan South 2 $34,440 6 Feb North 1 $29,889 7 Feb North 2 $50,090 8 Feb South 1 $32,080 9 Feb South 2 $45,500 10 11 =SUMIF( A2:A9, "Feb", C2:C9 ) 12 =SUMIF( B2:B9, "North 1", C2:C9 ) 13 =SUMIF( B2:B9, "North*", C2:C9 ) Results: A B C 1 Month Team Sales 2 Jan North 1 $36,693 3 Jan North 2 $22,100 4 Jan South 1 $53,321 5 Jan South 2 $34,440 6 Feb North 1 $29,889 7 Feb North 2 $50,090 8 Feb South 1 $32,080 9 Feb South 2 $45,500 10 11 $157,559 12 $66,582 13 $138,772

105

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Example 2

[BASIC TO ADVANCE MICROSOFT EXCEL]

The following example shows the Excel Sumif function using critia based on numerical values. Formulas: A B C 1 2 3 4 5 6 7 8 1 1 200 2 2 45 3 1 550 4 2 450 5 1 20 6 7 =SUMIF( A1:A5, 1, B1:B5 ) 8 =SUMIF(B1:B5, ">100" ) Note that:

Results: A 1 2 1 2 1 700 1200 B 200 45 550 450 20 C

the criteria in cell A8 is an expression, and so, is enclosed in quotes. the sum_array is omitted from the function in cell A8 and so the range array (i.e. cells B2-B6) is used as the sum_range

SUMPRODUCT FUNCTION The Excel Sumproduct function returns the sum of the products of the corresponding values in two or more supplied arrays. The Syntax of the function is: =SUMPRODUCT( array1, array2, [array3], ... ) Where the array arguments are arrays of numeric values, which may be supplied to the function directly, or as one or more cells or ranges of cells containing numeric values. All of the supplied arrays must be of equal length and non-numeric values in the supplied arrays are treated as the value zero. Formulas

Results

106

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
FACT FUNCTION

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Excel FACT function returns the factorial of a supplied number The Syntax of the function is : =FACT( number ) where the number argument is the positive integer that you want to calculate the factorial of. Examples Cells A1-A3 of the following spreadsheet shows examples of the Excel Fact function being used to calculate the factorial of different integers. The format of the functions is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results:

FACTDOUBLE FUNCTION The Excel FACTDOUBLE function returns the double factorial of a supplied number The Syntax of the function is : =FACTDOUBLE( number ) Where the number argument is the positive integer that you want to calculate the double factorial of. Examples Cells A1-A3 of the following spreadsheet shows examples of the Excel Factdouble function being used to calculate the double factorial of different integers. The format of the functions is shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right. Formulas: Results:

107

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
ROMAN FUNCTION

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Excel ROMAN function converts an arabic number to Roman - i.e. for a supplied number, the function returns a text string depicting the roman numeral form of the number. The Syntax of the function is: =ROMAN( number, [form] ) Where the arguments are as follows : number - The number that is to be converted to a Roman numeral (must be an integer between 0 and 1999) [form] - An optional argument that specifies the form of the Roman numeral returned This can take any of the following values: 0 - Classic form 1 - More Concise 2 - More Concise 3 - More Concise 4 - Simplified form TRUE - Classic form FALSE - Simplified form If the [form] argument is omitted, it takes on the default value of 0 (denoting the classic form is used). Examples The following spreadsheet shows example of the Excel Roman function used to convert the number 9999 to different forms of Roman numerals. The spreadsheet on the left shows the format of the function, and the spreadsheet on the right shows the result. Formula Result

108

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
MAX FUNCTION

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Excel MAX function returns the largest value from a supplied set of numerical values. The syntax of the function is : =MAX( number1, [number2], ... ) where the number arguments are a set of one or more numeric values, or arrays of numeric values, that you want to return the largest value of. These values can be supplied either directly to the function, as cells containing numeric values, or as values returned from other excel formulas. Excel Max Function Example The following example shows the Max function used to retrieve the largest value from the set of values in cells A1 - A5. The format of the function is shown in the spreadsheet on the left and the resulting value is shown in the spreadsheet on the right. Formulas: Results:

MIN FUNCTION The Excel MIN function returns the smallest value from a supplied set of numerical values. The Syntax of the function is : =MIN( number1, [number2], ... ) where the number arguments are a set of one or more numeric values, or arrays of numeric values, that you want to return the smallest value of. These values can be supplied directly to the function, as cells containing numeric values, or as values returned from other excel formulas. Excel Min Function Example The following example shows the Min function used to retrieve the smallest value from the set of values in cells A1 - A5. The format of the function is shown in the spreadsheet on the left and the resulting value is shown in the spreadsheet on the right. Formulas: Results:

109

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

LARGE FUNCTION The Excel LARGE function returns the k'th largest value from an array or a range of cells containing numerical values. The Syntax of the function is : =LARGE( array, k ) Where the function arguments are: array - An array of numeric values that you want to return the k'th largest of k Examples The following example shows the Excel Large function, being used to retrieve the 1st, 2nd, 3rd, 4th and 5th largest values from the set of values in cells A1 - A5. The format of the functions are shown in the spreadsheet on the left and the resulting values are shown in the spreadsheet on the right. Formulas: Results: - The index - i.e. the function returns the k'th largest value from the supplied array

Note that, any calls to the Large function, in which the index, k is set to 1, gives the same result as the Max function.

110

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
SMALL FUNCTION

[BASIC TO ADVANCE MICROSOFT EXCEL]

The Excel SMALL function returns the k'th smallest value from an array or a range of cells containing numerical values. The Syntax of the function is : =SMALL( array, k ) Where the function arguments are: array - An array of numeric values that you want to return the k'th smallest of k - The index - i.e. the function returns the k'th smallest value from the supplied array

The array argument can be supplied to the function either directly, or as a reference to a range of cells containing numeric values. If values in the supplied range of cells are text values, these values are ignored. Examples The following example shows the Excel Small function, being used to retrieve the 1st, 2nd, 3rd, 4th and 5th smallest values from the set of values in cells A1 - A5. The format of the functions are shown in the spreadsheet on the left and the resulting values are shown in the spreadsheet on the right. Formulas: Results:

Note that, any calls to the Small function, in which the index, k is set to 1, gives the same result as the Min function. AVERAGE FUNCTION The Excel AVERAGE function returns the arithmetic mean of a list of supplied numbers. The Syntax of the function is : =AVERAGE( number1, [number2], ... ) where the number arguments are a set of one or more numeric values, or arrays of numeric values, for which you want to calculate the average - these values can be supplied directly to the function, or as one or more cells or ranges of cells containing numeric values. Excel Average Function Examples The following spreadsheet shows the Excel Average function used to calculate the arithmetic mean of the set of values in cells A1-A5. Although the same 5 values are provided to each of the functions in cells B1-B4, in each case, the values are provided to the function in different ways. 111 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

The format of the functions are shown in the spreadsheet on the left and the resulting values are shown in the spreadsheet on the right. Formulas: Results:

SOME IMPORTANT TERMS OF MS EXCEL Activate To make a chart sheet or worksheet the active, or selected, sheet. The sheet that you activate determines which tabs are displayed. To activate a sheet, click the tab for the sheet in the workbook. Active Cell The selected cell in which data is entered when you begin typing. Only one cell is active at a time. The active cell is bounded by a heavy border. Active Sheet The sheet that you're working on in a workbook. The name on the tab of the active sheet is bold. Address The path to an object, document, file, page, or other destination. An address can be a URL (Web address) or a UNC path (network address), and can include a specific location within a file, such as a Word bookmark or an Excel cell range. Argument The values that a function uses to perform operations or calculations. The type of argument a function uses is specific to the function. Common arguments that are used within functions include numbers, text, cell references, and names. Array Used to build single formulas that produce multiple results or that operate on a group of arguments that are arranged in rows and columns. An array range shares a common formula; an array constant is a group of constants used as an argument. Array formula A formula that performs multiple calculations on one or more sets of values, and then returns either a single result or multiple results. Array formulas are enclosed between braces { } and are entered by pressing CTRL+SHIFT+ENTER. Border A decorative line that can be applied to worksheet cells or objects, such as charts, pictures, or text boxes. Borders distinguish, emphasize, or group items.

112

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Cell A box formed by the intersection of a row and column in a worksheet or a table, in which you enter information. Data Validation An Excel feature that you can use to define restrictions on what data can or should be entered in a cell, and to display messages that prompt users for correct entries and notify users about incorrect entries. Database A collection of data related to a particular subject or purpose. Within a database, information about a particular entity, such as an employee or order, is categorized into tables, records, and fields. Drop-down list box A control on a menu, toolbar, or dialog box that displays a list of options when you click the small arrow next to the list box. Field (database) A category of information, such as last name or order amount, that is stored in a table. When Query displays a result set in its Data pane, a field is represented as a column. filter To display only the rows in a list that satisfy the conditions you specify. You use the AutoFilter command to display rows that match one or more specific values, calculated values, or conditions. Font A graphic design applied to all numerals, symbols, and alphabetic characters. Also called type or typeface. Arial and Courier New are examples of fonts. Fonts usually come in different sizes, such as 10 point, and various styles, such as bold. Formula A sequence of values, cell references, names, functions, or operators in a cell that together produce a new value. A formula always begins with an equal sign (=). Formula Bar A bar at the top of the Excel window that you use to enter or edit values or formulas in cells or charts. Displays the constant value or formula stored in the active cell. Function (Microsoft Query) An expression that returns a value based on the results of a calculation. Query assumes that data sources support the Avg, Count, Max, Min, and Sum functions. Some data sources may not support all of these, or may support additional functions. Function (Office Excel) A prewritten formula that takes a value or values, performs an operation, and returns a value or values. Use functions to simplify and shorten formulas on a worksheet, especially those that perform lengthy or complex calculations.

113

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Goal Seek A method to find a specific value for a cell by adjusting the value of one other cell. When goal seeking, Excel varies the value in a cell that you specify until a formula that's dependent on that cell returns the result you want. Grid A set of intersecting lines used to align objects. Gridlines in Charts Lines you can add to a chart that make it easier to view and evaluate data. Gridlines extend from the tick marks on an axis across the plot area. Group In an outline or PivotTable report, one or more detail rows or columns that are adjacent and subordinate to a summary row or column. Merged Cell A single cell that is created by combining two or more selected cells. The cell reference for a merged cell is the upper-left cell in the original selected range. Name Box Box at left end of the formula bar that identifies the selected cell, chart item, or drawing object. To name a cell or range, type the name in the Name box and press ENTER. To move to and select a named cell, click its name in the Name box. Operator A sign or symbol that specifies the type of calculation to perform within an expression. There are mathematical, comparison, logical, and reference operators. Page Break Divider that breaks a worksheet into separate pages for printing. Excel inserts automatic page breaks based on the paper size, margin settings, scaling options, and the positions of any manual page breaks that you insert. Page Break Preview Worksheet view that displays the areas to be printed and the locations of page breaks. The area to be printed is displayed in white, automatic page breaks appear as dashed lines, and manual page breaks appear as solid lines. Password A way to protect your worksheet or workbook. Pivot Chart report A chart that provides interactive analysis of data, like a PivotTable report. You can change views of data, see different levels of detail, or reorganize the chart layout by dragging fields and by showing or hiding items in fields. Primary key One or more fields that uniquely identify each record in a table. In the same way that a license plate number identifies a car, the primary key uniquely identifies a record. 114 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Protect To make settings for a worksheet or workbook that prevent users from viewing or gaining access to the specified worksheet or workbook elements. Query In Query or Access, a means of finding the records that answer a particular question you ask about the data stored in a database. Range Two or more cells on a sheet. The cells in a range can be adjacent or nonadjacent. Read-Only A setting that allows a file to be read or copied but not changed or saved. Record A collection of information about a particular person, place, event, or thing. When Query displays a result set in the Data pane, a record is represented as a row. Scenario A named set of input values that you can substitute in a worksheet model. Scroll lock With scroll lock turned on, the arrow keys scroll the active sheet rather than make a different cell active. To turn scroll lock off or on, press the SCROLL LOCK key. Section Any combination of a worksheet, view, and scenario that you choose when you create a report. A report can contain several sections. Select To highlight a cell or range of cells on a worksheet. The selected cells will be affected by the next command or action. Text Box A rectangular object on a worksheet or chart, in which you can type text. Value The text, date, number, or logical input that completes a condition that a field must meet for searching or filtering. View A set of display and print settings that you can name and apply to a workbook. You can create more than one view of the same workbook without saving separate copies of the workbook. Work Book A spreadsheet program file that you create in Excel. A workbook contains worksheets of rows and columns in which you can enter and calculate data.

115

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Work Sheet The primary document that you use in Excel to store and work with data. Also called a spreadsheet. A worksheet consists of cells that are organized into columns and rows; a worksheet is always stored in a workbook. Workspace File A file that saves display information about open workbooks, so that you can later resume work with the same window sizes, print areas, screen magnification, and display settings. A workspace file doesn't contain the workbooks themselves. Argument Arguments are parts of a formula that are used to produce the resulting calculation. In this lesson, the arguments are logical test, value if true, and value if false. Arithmetic Operators Arithmetic operators are the symbols used in formulas to calculate values, such as addition (+), subtraction (-), multiplication (*), division (/), and exponentiation (^). AutoCorrect AutoCorrect is an Excel feature that automatically corrects a variety of commonly misspelled words. It also lets you create "shorthand" entries that automatically fill in frequently used text when only a few letters are typed. Book# When you create a new workbook, the workbook name appears as "Book#" on the title bar. The "#" stands for the number of the workbook. Excel uses this as the workbook's temporary name until you save and name it. Cell Address A cell address is the location of a cell on a worksheet and is defined by the column letter and the row number. For example, cell A1 is where column A and row 1 intersect. Cell References A cell reference, or cell address, identifies a particular cell, such as cell B5. Cell references are used in formulas to indicate where a value is stored. Charts Charts are graphic presentations of data from a worksheet. Clickanddrag To click-and-drag, hold the mouse steady, press the left mouse button, and keep it down while you move the mouse on the mouse pad. Close Use the Close command when you want to complete your work on a file and put it away without leaving Excel.

116

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Comparison Operators Comparison operators are symbols used to specify criteria in searches and in formulas. The most common operators are, Equals, Greater than, Less than, Greater than or equal to, Less than or equal to, Not equal to. Conditional Formatting Conditional Formatting formats cells based on their contents. You can format up to three conditions per cell. Default A default setting is the software manufacturer's preset option for a particular command or function. Default settings can be changed. Dialog Box A dialog box presents a way to give or receive information. Document A document is any file that can be produced by an application and reopened, modified, saved, and closed. Font A font is a style and size of type, such as Times New Roman, 12 point, bold. Font Styles A font looks different depending on the style that is applied: bold, italic, or underlined. Formatting Formatting is the attributes of a cell that affect its appearance. Cell formatting does not affect its contents, only its on-screen appearance. Freeze Panes Command The Freeze Panes command splits the screen into panes, or windows. Goal Seek Goal Seek adjusts the value of a specific cell until a formula that includes that cell reaches the result you want. Gridlines Gridlines are lines on a chart that can make critical data comparisons easier. Some charts, such as a 3-D pie chart, don't need gridlines. Label A label is any cell entry other than a numeric value or a formula. A text entry in a cell is called a label. A range of values will often have a label to identify it. Margins Margins are the areas that border the printed portion of the page along the top, sides, and bottom. Pivot Table PivotTables are interactive worksheet tables that allow you to summarize data with great flexibility. Their row and column headings can be adjusted to get different looks at original data. 117 Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Pop-up Window When you click a dotted-line hot spot, a separate window "pops up" on your screen. When you are done reading the information in the pop-up window, you can click anywhere to close it. Record A record is a series of fields in a database that pertains to one item in the list, such as a customer or an order. In Excel, records appear in rows. Rows Rows are the horizontal divisions of a worksheet that are identified by numbers. Status Bar The status bar is located at the bottom of the screen and provides information about the particular operation in progress. The right side of the status bar contains information regarding CAPS LOCK, NUM LOCK, and Auto Calculate. Syntax The syntax of the function refers to the order of the functions arguments. In some functions, the order of the arguments determines how Excel solves the function. Title Bar The title bar shows you the name of the current workbook and contains the standard Windows control buttons. Toolbars Toolbars contain buttons, menus, or combinations of both that can be used to quickly perform actions in Excel. Wrap Text Wrap Text is a cell formatting option that forces text to break into lines within a cell.

118

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

SOME IMPORTANT SHORT CUT KEYS OF MS EXCEL 2007


CTRL COMBINATIONS IN EXCEL 2007 Ctrl + shift + ( Ctrl + shift + ) Ctrl + shift + & Ctrl + shift + _ Ctrl + shift + ~ Ctrl + shift + $ Ctrl + shift + % Ctrl + shift + ^ Ctrl + shift + # Ctrl + shift + @ Ctrl + shift + ! Ctrl + shift + * Ctrl + shift + : Ctrl + shift + " Ctrl + shift + + Ctrl + Ctrl + ; Ctrl + ` Ctrl + ' Ctrl + 1 Ctrl + 2 Ctrl + 3 Ctrl + 4 Ctrl + 5 Ctrl + 6 Ctrl + 8 Ctrl + 9 Ctrl + 0 119 Unhide any hidden rows within the selection. Unhide any hidden columns within the selection. Applies the outline border to the selected cells. Removes the outline border from the selected cells. Applies the General number format. Applies the Currency format with two decimal places (negative numbers in parentheses). Applies the Percentage format with no decimal places. Applies the Exponential number format with two decimal places. Applies the Date format with the day, month, and year. Applies the Time format with the hour and minute, and AM or PM. Applies the Number format with two decimal places, thousands separator, and minus sign (-) for negative values. Selects the current region around the active cell (the data area enclosed by blank rows and blank columns). In a PivotTable, it selects the entire PivotTable report. Enters the current time. Copies the value from the cell above the active cell into the cell or the Formula Bar. Displays the Insert dialog box to insert blank cells. Displays the Delete dialog box to delete the selected cells. Enters the current date. Alternates between displaying cell values and displaying formulas in the worksheet. Copies a formula from the cell above the active cell into the cell or the Formula Bar. Displays the Format Cells dialog box. Applies or removes bold formatting. Applies or removes italic formatting. Applies or removes underlining. Applies or removes strikethrough. Alternates between hiding objects, displaying objects, and displaying placeholders for objects. Displays or hides the outline symbols. Hides the selected rows. Hides the selected columns. Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

Ctrl + A Ctrl + B Ctrl + C Ctrl + C Ctrl + D Ctrl + F Ctrl + shift + F Ctrl + G Ctrl + H Ctrl + I Ctrl + K Ctrl + N Ctrl + O Ctrl + shift + O Ctrl + P Ctrl + shift + P Ctrl + R Ctrl + S Ctrl + T Ctrl + U Ctrl + shift + U Ctrl + V Ctrl + Alt + V Ctrl + W Ctrl + X Ctrl + Y Ctrl + Z

Selects the entire worksheet. If the worksheet contains data, CTRL+A selects the current region. Pressing CTRL+A a second time selects the current region and its summary rows. Pressing CTRL+A a third time selects the entire worksheet. Applies or removes bold formatting. Copies the selected cells. Followed by another CTRL+C displays the Clipboard. Uses the Fill Down command to copy the contents and format of the topmost cell of a selected range into the cells below. Displays the Find and Replace dialog box, with the Find tab selected. Opens the Format Cells dialog box with the Font tab selected. Displays the Go To dialog box. Displays the Find and Replace dialog box, with the Replace tab selected. Applies or removes italic formatting. Displays the Insert Hyperlink dialog box for new hyperlinks or the Edit Hyperlink dialog box for selected existing hyperlinks. Creates a new, blank workbook. Displays the Open dialog box to open or find a file. Selects all cells that contain comments. Displays the Print dialog box. Opens the Format Cells dialog box with the Font tab selected. Uses the Fill Right command to copy the contents and format of the leftmost cell of a selected range into the cells to the right. Saves the active file with its current file name, location, and file format. Displays the Create Table dialog box. Applies or removes underlining. Switches between expanding and collapsing of the formula bar. Inserts the contents of the Clipboard at the insertion point. Displays the Paste Special dialog box. Closes the selected workbook window. Cuts the selected cells. Repeats the last command or action, if possible. Uses the Undo command to reverse the last command or to delete the last entry that you typed.

120

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S

[BASIC TO ADVANCE MICROSOFT EXCEL]

NAVIGATING IN WORKSHEETS AND SELECTING CELLS Ctrl + Shift + + Arrow left, Arrow Right , Arrow up, Arrow down Ctrl + Arrow keys Shift + Arrow keys Ctrl + Shift + Arrow Backspace Delete End Ctrl + End Ctrl + Shift + End in worksheet Insert a new row or column (after the current row is selected with shift + space, or Column is selected with Ctrl + Space Move one cell up, down, left, or right in a worksheet. Moves to the edge of the current data region Extends the selection of cells by one cell. Extends the selection of cells to the last nonblank cell in the same column or row Deletes one character to the left in the Formula Bar. Also clears the content of the active cell. Removes the cell contents (data and formulas) from selected cells without affecting cell formats or comments. Moves to the cell in the lower-right corner of the window when SCROLL LOCK is turned on. Moves to the last cell on a worksheet.

Extends the selection of cells to the last used cell on the worksheet (lower-right corner). Selects all text in the formula bar from the cursor position to the Ctrl + Shift + End in Formula Bar endthis does not affect the height of the formula bar. Enter Shift + Enter Ctrl + Enter Alt + Enter Esc Home Ctrl + Home Ctrl + shift + home Page down Alt + page down Ctrl + page down Ctrl+shift+pagedown Page up Alt + page up Ctrl + page up Ctrl + shift +page up 121 Completes a cell entry and selects the cell below Completes a cell entry and selects the cell above. Completes a cell entry and stays in the same cell Starts a new line in the same cell Cancels an entry in the cell or Formula Bar. Closes an open menu or submenu, dialog box, or message window. Moves to the beginning of a row in a worksheet. Moves to the cell in the upper-left corner of the window when scroll lock is turned on. Moves to the beginning of a worksheet. Extends the selection of cells to the beginning of the worksheet Moves one screen down in a worksheet. Moves one screen to the right in a worksheet. Moves to the next sheet in a workbook. Selects the current and next sheet in a workbook Moves one screen up in a worksheet. Moves one screen to the left in a worksheet. Moves to the previous sheet in a workbook. Selects the current and previous sheet in a workbook HELLO:= 0333-7061644

Prepared By: MANZOOR ALI SOLANGI

M S
Spacebar Ctrl + Spacebar Shift + Spacebar Ctrl + shift + Space Tab Shift + Tab Ctrl + Tab Ctrl + Shift + Tab

[BASIC TO ADVANCE MICROSOFT EXCEL]


In a dialog box, performs the action for the selected button, or selects or clears a check box. Selects an entire column in a worksheet. Selects an entire row in a worksheet. Selects the entire worksheet. Moves one cell to the right in a worksheet. Moves to the previous cell in a worksheet or the previous option in a dialog box. Switches to the next tab in dialog box Switches to the previous tab in a dialog box.

FORMAT CELLS Ctrl + 1 Ctrl + B (or ctrl+2) Ctrl + I (or ctrl+3) Ctrl + U (or ctrl+4) Ctrl + 5 Ctrl + Shift + & Ctrl + shift +_ (underscore) Ctrl + Shift + F Alt + ' (apostrophe / single quote) Format cells dialog. Apply or remove bold formatting. Apply or remove italic formatting. Apply or remove an underline. Apply or remove strikethrough formatting. Apply the outline border. Remove outline borders. Display the Format Cells with Fonts Tab active. Display the Style dialog box.

FUNCTIONAL KEYS IN EXCEL 2007 F1 Ctrl + F1 Alt + F1 Alt + Shift + F1 F2 Shift + F2 Ctrl + F2 F3 Ctrl + F3 122 Displays the Microsoft Office Excel Help task pane. Displays or hides the Ribbon. Creates a chart of the data in the current range. Inserts a new worksheet. Edits the active cell. Adds or edits a cell comment. Displays the Print Preview window. Displays the Paste Name dialog box. Display the Name Manager, create new names. Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Shift + F3 F4 Ctrl + F4 F5 Ctrl + F5 F6 Shift + F6 Ctrl + F6 F7 F8 Ctrl + F8 Alt + F8 F9 Shift + F9 Ctrl + Alt + F9 Ctrl + F9 F10 Shift + F10 Alt + shift + F10 Ctrl + F10 F11 Shift + F11 Alt + F11 F12

[BASIC TO ADVANCE MICROSOFT EXCEL]

Displays the Insert Function dialog box. Repeats the last command or action, if possible. Closes the selected workbook window. Displays the Go To dialog box. Restores the window size of the selected workbook window. Switches between the worksheet, Ribbon, task pane & Zoom controls. Switches between the worksheet, Zoom controls, task pane & Ribbon. Switches to the next workbook window when more than one workbook window is open. Displays the Spelling dialog box to check spelling. Extended Selection appears in the status line, and the arrow keys extend the selection. Performs the Size command (on the Control menu for the workbook window) when a workbook is not maximized. Displays the Macro dialog box to create, run, edit, or delete a macro. Calculates all worksheets in all open workbooks. Calculates the active worksheet. Calculates all worksheets in all open workbooks, regardless of whether they have changed since the last calculation. Minimizes a workbook window to an icon. Turns key tips on or off. Displays the shortcut menu for a selected item. Displays the menu or message for a smart tag. If more than one smart tag is present, it switches to the next smart tag and displays its menu or message. Maximizes or restores the selected workbook window. Creates a chart of the data in the current range. Inserts a new worksheet. Opens the Microsoft Visual Basic Editor, in which you can create a macro by using Visual Basic for Applications (VBA). Displays the Save As dialog box.

SMART-ART GRAPHICS: WORK WITH SHAPES Tab Shift + tab Ctrl + A 123 Select the next element in a Smart Art graphic. Select the previous element in a Smart Art graphic. Select all shapes. Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Esc Arrow up Arrow down Arrow left Arrow Right Enter or F2 Delete or Backspace Ctrl + X or Shift + Delete Ctrl + C Ctrl + V Ctrl + Z Shift + Arrow right Shift + Arrow left Shift + Arrow up Shift + Arrow down Alt + Arrow right Alt + Arrow left

[BASIC TO ADVANCE MICROSOFT EXCEL]

Remove focus from the selected shape. Nudge the selected shape up. Nudge the selected shape down. Nudge the selected shape left. Nudge the selected shape right. Edit text in the selected shape. Delete the selected shape. Cut the selected shape. Copy the selected shape. Paste the contents of the Clipboard. Undo the last action. Enlarge the selected shape horizontally. Add ctrl for moving pixel-by-pixel. Reduce the selected shape horizontally. Add ctrl for moving pixel-by-pixel. Enlarge the selected shape vertically. Add ctrl for moving pixel-by-pixel. Reduce the selected shape vertically. Add ctrl for moving pixel-by-pixel. Rotate the selected shape to the right. Add ctrl for moving pixel-by-pixel. Rotate the selected shape to the left. Add ctrl for moving pixel-by-pixel.

SMART-ART GRAPHICS : WORK WITH TEXT Arrow left Arrow Right Arrow up Arrow down Ctrl + Arrow left Ctrl + Arrow right Ctrl + Arrow up Ctrl + Arrow down End Home Ctrl + End Ctrl + Home Ctrl + X 124 Move one character to the left. Move one character to the right. Move up one line. Move down one line. Move one word to the left. Move one word to the right. Move one paragraph up. Move one paragraph down. Move to the end of a line. Move to the beginning of a line. Move to the end of a text box. Move to the beginning of a text box. Cut selected text. Prepared By: MANZOOR ALI SOLANGI HELLO:= 0333-7061644

M S
Ctrl + C Ctrl + V Ctrl + Z Backspace Ctrl + Backspace Delete Ctrl + Delete Alt + Shift + Arrow right Alt + shift + Arrow left

[BASIC TO ADVANCE MICROSOFT EXCEL]

Copy selected text. Paste selected text. Undo the last action. Delete one character to the left. Delete one word to the left. Delete one character to the right. Delete one word to the right. Promote the selected text. Demote the selected text.

MICROSOFT CLIP ORGANIZER MAIN Ctrl + Arrow left or Ctrl + Arrow Right Alt + C Alt + S Alt + H Arrow keys Ctrl + A Ctrl + C Ctrl + V Delete Home End Shift + F10 Esc Tab and Shift + Tab Alt + Spacebar Move forward or backward one word in the Search text box. Displays the Collection List task pane. Displays the Search task pane. Open Help. Move left and right, up and down, among collections or clips. Select all clips on the current page. Copy (select a clip and move it to the clipboard). Paste (paste from the clipboard to Clip Organizer). Delete selected clip or category. Move to the beginning of a row and select the first item. Move to the end of a row and select the last item. Display a shortcut menu for a collection, clip, or link (same as right click). Exit a dialog box. Shift focus forward and backward between different areas of a dialog box. Open the shortcut menu of a dialog box. WORK WITH THE EXCEL RIBBON Alt or F10 Alt or F10 to Select the Active Tab, and then Arrow left or Arrow right 125 Select the active tab of the Ribbon and activate the access keys. Move to another tab of the Ribbon.

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

M S
Ctrl + F1 Shift + F10 Alt or F10 and then Tab, Shift+ Tab Arrow Down, Arrow up, Arrow Left, or Arrow Right Spacebar or Enter Spacebar or Enter Enter F1

[BASIC TO ADVANCE MICROSOFT EXCEL]

Minimize or restore the Ribbon. Display the shortcut menu for the selected command. Move the focus to each command in the Ribbon, forward or backward. Move down, up, left, or right among the items in the Ribbon. Activate the selected command or control in the Ribbon. Open the selected menu or gallery in the Ribbon. Activate a command or control in the Ribbon. Get help on the selected command or control in the Ribbon.

126

Prepared By: MANZOOR ALI SOLANGI

HELLO:= 0333-7061644

Vous aimerez peut-être aussi