Thread: ranges
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default ranges

Thanks, Just tested with only 2 and it worked just fine

--
Don Guillett
SalesAid Software

"Bob Phillips" wrote in message
...
I don't think it matters Don. The MID(c,9,8) will return 4 if there are

just
12 say, and even returns blank if there are 8 or less,

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Don Guillett" wrote in message
...
A simple one if all are at least 16

Sub getstrs()
For Each c In Selection
c.Offset(, 1) = Left(c, 8)
c.Offset(, 2) = Mid(c, 9, 8)
Next
End Sub

--
Don Guillett
SalesAid Software

"Rich Cooper" wrote in message
...
I am working with a range of names, I want to take that range and

have
a
macro take the first 8 characters of each cell in that range and paste

them
into another range. Then i want the macro to go back throught the

initail
range and take the next 8 characters and paste that to a second new

range
right next to the one with the first 8 characters. If this can be

done?
does anyone know how?