+ Reply to Thread
Results 1 to 4 of 4

Macro for copy and paste column formula into another column

  1. #1
    Forum Contributor
    Join Date
    05-16-2018
    Location
    Pittsburgh, PA
    MS-Off Ver
    2016
    Posts
    109

    Macro for copy and paste column formula into another column

    Hello,

    In my file attached I am updating this particular piece of a bigger file. I am updating the financials monthly, and wanted to create a macro that would copy and paste the previous months formula over to the next month actuals (obviously I have the other information, just prepping for an easier process next year). However, there are only certain ranges that would need updated. Since I have to other sheets in the bigger file, I was going to create macro for each sheet such as dayschool, education, and residential (have dayschool in the attached file) since they each have different amount of ranges that need updated, I was hoping to have help on one and then I could adjust for the others.

    Attached:
    You will see that July-September are already updated with the actual in the sheet attached.

    (in actual file it references another book and I use this formula below)

    =IFERROR(INDEX('H:\PDE_pull\[12 MO ACTUAL.XLS]011000-030 - Acct Detail'!$A$1:$N$65536,MATCH($B12,VALUE(LEFT('H:\PDE_pull\[12 MO ACTUAL.XLS]011000-030 - Acct Detail'!$A$1:$A$65536,6)),0),MATCH(D$9,'H:\PDE_pull\[12 MO ACTUAL.XLS]011000-030 - Acct Detail'!$A$7:$IV$7,0)),0)

    For the "dayschool" macro, I would like it to have on the next month, which in this case I have highlighted green where the cursor may go I guess and then have it copy and paste the Septembers formula into October in orange. Only the yellow highlighted section needs to be updated. Each month I would pull the new report into its folder and come to the sheet and use the macro, and it should then update it.

    Like I mention before, due to big file already, I was just gonna save the macros within the workbook as we will continue to use it.

    If anyone could help, it would be greatly appreciated

    Thanks, Ant
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    05-16-2018
    Location
    Pittsburgh, PA
    MS-Off Ver
    2016
    Posts
    109

    Re: Macro for copy and paste column formula into another column

    Alrighty guys, just got my post moved over to this side of the thread from general wondering if I could have some help it would be greatly appreciated.

    I have found one solution with my macro so far, but was unable to write it with range and copy function so I did it manually. Wondering if anyone could help clean up and consolidate the code so I could put towards my other sheets as well.

    Current Macro:

    Please Login or Register  to view this content.
    Any help is appreciated. Like mentioned I would like to run the macro for all 3 sheets at one time but thought it would be easier to get down one sheet for the moment.

    Thanks,
    Ant
    Last edited by AMoreno; 07-12-2018 at 10:39 AM.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Macro for copy and paste column formula into another column

    Unfortunately, your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  4. #4
    Forum Contributor
    Join Date
    05-16-2018
    Location
    Pittsburgh, PA
    MS-Off Ver
    2016
    Posts
    109

    Re: Macro for copy and paste column formula into another column

    Okay I apologize, I wondered how others did that. All fixed and good to go. Thanks.

+ 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. Need VBA to copy and paste a formula in a column based in a column range
    By nateg123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-05-2015, 06:43 AM
  2. [SOLVED] Macro to copy and paste only unique values from one column to another column in same sheet
    By Manish_Gupta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-19-2014, 05:44 AM
  3. [SOLVED] Macro to Concatenate, copy and paste the formula until the last row of the previous column
    By venkat.ramamoordhy1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-23-2013, 04:03 PM
  4. [SOLVED] Macro to Copy Formating from Previous Column and Paste into Last Column
    By rmmohan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-05-2013, 09:37 AM
  5. [SOLVED] Macro to copy columns and paste into one column in next blank column
    By rmmohan in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-31-2013, 03:14 PM
  6. [SOLVED] Macro to Copy and Paste a Column to the next available empty column
    By ekr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2013, 02:50 AM
  7. [SOLVED] Macro Help. Copy Hyperlink url from Column A and paste its image into Column B
    By kdela1212 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-04-2013, 09:00 AM

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