Results 1 to 4 of 4

Insert column before last column in table

Threaded View

  1. #1
    Registered User
    Join Date
    06-27-2011
    Location
    Durban, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    4

    Insert column before last column in table

    Hi

    I have a few sheets, with tables, which vlookup values from a data sheet which is updated every month.

    Say I have 2 months, May and April, now I want to make June.

    I insert a column between May and April and copy the values of *May* into this new column.

    I then paste the new data sheet, then my last column is automatically updated for June.

    I want to automatically do this job, but the macro recording records the column names...

    Here is a recording of what I am doing:
      Range("A8").Select
        Selection.End(xlToRight).Select
        Range("AB1").Select
        Application.CutCopyMode = False
        ActiveCell.FormulaR1C1 = ""
        Columns("AC:AC").Select
        Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
        Columns("AD:AD").Select
        Selection.Copy
        Range("AC1").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
    End Sub
    Thanks!
    Last edited by Jerome000; 06-27-2011 at 04:54 AM. Reason: add tags for new poster

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1