View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default Replace pattern of characters

If you're saying you need to put the slant between the 4th & 5th characters
in the 8 character entries, & leave the other rows unaltered, you could try:
=IF(A1="","",IF(LEN(A1)=8,LEFT(A1,4)&"/"&RIGHT(A1,4),A1))
--
David Biddulph

"Fernando" wrote in message
...
I need replace the contents of a column as follows

The column will have have empty rows rows with 4 characters and rows
with
8 characters.

For the rows with 8 characters I need to insert a "/' in between.

e.g.

XXXXWWWW - XXXX/WWWW.

I know I can use ???????? in the search, but how do I get the replace to
only insert the "/" in between the characters?

The first four characters are not always the same.

Thank you for your help

JFercan.