Thread: Trim Function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Lotus123
 
Posts: n/a
Default Trim Function


Assuming the Alpha is always one character and always either absent or
located on the right...here you go:

If you value is in Column A, place this in ColumnB (strip the digits):
+VALUE(IF(ISNUMBER(A1),A1,LEFT(A1,LEN(A1)-1)))

Place this in Column C (snag the character):
+IF(ISNUMBER(A1),"",RIGHT(A1,1))

This can be modified even more for situations in which the letter
appears at the beginning or if there are two letters; however, I didn't
want to make the forumla unduely complicated on the first run.


--
Lotus123
------------------------------------------------------------------------
Lotus123's Profile: http://www.excelforum.com/member.php...o&userid=28611
View this thread: http://www.excelforum.com/showthread...hreadid=487007