You are on page 1of 4

STRING THEM TOGETHER Well begin with CONCATENATE. The word means to connect or link in a series.

Say you have a spreadsheet listing a companys employees, with first names in one cell, last names in an adjacent cell and titles in a third, as in:

ut your report needs all that information tucked into a single cell, with a hyphen inserted between each persons title and name, such as CEO-Rose Smith. To create it, place the following formula in the cell where you want the answer displayed !"#$: =CONCATENATE(D2,"-",B2," ",C2). The formula tells "%cel to place the information in this order: &# first, then a hyphen, then #, a space and finally '#. (dded characters !hyphen, space$ are enclosed in double )uotes and elements are separated by commas. The result resembles e%hibit * below. Exhibit 1

KEEP IT RIGHT The +,-.T function is used to e%tract selected characters from a cell. /or our e%ample well use a '0( preparing a fi%ed1asset report for a batch of laptops. (ll the necessary data are embedded in codes, a variation of which looks like this: NY LAPTOP 2003. The first two letters !NY$ show the location of the asset, the ne%t si% (LAPTOP$ describe the asset and the final four !2003$ show its year of purchase. "%hibit #, below, shows what one code in a spreadsheet looks like. Exhibit 2

Well begin by e%tracting the year of purchase. Since the year is embedded in the right end of the code, well use the R !"T function, and write a formula in the cell where we want the answer to appear !'#$. The formula =R !"T(B2,#) tells "%cel to e%tract four characters !#223$ from the right side of cell #, creating a spreadsheet that resembles e%hibit 3, below.

Exhibit 3

To e%tract the computer location !NY$ from the leftmost side of the code, well use the LE$T function and write this formula into cell "#: =LE$T(B2,2). (gain, the formula tells "%cel to look into cell # and e%tract the first two characters !NY$. The result will look like e%hibit 4, below. Exhibit 4

To e%tract the identity of the asset !LAPTOP$ thats embedded in the middle of the code, well use the % D function. ut sometimes just saying its in the middle of the code is not enough information for "%cel. So we add further hints, such as this: The target code contains si% characters and begins with the fourth character in the code. 0utting all those hints together, we get this formula:

The target begins with the fourth character !5$ and is si% characters long. The result will resemble e%hibit 6, below. Exhibit 5

ROUND IT OFF Sometimes its more important to present information in ways that make data easy to grasp and retain than to give all the e%acting detail. ,f a report is crowded with large numbers, its often wise to round them off. /or e%ample, our raw data show '"7 Smith earns 8463,6#6.92 a year, but we want our report to show all salaries in thousands. So well create a single formula that divides the number by *,222 and rounds it off !RO&ND$ to the ne%t highest digit. We write the RO&ND formula in the cell where we want the answer to appear !'#$, tell "%cel that the source data are in cell #, divide # by *,222 and then round it to the *2th place !one place to the right of the decimal point$: =RO&ND(B2'(000,(). The spreadsheet should look like e%hibit :, below. Exhibit 6

,f you wanted to round to the nearest whole number !that is, make cell # round to 464$, use this formula: =RO&ND(B2'(000,0). The spreadsheet now resembles e%hibit 9, below. Exhibit 7

"%cel will apply standard rounding rules: ;umbers 2 to 4 will round down< numbers 6 to = will round up. The format of the +7>;& function is: =RO&ND()*m+e, to +e ,o*)-e-, )*m+e, o. /012es to ,o*)- the )*m+e, to). The data in the cell to be rounded can be a number or a formula. The number of places to round to can be positive, negative or ?ero. ( positive number rounds to the right of the decimal< a negative number rounds to the left< and ?ero rounds to the nearest whole number.

Caveat: 'alculations performed with +7>;& may produce slightly different results from calculations performed with numbers formatted to a specified number of digits !see @Aaintain (ccuracy in "%cel,B below$. TRIM IT TO SIZE When you type te%t into a cell, inappropriate spaces sometimes are left between words. Cou can go into each cell and eliminate them or recruit the TR % function with this formula, where the original te%t is in (#: =TRIM( 2! The TR % function commands "%cel to leave only one character space between words !see e%hibit D, below$. Exhibit "

#OUNT THE #H R #TERS Some cells limit the number of characters you can put in them, so sometimes you need to know the number of characters in a long data string. This handy "%cel formula does that for you: =LEN(B2) !as shown in e%hibit =, below$. Exhibit $

With these few simple formulas, "%cel can e%tract information or reformat data so the spreadsheet can read them.

You might also like