View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
philster philster is offline
external usenet poster
 
Posts: 2
Default inserting a character amongst characters in a cell.

Hi Tom

thanks for your reply, but I'm still having problems

I've done what you suggested but not getting anywhere I'm afraid.

Please assist me in coding this, I'm new to VB
----------
Sub dec()


j = 3
k = 2



Do Until j = ""

Cell.Value = Left(Cell.Value, 3) & "." & Right(Cell.Value, 3)

Loop



End Sub
----------

The data that needs to be changed is in column 2 and the data starts from
row 3 of the spreadsheet.


many thanks

Phil


"Tom Ogilvy" wrote in message
...
Cell.Value = Left(cell.Value,3) & "." & Mid(Cell.Value,4,255)

or if always 6 characters:

Cell.Value = Left(cell.Value,3) & "." & Right(Cell.Value,3)


--
Regards,
Tom Ogilvy


philster wrote in message
...
Hi everyone

I need some help with excel visual basic.

I need to insert a character in amongst characters in a cell (column).

for example, for currency pair 'AUDUSD', I want to be able to insert to

a
period '.' in between the third and forth character so that it looks

like
'AUD.USD'

The content of the cell would not be AUDUSD all the time of course, but

the
inserted '.' needs to be between the third and forth character

everytime.

Can someone tell me how to code this.

thanks

Phil