Thread: left or right
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default left or right



"antonov" wrote in message
...
hello there, say I have a cell with a 8 digits number in it (i.e.

54789621).
In another cell I need to have only the 4th digit (8). Is it possible?


=mid(A1,4,1)

And
also: is it possible to sort the data in a column by taking the 5th digit

of
each number?
thanks for your precious help



in a helper column add

=LEFT(A1,4)&RIGHT(A1,3)

and then sort by the helper column.