+ Reply to Thread
Results 1 to 5 of 5

Copy and paste values of specific column and increase a cell value by 1

  1. #1
    Registered User
    Join Date
    11-05-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    7

    Copy and paste values of specific column and increase a cell value by 1

    Hi all,

    I'm looking to setup a macro that will copy a column's values and then paste them in the same column as values rather than a simple copy paste. after the pasting it will also need to increase a certain cell value by 1.

    using the attached file as an example. I'm looking to have the macro copy and paste the values from the range I8:I23 back into the same range so that the formulas are removed but the values stay "written" in. also, the macro will need to increase the cell B3 value by 1.

    The idea is that this macro will essentiall roll forward the sheet to show the next financial month, but keeping the previous months values allowing me to compare changes in cost forecasts, budget changes etc).

    I hope this is enough to get started with, if not I can provide more info if needed.
    Attached Files Attached Files
    Last edited by ncalvelo; 11-20-2013 at 11:51 AM.

  2. #2
    Forum Contributor wakeupcall's Avatar
    Join Date
    02-29-2012
    Location
    Sofia, Bulgaria
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: Copy and paste values of specific column and increase a cell value by 1

    Hi there,

    just copy/paste this in your ThisWorkook object (or a module of your workbook)

    Please Login or Register  to view this content.
    Liked the answer given? click * to say so

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy and paste values of specific column and increase a cell value by 1

    Maybe:

    Please Login or Register  to view this content.
    This will increase to the next month everytime the macro is run.

    Please Login or Register  to view this content.
    Last edited by JOHN H. DAVIS; 11-20-2013 at 08:53 AM.

  4. #4
    Registered User
    Join Date
    11-05-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Copy and paste values of specific column and increase a cell value by 1

    just edited my original post to include:

    So, for example, the file currently shows the period to be set to 4, so the macro should be able to take the values in I8:I23 and paste them as values in I8:I23 then change the period value to 5. if the macro is run again, then it would do the same but for the values in J8:J23.

    John H Davis - your solution works. thank you very much!

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy and paste values of specific column and increase a cell value by 1

    Quote Originally Posted by ncalvelo View Post
    just edited my original post to include:

    So, for example, the file currently shows the period to be set to 4, so the macro should be able to take the values in I8:I23 and paste them as values in I8:I23 then change the period value to 5. if the macro is run again, then it would do the same but for the values in J8:J23.

    John H Davis - your solution works. thank you very much!
    You're welcome. Glad to help out and thanks for the feedback.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Vba - find next empty column, insert column, copy paste values & copy paste formulas
    By DoodlesMama in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2012, 12:43 PM
  2. Replies: 0
    Last Post: 09-06-2012, 04:06 AM
  3. [SOLVED] Copy and Paste a specific Column to a Column that's heading matches a particular cell
    By Rexmond in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2012, 12:29 AM
  4. Copy & paste specific column based on cell reference
    By ccsmith in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-26-2011, 03:59 AM
  5. Macro-Copy&Paste Fixed Data Ranges Into Last Empty Cell of Specific Column
    By hailnorm in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-26-2009, 10:15 PM

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