+ Reply to Thread
Results 1 to 6 of 6

Updating Columns

  1. #1
    Registered User
    Join Date
    07-30-2012
    Location
    Hope, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Updating Columns

    I need a macro to delete the first month column and add a blank column at the end.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Updating Columns

    Something like this should get you started:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-30-2012
    Location
    Hope, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Updating Columns

    Thanks for the help, Jerry. I believe the code will work with a little tweaking; however, I am getting a runtime error 1004 "Can't change part of merged cell". I think this is because in the actual worksheets the number of rows that need to update vary. I also unmerged the cells in the blank rows in between the used rows. The debugger caught the first instance, after unmerging it caught the merged header row.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Updating Columns

    Sounds good. If that takes care of this question, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

  5. #5
    Registered User
    Join Date
    07-30-2012
    Location
    Hope, Arkansas
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Updating Columns

    Sorry for the confusion, the issue is not solved. Since the number of rows vary, the code hangs up when it comes to the merged cell row(new block title). Is there a way around it?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Updating Columns

    I don't really use merged cells, so don't have a lot of patience for them. My apologies.

    Perhaps you can create a macro to unmerge, run the code I gave, then merge the remaining rows again. Just an idea.

+ 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