Insert column in

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like a macro to insert a column (not just cells) in a named range.
The new column location would be 5 in from the last column in the range, and
it would need to have the same formulas as the column to its right.

Any help is appreciated!
 
maybe something like this:

Sub EFG()
Set r = Range("MyRange")
r(r.Columns.Count - 4).EntireColumn.Insert
r.Columns(r.Columns.Count - 4).Copy _
r.Columns(r.Columns.Count - 5)
End Sub
 
Brilliant! Thanks!!!

Tom Ogilvy said:
maybe something like this:

Sub EFG()
Set r = Range("MyRange")
r(r.Columns.Count - 4).EntireColumn.Insert
r.Columns(r.Columns.Count - 4).Copy _
r.Columns(r.Columns.Count - 5)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top