View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ronald Roberts Ronald Roberts is offline
external usenet poster
 
Posts: 3
Default Adding - sign(-)

harvindersingh1 wrote:
I have certain data in a particular column. Each cell having different
length data. Now i want to add (-) sign before 3 characters from right
side.
How would i do kindly help.


Try this:

Data in column A, formula in column b.

aaaaa aa-aaa =IF(LEN(A2)<3,"",LEFT(A2,LEN(A2)-3)&"-" & RIGHT(A2,3))


HTH,

Ron