Date: Wed, 7 Mar 2007 18:44:14 -0600 (CST) From: Mark Jacobson To: 810-021-01-spring@uni.edu Subject: Excel March 7th class review... Hi 021 students, In today's class we covered the following five Excel functions: LEFT(), MID(), RIGHT(), FIND() and CONCATENATE() Examples: =LEFT("Spring break", 3) would display Spr in the cell --- --- =LEFT(A2, 1) would display the leftmost 1 character, i.e. the 1st character, of whatever was stored in spreadsheet cell A2. =LEFT(some string, how many characters you want) =MID("Spring break", 3, 4) would return or display ring ---- ---- =MID(B2, 6, 3) would display bus if Ghostbusters was stored in cell B2 --- --- =MID(string data, where to start in string, how many characters) is the format of the MID() function... =FIND(what to find, where to look for it) is the simple version of the FIND function we used. =FIND(" ", "Jimi Hendrix") would return 5 as the position of the space. =FIND(" ", "Cinderella Smith") would return 11 as the location 1234567890123 of the space. =MID("Charles Babbage", FIND(" ", "Charles Babbage") + 1, 1) would become: =MID("Charles Babbage", 8 + 1, 1) and would then become =MID("Charles Babbage", 9, 1) and finally would display or return B, which is the last name first letter, the last name initial for Charles Babbage. - Finally, the CONCATENATE() function. =CONCATENATE( LEFT("John Atanasoff", 1), ".", "A", ".") would - - - - display J.A. If cell A2 contained the string Charles Babbage, the following formula would return or display what? =CONCATENATE( LEFT(A2, 1), ".", MID(A2, FIND(" ", A2) + 1, 1), "." ) You are correct! C.B. would be the displayed result. =CONCATENATE( LEFT(A2, 1), ".", MID(A2, FIND(" ", A2) + 1, 1), "." ) -- ----------------- - becomes =CONCATENATE( LEFT(A2, 1), ".", MID(A2, 8 + 1, 1), "." ) -- ----- - becomes =CONCATENATE( LEFT(A2, 1), ".", MID(A2, 9, 1), "." ) -- - - becomes =CONCATENATE( "C" , "." , "B" , "." ) - - - - becomes "C.B." and thus C.B. is dispalyed. ---- ---- Right at the end of class we covered the RIGHT() function, right? =RIGHT("Panthers", 4) would return hers since hers is the rightmost 4 character of Panthers. ---- =RIGHT("GHOSTBUSTERS", 1) would return the very last letter of GHOSTBUSTERS. - What would =LEFT( RIGHT("Panthers", 7), 3) return or display??? ant would be the result. =LEFT( RIGHT("Panthers", 7), 3) goes to =LEFT( "anthers", 3) and that goes to --- ant which is the final result. --- See you on Friday in the Wright 112 lab. If I don't see you then, have a good spring break. If I do see you then, have a good spring break too. :-) Mark