+ Reply to Thread
Results 1 to 4 of 4

Add New Column to the Right and Autofill

  1. #1
    Registered User
    Join Date
    06-28-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Add New Column to the Right and Autofill

    Hey Everyone,
    I've been trying to create a macro to do this for the past day and I'm getting nowhere. Any help would be appreciated.

    I have have formulas in column B that I want to drag horizontally. Basically, I'm trying to create a macro that will add a column to the right of B (want it to add a new all the way to the right every time the macro is executed) and then Autofill the column with data from the column on the left. Any ideas?

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Add New Column to the Right and Autofill

    Hi, sagarvpatel.

    maybe have a look at this code and give it a try:
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Registered User
    Join Date
    06-28-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Add New Column to the Right and Autofill

    Thanks! That does what I want it to do if my ActiveCell is the last column to the right. If its not, it will insert a column next to whereever my ActiveCell is. Is there any way to force this macro to always run using the right-most column?

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,198

    Re: Add New Column to the Right and Autofill

    Hi, sagarvpatel,

    IŽd expected the data range to end if I press CTRL+RightArrow but maybe you have more than one list in there:

    Please Login or Register  to view this content.
    Ciao,
    Holger

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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