You are on page 1of 27

1. How to Customize "division by 0" Error Messages?

Working in a complex worksheet, you may have encountered that annoying "#DIV/0!" error when the divisor of your formula is a zero. Using the IF function, you can create your own message for display when you divide by zero. The IF function will be like this: =IF (DIVISOR = 0,"Your Desired Text", DIVIDED/DIVISOR) The IF function evaluates the first parameter (DIVISOR = 0). If it's TRUE, it displays the second parameter ("Your Desired Text") in the cell. If it's FALSE, the function displays the third parameter (DIVIDED/DIVISOR) in the cell.

2. Transpose data from a row to a column, or vice-versa


Here's a tip that eliminates the need to rekey data. Suppose you've entered your data with three column headings running across Row 1 and three row headings running down Column A, like the ones shown in Figure P. Figure P

We'll use this sample data to demonstrate how easily you can transpose the layout of your data.

After working with the data for a while, you decide you'd rather have the current set of row labels (months) running across the columns. Whatever you do, don't even think about rekeying the data.

You'll find the best solution under the Paste Special menu. Start by selecting and copying your entire data range. Click on a new location in your sheet, then go to Edit | Paste Special and select the Transpose check box, as shown in Figure Q. Click OK, and Excel will transpose the column and row labels and data, as shown in Figure R. Figure Q

The Transpose option lets you rearrange your data with just a few clicks.

Figure R

Here's what our data looks like after we copied and pasted our data using the Paste Special | Transpose option.

Note
You aren't limited to using the Paste Special | Transpose option to rearrange multiple rows and columns of data. It works just as well when you need to turn a single row of labels into a column, or vice-versa.

3. Repeat rows on top when printing, show table headers on every page

When you are on the sheet view, just hit menu > file > page setup, go to the last tab, specify rows to repeat. You can repeat columns while printing as well from the same menu.

4. Find total working days between any two dates, including holidays

If you work on project plans, gantt charts alot, this can be totally handy. Just type =networkdays(start date, end date, list of holidays) to fetch the number of working days. In the above sample you can see the number of working days between New years day and September first of this year (labor day).

5. Headings as Range Names


Highlight your range including the headings and go to Insert>Name>Create or push Ctrl+Shift+F3.

6. Named Formula
To make a Name refer to a constant formula e.g. "TaxRate", go to Insert>Name>Define and type TaxRate in the "Names in Workbook" box and 36% in the "Refers To". Now enter =(10*TaxRate) anywhere on the Worksheet.

7. Nested Formulas
To help write nested formulas (more than 1 formula in a single cell) use the "Paste Function" i.e. Insert>Function or Shift+F3. Select the function that you need, enter the reference, number or text then select the drop arrow to the left of the formula bar to add more Formulas. Doing it this way ensures all your parentheses are in the correct places.

8. Remove Blank Rows


Highlight your range and go to Edit>Go to>Special and select "Blanks" then "Ok" now go to Edit>Delete or Ctrl+Shift+= (equal) and then select "Entire row" from the "Delete" dialog and click "Ok".

9. Sort Out Blank Rows


The quickest way to remove all blank rows is to select you range then go to Data>Sort.

10. See Formula cells


If you have a sheet full of formulas and you want to identify these cells at a glance go to Edit>Go to>Special and select "Formulas" then click "OK". Now go to Format>Cells or Ctrl+1 and select the "Patterns" tab and choose a color.

11. Shade Alternate Rows


Looking for a way to simulate that nerdy green-banded computer paper on screen? Look no further. Excel's Conditional Formatting feature has many uses, and here's one that's particularly handy. Conditional Formatting makes it simple to apply cell shading (green or otherwise) to every other row in a worksheet range. For a lengthy list, shading alternate rows can improve legibility. Here's how to do it: 1. Highlight the range of cells or rows or columns that you want to format. 2. Choose Format, Conditional Formatting to display the Conditional Formatting dialog box. 3. Select Formula Is from the first drop-down list box, and enter =MOD(ROW(),2)=0 in the second box. 4. Click the Format button to bring up the Format Cells dialog box. 5. Select the Patterns tab and specify a color for the shaded rows. You'll probably want to choose a light color, so that the default black text will still be legible. Or, you can go all out and change the text color as well (do this in the Font tab of the Format Cells dialog box). For example, you might select a dark blue background, accompanied by a mellow yellow text color. 6. Click OK twice to return to your worksheet.

12. Trick number one is highlighting duplicate entries in a column. Here is what you do:
1. Go to the first cell in the column you want to search for duplicates and pull up the conditional formatting menu 2. Change the pull-down box to Formula Is 3. Use the following formula:
=COUNTIF($A$1:$A$20, A2)>1

4. Pick appropriate formatting then grab the format painter thingy and drag it all over the other columns in range A1 to A20 (or whatever range you want)
13. Common situations. To get the first name of a person, To calculate mortgage payments To get nth largest number in a range To get nth smallest number in a range To generate a random phone number To count positive values in a range To remove unnecessary spaces Format a number as SSN using formulas To find age of a person based on DOB To get proper fraction from a number Counts number of cells with numbers in them Counts number of cells with anything in them Show values after decimal point only when number is less than one =left(name,find( ,name)-1) =PMT(interest-rate,number-of-payments,how-much-loan) =large(range,n) = small(range,n) =randbetween(1000000000,9999999999) =countif(range,>0) =trim(text) =text(ssn-text,000-00-0000) =TEXT((NOW()-birth_date)&",yy years" m months" dd days") =text(fraction, ?/?) =COUNT() =COUNTA()

13. Some Macros


13.1. Hide Empty Rows. This macro assumes: (1) Your range always starts in A2. (2) Your range columns are from A thru D. (3) You would only want to hide rows where no data exists in any of the 4 possible cells (columns A thru D in this example) on a given row. (4) The last row that contains data will always be populated in column A.

Sub HideRows() Application.ScreenUpdating = False Dim i As Integer Dim RStart As Range Dim REnd As Range Set RStart = Range("A2") Set REnd = Sheets("YourSheetName").Range("A65536").End(xlUp).Offset(0, 3) Range(RStart, REnd).Select On Error Resume Next With Selection .EntireRow.Hidden = False For i = 1 To .Rows.Count If WorksheetFunction.CountBlank(.Rows(i)) = 4 Then .Rows(i).EntireRow.Hidden = True End If Next i End With Set RStart = Nothing Set REnd = Nothing Range("A1").Select Application.ScreenUpdating = True End Sub

14. Hide Errors


You can use Excel conditional formatting to check for errors, and change the font colour to match the cell colour. In this example, if column B contains a zero, the #DIV/0! error is displayed in column C. 1. Select cells C2:C5 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, enter a formula that refers to the active cell in the selection: =ISERROR(C2) or, to hide only #N/A errors: =ISNA(C2) 5. Click the Format button. 6. Select a font colour to match the cell colour. 7. Click OK, click OK

15. Hide Duplicate Values


In a table, each row should have all data entered, to enable sorting and filtering. However, you can use Excel conditional formatting to hide the duplicate values, and make the list easier to read. In this example, when the table is sorted by Region, the second (and subsequent) occurences of each region name will have white font colour. In Excel 2003: 1. Select range A2:A5 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, enter =A2=A1 5. Click the Format button. 6. Select a font colour to match the cell colour. 7. Click OK, click OK In Excel 2007: 1. Select range A2:A5 2. On the Ribbon, go to the Home tab and click Conditional Formatting 3. Click New Rule 4. Click Use a Formula to Determine Which Cells to Format 5. For the formula, enter =A2=A1 6. Click the Format button. 7. Select a font colour to match the cell colour. 8. Click OK, click OK To view the steps for Excel Conditional Formatting in a short video, click here (Excel 2007)

16. Highlight Duplicates

Use Excel conditional formatting to highlight duplicate entries in a column: 1. Select range A2:A11 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, enter =COUNTIF($A$2:$A$11,A 2)>1 5. Click the Format button. 6. Select a font colour for highlighting. 7. Click OK, click OK

17. Highlight Items in a List


Use Excel conditional formatting to highlight items that are in a list on the worksheet.: 1. Create a list of items you want to highlight. If the items are on a different sheet than the conditional formatting, name the list. 2. Select range A2:A7 3. Choose Format|Conditional Formatting 4. From the first dropdown, choose Formula Is 5. For the formula, enter =COUNTIF($C$2:$C$4,A2) or, if the list is named, use the name in the formula: =COUNTIF(CodeList,A2) 6. Click the Format button. 7. Select a font colour for highlighting. 8. Click OK, click OK

10

18. Highlight Lottery Numbers


You can use Excel conditional formatting to highlight the ticket numbers that have been drawn in a lottery. In this example the ticket numbers are in cells B2:G4, and the drawn numbers are entered in cells B6:G6 1. Select cells B2:G4 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, use the CountIf function: =COUNTIF($B$6:$G$6,B2) 5. Click the Format button. 6. Select formatting options (green pattern, in this example), click OK 7. Click OK

19. Highlight Upcoming Expiry Dates


You can use Excel conditional formatting to highlight payments that are due in the next thirty days. In this example, Due dates are entered in cells A2:A4. 1. Select cells A2:A4 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, use the Today function to count the days: =AND(A2-TODAY()>=0,A2TODAY()<=30) 5. Click the Format button. 6. Select formatting options (Bold, Blue font, in this example), click OK 7. Click OK
11

20. Hide Cell Contents When Printing


You can use Excel conditional formatting to hide cells when printing. In this example, the contents of cells B2:F4 are changed to white font, if cell H1 contains an x. To print with the cell contents hidden, type an x in cell H1. To display the cell contents, delete the x in cell H1. 1. Select cells B2:F4 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, enter =$H$1="x" 5. Click the Format button. 6. Select formatting options (white font and white pattern, in this example) 7. Click OK, click OK

21. Shade Alternating Rows


You can use Excel conditional formatting to shade alternating rows on the worksheet. 1. Click the Select All button, above the Row 1 button, to select all the cells on the worksheet. 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, enter =MOD(ROW(),2) 5. Click the Format button. 6. On the Patterns tab, select a colour for shading 7. Click OK, click OK
12

22. Shade Bands of Rows


You can use Excel conditional formatting to shade bands of rows on the worksheet. In this example, 3 rows are shaded light grey, and 3 are left with no shading. In the MOD function, the total number of rows in the set of banded rows (6) is entered. 1. Click the Select All button, above the Row 1 button, to select all the cells on the worksheet. 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, enter =MOD(ROW(),6)<3 5. Click the Format button. 6. On the Patterns tab, select a colour for shading 7. Click OK, click OK

23. Shade Alternating Filtered Rows


You can use Excel conditional formatting to shade alternating rows in a filtered list. 1. Select the cells in the list (A2:B29 in this example). 2. Choose Format|Conditional Formatting 3. From the first dropdown, choose Formula Is 4. For the formula, enter =MOD(SUBTOTAL(3,$A$1:$A2),2) 5. Click the Format button. 6. On the Patterns tab, select a colour for shading 7. Click OK, click OK
13

8. Filter the list, and the shading will alternate in the visible rows.

24. Create Coloured Shapes


You can use Excel conditional formatting and the Wingding font to create coloured shapes in a cell. In this example, coloured shapes will appear in cells C3:C7, depending on the value in the adjacent cell in column B. If the value is less than 10, a red circle will appear, if the value is greater than 30, a green square will appear. Otherwise, a yellow diamond will appear. 1. In cell C3 enter the formula: =IF(B3="","",IF(B3<10,"l",IF(B3>30,"n","t "))) 2. Copy the formula down to cell C7 3. Format cells C3:C7 with Wingding font, and yellow font color 4. Select cells C3:C7 5. Choose Format|Conditional Formatting 6. From the first dropdown, choose Formula Is 7. For the formula, enter: =$B3<10 8. Click the Format button, and select Red as the font colour, then click OK. 9. Click the Add button, and for Condition 2, choose Format|Conditional Formatting 10. From the first dropdown, choose Formula Is 11. For the formula,enter: =$B3>30 12. Click the Format button, and select Green as the font colour, then click OK. 13. Click OK

14

25. Restrict cursor movement to unprotected cells


Q. The formulas in my worksheet use values in several input cells. I've unlocked the input cells and protected the sheet so the user can't change the formulas. Can I set things up so the cell cursor moves only to the input cells? Yes. You've already unlocked your input cells and ensured that all other cells are locked. By default all cells are locked, but you can change that by using the Protection tab of the Format Cells dialog box. Select the cells to be changed and choose Format, Cells. In this case, the input cells are unlocked and all other cells are locked. Protect the worksheet in Excel 97 by using Worksheet, Protect or Tools, Protection, Protect Sheet (you can specify a password to keep others from "unprotecting" the sheet). Once the sheet is protected, press Tab to move the cell pointer to the next unlocked cell. This does not prevent the user from selecting unlocked cells using the cursor keys. To make those cells unselectable, change the worksheet's EnableSelection property. Select View, Toolbars, Control Toolbox to display the Control Toolbox toolbar. Click the Properties button to display the Properties box for the worksheet, then click the cell labeled "xlNoRestrictions" and use the drop-down list to change the EnableSelection property to xlUnlockedCells. Close the Properties box. As long as the worksheet is protected, users cannot select the locked cells on the worksheet. This procedure does not save the EnableSelection property setting with the workbook. To create a simple macro that turns this setting on when the workbook is opened, press Alt-F11 to activate the Visual Basic Editor. Locate your workbook name in the Project window, and double-click it to expand its listing. Then double-click the item labeled ThisWorkbook and enter the following VBA code:
Private Sub Workbook_Open() Worksheets("Sheet1").EnableSelection = xlUnlockedCells End Sub

This macro executes whenever the workbook is opened, and sets the EnableSelection property of Sheet1 to xlUnlockedCells. The technique can be circumvented by changing the EnableSelection property to its default value (xlNoRestrictions). Few users know about this dodge, however.

15

26. Filtering.
Excel Advanced Filter Introduction
1. Excel Advanced Filter--Introduction a) Apply an Excel Advanced Filter b) Filter Unique Records c) Extract Data to Another Worksheet d) Setting up the Criteria Range e) Using Wildcards in Criteria f) Criteria Examples 2. Advanced Filters -- Complex Criteria For Excel 2003 instructions, see Excel 2003 Advanced Filter Introduction

Apply an Excel Advanced Filter


1. Set up the database
1. The first row (A1:D1) has headings. 2. Subsequent rows contain data. 3. There are no blank rows within the database. 4. There is a blank row at the end of the database, and a blank column at the right.

Download zipped Excel advanced filter workbook with sample data and criteria.

16

2. Set up the Criteria Range (optional)


In the criteria range for an Excel advanced filter, you can set the rules for the data that should remain visible after the filter is applied. You can use one criterion, or several.
1. In this example, cells F1:F2 are the criteria range. 2. The heading in F1 exactly matches a heading (D1) in the database. 3. Cell F2 contains the criterion. The > (greater than) operator is used, with the number 500 (no $ sign is included)..

After the Excel advanced filter is applied, orders with a total greater than $500 will remain visible. Other operators include: < less than <= less than or equal to >= greater than or equal to <> not equal to

3. Set up the Extract Range (optional)


If you plan to copy the data to another location, you can specify the columns that you want to extract. If you want to extract ALL columns, you can leave the extract range empty for the Excel advanced filter.
1. Select the cell at the top left of the range for the extracted data. 2. Type the headings for the columns that you want to extract. These must be an exact match for the column headings, in spelling and punctuation. The column order can be different, and any or all of columns can be included.

17

4. Apply the Excel Advanced Filter


1. Select a cell in the database. 2. On the Excel Ribbon's Data tab, click Advanced, to open the Advanced Filter dialog box

3. You can choose to filter the list in place, or copy the results to another location. 4. Excel should automatically detect the list range. If not, you can select the cells on the worksheet. 5. Select the criteria range on the worksheet 6. If you are copying to a new location, select a starting cell for the copy Note: If you copy to another location, all cells below the extract range will be cleared when the Advanced Filter is applied. 7. Click OK

Filter Unique Records


You can use an Excel Advanced Filter to extract a list of unique items in the database. For example, get a list of customers from an order list, or compile a list of products sold. In this example, the unique list is copied to a different location, and the original list in unchanged. Note: The list must contain a heading, or the first item may be duplicated in the results.
1. Select a cell in the database. 2. On the Excel Ribbon's Data tab, click Advanced. 3. In the Advanced Filter dialog box, choose 'Copy to another location'. 18

4. For the List range, select the column(s) from which you want to extract the unique values. 5. Leave the Criteria Range blank. 6. Select a starting cell for the Copy to location. 7. Add a check mark to the Unique records only box. 8. Click OK.

Watch the Video


View the steps described above, in a short video clip. Excel 2007 video

Extract Data to Another Worksheet


If the database is on one sheet, you can extract data to a different sheet, by using an Excel Advanced Filter. In this example, the data is on Sheet1, and will be copied to Sheet2.
1. Go to Sheet2 2. Select a cell in an unused part of the sheet (cell C4 in this example). 3. On the Excel Ribbon's Data tab, click Advanced 4. Choose Copy to another location. 5. Click in the List Range box 6. Select Sheet1, and select the database. 7. (optional) Click in the Criteria range box. 8. Select the criteria range 9. Click in the Copy to box. 10. Select the cell on Sheet2 in which you want the results to start, or select the headings that you have typed on Sheet2. 11. (optional) Check the box for Unique Values Only

19

12. Click OK

Watch the Video


View the steps described above, in a short Excel video tutorial on Excel advanced filter.

Setting up the Excel Advanced Filter Criteria Range


AND vs OR
If a record meets all criteria on one row in the criteria area, it will pass through the Excel advanced filter. In example 1, at right -

1.

the customer must be MegaMart AND the product must be Cookies AND the total must be greater than 500.

Criteria on different rows are joined with an OR operator. In the second example at right -

2.

the customer must be MegaMart OR the product must be Cookies OR the total must be greater than 500.

By using multiple rows, you can combine the AND 3. and OR operators. In the third example at right -

the customer must be MegaMart AND the product must be Cookies OR the product must be Cookies AND the total must be greater than 500.

20

Using Wildcards in Criteria


Use wildcard characters to filter for a text string in a cell.
The * wildcard

The asterisk (*) wildcard character represents any number of characters in that position, including zero characters. In this example, any customer whose name contains "mart" will pass through the Excel advanced filter.
The ? wildcard

The question mark (?) wildcard character represents one characters in that position. In this example any 4letter product that begins with c, and ends with ke, will pass through the Excel advanced filter. Both Coke and Cake are in the filtered results.

21

The ~ wildcard

The tilde (~) wildcard character lets you search for characters that are used as wildcards. In the first example at right, an asterisk is in the criteria cell -Good*Eats -- so any products that begins with Good and ends with Eats, will pass through the Excel advanced filter. To find only the product that is named Good*Eats, use a tilde character in front of the asterisk in the critereia cell. -- Good~*Eats.

Excel Advanced Filter Criteria Examples


Extract Items in a Range

To extract a list of items in a range, you can use two columns for one of the fields. In this example, two columns are used for the Date field. If you enter two criteria on the same row in the criteria range, you create an AND statement. In this example, any records that are extracted must be greater than or equal to the first date AND less than
22

or equal to the second date.

23

Create Two or More Sets of Conditions

If you enter criteria on different rows in the criteria range, you create an OR statement. In this example, extracted records must meet both conditions in row 2 OR both conditions in row 3. In the results, only the records for MegaMart Cookies, or for MiniMart Milk will be in the filter results.
Extract Items with Specific Text

When you use text as criteria with an Excel advanced filter, Excel finds all items that begin For example, if you type "Ice" as a criterion, Excel finds "Ice", "Ice Cream" and "Ice Milk" To extract only the records for Ice, use the following format: ="=Ice"

24

27. Use the Excel Custom Functions of Feet () and LenText to Convert Lengths in Feet and Inches to Decimal Feet and Back.
I have an Excel spreadsheet with a column of lengths in the format of 12' 6 7/8". How can I convert this to decimal feet? I don't want to split the column into two parts. Then, how can I feet and inches in Excel?. The custom function feet() shown below will take a text field in the format that you describe decimal feet. The custom function LenText will convert a decimal number of feet into a text field showin fractional inches to the nearest 1/32". To enter the custom function,

Start the VB editor with alt-F11. Insert>Module. Insert>Procedure. Type feet as the name of the procedure and indicate it is a function. Then, copy the following code:

Public Function feet(LenString As String) Dim FootSign As Integer Dim InchSign As Integer Dim SpaceSign As Integer Dim FracSign As Integer Dim InchString As String Dim Word2 As String ' Copyright 1999, 2005 MrExcel.com LenString = Application.WorksheetFunction.Trim(LenString) 'The find function returns an error when the target is not found 'Resume Next will prevent VBA from halting execution. On Error Resume Next FootSign = Application.WorksheetFunction.Find("'", LenString) If IsEmpty(FootSign) Or FootSign = 0 Then ' There are no feet in this expression feet = 0 FootSign = 0 Else feet = Val(Left(LenString, FootSign - 1)) End If ' Handle the case where the foot sign is the last character If Len(LenString) = FootSign Then Exit Function ' Isolate the inch portion of the string InchString = Application.WorksheetFunction.Trim(Mid(LenString, FootSign + 1))

25

' Strip off the inch sign, if there is one InchSign = Application.WorksheetFunction.Find("""", InchString) If Not IsEmpty(InchSign) Or InchSign = 0 Then InchString = Application.WorksheetFunction.Trim(Left(InchString, InchSign - 1)) End If ' Do we have two words left, or one? SpaceSign = Application.WorksheetFunction.Find(" ", InchString) If IsEmpty(SpaceSign) Or SpaceSign = 0 Then ' There is only one word here. Is it inches or a fraction? FracSign = Application.WorksheetFunction.Find("/", InchString) If IsEmpty(FracSign) Or FracSign = 0 Then 'This word is inches feet = feet + Val(InchString) / 12 Else ' This word is fractional inches feet = feet + (Val(Left(InchString, FracSign - 1)) / Val(Mid(InchString, FracSign + 1))) / 12 End If Else ' There are two words here. First word is inches feet = feet + Val(Left(InchString, SpaceSign - 1)) / 12 ' Second word is fractional inches Word2 = Mid(InchString, SpaceSign + 1) FracSign = Application.WorksheetFunction.Find("/", Word2) If IsEmpty(FracSign) Or FracSign = 0 Then ' Return an error feet = "VALUE!" Else If FracSign = 0 Then feet = "VALUE!" Else feet = feet + (Val(Left(Word2, FracSign - 1)) / Val(Mid(Word2, FracSign + 1))) / 12 End If End If End If End Function

Repeat for the function called LenText. Use this code:


Public Function LenText(FeetIn As Double) ' This function will change a decimal number of feet to the text string ' representation of feet, inches, and fractional inches. ' It will round the fractional inches to the nearest 1/x where x is the denominator. ' Copyright 1999 MrExcel.com Denominator = 32 ' must be 2, 4, 8, 16, 32, 64, 128, etc. NbrFeet = Fix(FeetIn) InchIn = (FeetIn - NbrFeet) * 12 NbrInches = Fix(InchIn) FracIn = (InchIn - NbrInches) * Denominator Numerator = Application.WorksheetFunction.Round(FracIn, 0) If Numerator = 0 Then

26

FracText = "" ElseIf InchIn >= (11 + (31.4999999 / 32)) Then NbrFeet = NbrFeet + 1 NbrInches = 0 FracText = "" ElseIf Numerator = Denominator Then NbrInches = NbrInches + 1 FracText = "" Else Do ' If the numerator is even, divide both numerator and divisor by 2 If Numerator = Application.WorksheetFunction.Even(Numerator) Then Numerator = Numerator / 2 Denominator = Denominator / 2 Else FracText = " " & Numerator & "/" & Denominator Exit Do End If Loop End If LenText = NbrFeet & "' " & NbrInches & FracText & """" End Function

Column A shows the original text. Column B correctly converts to feet any values that contain feet, inches, and / or fractional inches. Note that if you do not include the foot sign, the value is assumed to be inches. (row 12). If the fractional portion of the inches is not valid, Value! is returned (row 13). Note: Thanks to Dale Richmond from Kansas City who provided an update in October 2007 to prevent an answer of 1 foot 12 inches when a number greater than 1.999 is passed to the function.

27

You might also like