View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Francis Hookham Francis Hookham is offline
external usenet poster
 
Posts: 125
Default Incremanting text

Code please for incrementing text. For instance:



Text "D01-003" is in E7 and I need "D01-004" in E11



The following works but results in "D01-4" but I must maintain the "000"
format of the right three characters which need to go beyond "100"



Sub test()

Cells(11, 5) = Left(Cells(7, 5), 4) & (Right(Cells(7, 5), 3) + 1)

End Sub



Many thanks - in anticipation.



Francis Hookham