10
10
10
FIGURE 10.9
2. Sort the data by category to ensure that the line items are grouped together by that
column. This is accomplished using the DATA/SORT & FILTER/Sort menu item.
Make sure that My data has headers is selected and pick the Category column
name for the Sort by eld.
3. Engage the subtotaling facility via the DATA/OUTLINE/Subtotal menu choice,
and the dialog box in Figure 10.11 will appear.
4. Change the At each change in: drop-down value to be Category, and check the box
for Number on Hand in the Add Subtotal to: window. Both Number on Hand and
Ext. Cost should be checked for subtotals.
5. Click OK to see the result in Figure 10.12. Notice that Excel has inserted subtotal
lines for each category and has provided a subtotal of items on hand in that cat-
egory as well as the values of those items. In addition, a Grand Total is provided at
the bottom of the sheet.
6. Note that there are three columns numbered 1, 2, and 3 to the left of the row
numbers of the worksheet. These designate the levels of information in the data
set. Clicking on the number three shows all details of the data set. Clicking on the
number two will show just the subtotals and the Grand Total, and clicking on the
number one will show only the Grand Total. Figure 10.13 shows the result of click-
ing on the number two.
206 What Every Engineer Should Know About Excel
FIGURE 10.10
FIGURE 10.11
Data Management Resources in Excel 207
FIGURE 10.12
FIGURE 10.13
TABLE 10.1
Useful Data Processing and Manipulation Functions
Function Description
CONCATENATE(), Used to create one string of characters from several individual strings. CONCAT() is
CONCAT() only available in Of ce 365. Resultant string is limited to 32,767 characters
FIND() Used to nd a string within a string and return the position at which that substring
begins. This function is case-sensitive
LEFT() Used to grab and return the leftmost characters of a string value. The number of
characters is speci ed as an argument to the function
LEN() Used to return the length of a string value
LOWER() Used to convert a value to all lowercase characters
MID() Used to return the middle of a string value given a starting and ending character
position
REPLACE() Used to replace one string with another within a target string
RIGHT() Used to grab and return the rightmost characters of a string value. The number of
characters is speci ed as an argument to the function
SEARCH() Used to nd a string within a string and return the position at which that substring
begins. Unlike the FIND() function, this function is NOT case-sensitive
TEXT() Used to convert a numeric value to a text value
TRIM() Used to trim extraneous spaces from a string value except for single spaces between
words
UPPER() Used to convert a value to all uppercase characters
VALUE() Used to convert a string of numbers from a text value to a numeric value
VLOOKUP() Used to look up a value in a row of data given a matching value in the rst element of
the row. Similar to HLOOKUP() except that HLOOKUP() operates on columns rather
than rows
– The ID eld is intended to be the rst three letters of the last name with the
index appended to it.
– The Full Name is intended to be the piecing together of the First Name, Middle
Initial, and Last Name with appropriate spacing.
– The Simple Zip is intended to be the rst ve characters of the Zip+4 eld.
– The Plus 4 is intended to be the last four characters of the Zip+4 eld.
– The Area Code is intended to be the rst three characters of the Telephone eld.
FIGURE 10.14
Data Management Resources in Excel 209
FIGURE 10.15
FIGURE 10.16
The worksheet in Figure 10.14 is put into formula display mode, which you will recall
from previous chapters is accomplished via the CTRL+` key sequence. Using several
of the functions from Table 10.1, Figure 10.15 shows how these functions can be used
in the open columns of data to accomplish the intentions noted above. Figure 10.16
shows the nal results by switching back to displaying values from formulas using the
CTRL+` toggle key sequence.
The reader is left to add a column for cleaning up the middle initials, making them
uppercase, and copying and pasting them back into the proper place. Observe how the
Full Name changes when this cleanup is complete.
FIGURE 10.17