ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Add multiple columns in between (https://www.excelbanter.com/excel-discussion-misc-queries/212319-add-multiple-columns-between.html)

NM

Add multiple columns in between
 
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

Don Guillett

Add multiple columns in between
 
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



David Biddulph[_2_]

Add multiple columns in between
 
Select Column O
Shift and select Column AO
Insert/ Columns
--
David Biddulph

"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




NM

Add multiple columns in between
 
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




NM

Add multiple columns in between
 
Thanks David,it worked.

But I want to how do we know that from column O to AO it is 27 columns? Do
we count all the way from O to AO to see if that equals 27 or is there a
easier way to know that?

Thanks!

"David Biddulph" wrote:

Select Column O
Shift and select Column AO
Insert/ Columns
--
David Biddulph

"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





Don Guillett

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





Bob I

Add multiple columns in between
 
There are 26 letters in the alphabet. 26 would get you to AP, so add one.

NM wrote:

Thanks David,it worked.

But I want to how do we know that from column O to AO it is 27 columns? Do
we count all the way from O to AO to see if that equals 27 or is there a
easier way to know that?

Thanks!

"David Biddulph" wrote:


Select Column O
Shift and select Column AO
Insert/ Columns
--
David Biddulph

"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






Shane Devenshire[_2_]

Add multiple columns in between
 
Hi,

1. Type O:AO into the Name Box and press Enter
2. Press Ctrl++ (Control Plus)

Cheers,
Shane Devenshire

"NM" wrote:

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


NM

Add multiple columns in between
 
Doesn't work for me!

"Shane Devenshire" wrote:

Hi,

1. Type O:AO into the Name Box and press Enter
2. Press Ctrl++ (Control Plus)

Cheers,
Shane Devenshire

"NM" wrote:

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


NM

Add multiple columns in between
 
This means it has to be done manually, excel doesn't tell you the column name
equivalent to the number.

"Bob I" wrote:

There are 26 letters in the alphabet. 26 would get you to AP, so add one.

NM wrote:

Thanks David,it worked.

But I want to how do we know that from column O to AO it is 27 columns? Do
we count all the way from O to AO to see if that equals 27 or is there a
easier way to know that?

Thanks!

"David Biddulph" wrote:


Select Column O
Shift and select Column AO
Insert/ Columns
--
David Biddulph

"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






Bob I

Add multiple columns in between
 
It would if you used R1C1 reference style instead of letters.

NM wrote:
This means it has to be done manually, excel doesn't tell you the column name
equivalent to the number.

"Bob I" wrote:


There are 26 letters in the alphabet. 26 would get you to AP, so add one.

NM wrote:


Thanks David,it worked.

But I want to how do we know that from column O to AO it is 27 columns? Do
we count all the way from O to AO to see if that equals 27 or is there a
easier way to know that?

Thanks!

"David Biddulph" wrote:



Select Column O
Shift and select Column AO
Insert/ Columns
--
David Biddulph

"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






David Biddulph[_2_]

Add multiple columns in between
 
Try Alt-I-C in place of Control Plus
--
David Biddulph

"NM" wrote in message
...
Doesn't work for me!

"Shane Devenshire" wrote:

Hi,

1. Type O:AO into the Name Box and press Enter
2. Press Ctrl++ (Control Plus)

Cheers,
Shane Devenshire

"NM" wrote:

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





All times are GMT +1. The time now is 07:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com