View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Add multiple columns in between


Perhaps you really meant column Ao since (I should have tested with col o)
col O is column 15 and you can't subtract 27 from 15 to get -column 12

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"NM" wrote in message
...
It doesn't work, its giving error!

"Don Guillett" wrote:

Try this idea
Sub insertcols()
mc = "o" 'tested with "d"
cti = 27 ' tested with 2
Columns(mc).Offset(, -cti).Resize(, cti).Insert
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"NM" wrote in message
...
Hi,

I have coulmns A through CJ and I want to add 27 coulmns before column
O.
What is the easiest way to do it?

Thanks for your help.
Nee