ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VB EXCEL INSERTING COLUMNS (https://www.excelbanter.com/excel-discussion-misc-queries/151705-vbulletin-excel-inserting-columns.html)

moosedog2000

VB EXCEL INSERTING COLUMNS
 
Columns("M:M").Select
Selection.Insert Shift:=xlToRight

This inserts like 5 columns, why is that? Worked fine a few times in a long
macro, but now not so much. Help! I have searhced and searched.

Barb Reinhardt

VB EXCEL INSERTING COLUMNS
 
Try manually selection column M and see if there are any merged cells that
are selected.

"moosedog2000" wrote:

Columns("M:M").Select
Selection.Insert Shift:=xlToRight

This inserts like 5 columns, why is that? Worked fine a few times in a long
macro, but now not so much. Help! I have searhced and searched.


moosedog2000

VB EXCEL INSERTING COLUMNS
 
thank you, you are correct, I open another worksheet to do my vlookup and
there are in fact merged cells there, good call.

"Barb Reinhardt" wrote:

Try manually selection column M and see if there are any merged cells that
are selected.

"moosedog2000" wrote:

Columns("M:M").Select
Selection.Insert Shift:=xlToRight

This inserts like 5 columns, why is that? Worked fine a few times in a long
macro, but now not so much. Help! I have searhced and searched.



All times are GMT +1. The time now is 12:23 AM.

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