+ Reply to Thread
Results 1 to 8 of 8

Rolling forward some columns

Hybrid View

Spoon_1997 Rolling forward some columns 10-13-2022, 06:18 AM
BadlySpelledBuoy Re: Rolling forward some... 10-13-2022, 06:57 AM
Spoon_1997 Re: Rolling forward some... 10-13-2022, 07:09 AM
dangelor Re: Rolling forward some... 10-13-2022, 07:00 AM
Spoon_1997 Re: Rolling forward some... 10-13-2022, 07:08 AM
BadlySpelledBuoy Re: Rolling forward some... 10-13-2022, 07:28 AM
Spoon_1997 Re: Rolling forward some... 10-13-2022, 07:36 AM
BadlySpelledBuoy Re: Rolling forward some... 10-13-2022, 07:40 AM
  1. #1
    Registered User
    Join Date
    10-13-2022
    Location
    London
    MS-Off Ver
    O365 (PC) V 2211
    Posts
    10

    Rolling forward some columns

    Hi there,

    Hope everyone is well. My issue is regarding automatic rolling forward of an excel spreadsheet I have.

    What I would like to do is copy and paste columns N:P three rows along, when I record the macro this works fine and the formula references move along with it. However when I run the macro for a second time it does not roll forward the new far right columns. Rather N:P again.

    I understand this is due to my formula fixing the column N:P when copying, it's just I'm unsure how to code it so that the formula chooses the colums on the far right rather than these fixed columns. I also want it so that the formulas within the cells I am copying also move along.

    As I'm sure you can tell I'm very new to macros so any help would be greatly appreciated! Have attached the excel document with the VBA for reference.

    Thank you!

    Attachment 800402

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,951

    Re: Rolling forward some columns

    Hi and welcome

    Your attachment doesn't work. Click "Go Advanced" below your reply, find the "Manage Attachment" links and it should be straightforward from there.

    Full instructions may be visible in a banner at the top of the page. I don't know if it's still there because I blocked it from showing on my system.

    BSB

  3. #3
    Registered User
    Join Date
    10-13-2022
    Location
    London
    MS-Off Ver
    O365 (PC) V 2211
    Posts
    10

    Re: Rolling forward some columns

    Just posted a reply in the thread! please let me know if it doesn't work

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,310

    Re: Rolling forward some columns

    Your attachment isn't viewable. If you're uploading a sample workbook, try following the directions in the yellow banner above the thread titled: HOW TO ATTACH YOUR SAMPLE WORKBOOK

  5. #5
    Registered User
    Join Date
    10-13-2022
    Location
    London
    MS-Off Ver
    O365 (PC) V 2211
    Posts
    10

    Re: Rolling forward some columns

    How about now guys?
    Attached Files Attached Files

  6. #6
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,951

    Re: Rolling forward some columns

    Try replacing your current code with this:
    Sub Prepayments_roll_forward()
        Range(Cells(3, 14), Cells(3, Cells(3, Columns.Count).End(xlToLeft).Column)).EntireColumn.Copy Range("Q1")
    End Sub
    Does that do what you want?

    BSB

  7. #7
    Registered User
    Join Date
    10-13-2022
    Location
    London
    MS-Off Ver
    O365 (PC) V 2211
    Posts
    10

    Re: Rolling forward some columns

    That is absolutely what I want! Thank you so much I really do appreciate this! I've signed up to a VBA course so hopefully I won't need to post here too often lol.

    Quick question. How long do you think it takes to get to a good working proficiency with VBA?

  8. #8
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,951

    Re: Rolling forward some columns

    Glad I could help

    As for how long to learn... Depends on what you mean by proficient, depends on how quick a learner you are, how naturally technical your brain is, many things.
    I found it easier to learn VBA by using it in the real world rather than the classroom. I teach people to use it as part of my job and I reckon it could be picked up in a few weeks if you put your mind to it.

    It's sort of a never ending learning curve though and you'll find you're always refining the way you do things with it, so you never really stop learning.

    BSB

+ 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. [SOLVED] Rolling 12 Months formula based on an array of Forward data
    By MrsExcel-lent in forum Excel General
    Replies: 3
    Last Post: 01-20-2020, 01:50 AM
  2. adding flight times in a rolling time window- both forward and backward looking
    By aapilotgouge in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-30-2018, 02:04 PM
  3. I need help with rolling calendar/summing columns.
    By hollendahl in forum Excel General
    Replies: 7
    Last Post: 12-28-2015, 12:21 PM
  4. Rolling forward a file and saving down with new date in naming string each day
    By Uzair1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-17-2014, 11:47 AM
  5. [SOLVED] Comparing dates in two columns using IF AND OR statement - not straight forward
    By gegan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-15-2014, 10:57 AM
  6. Rolling forward data from worksheet to worksheet
    By Excelnovice123456 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2011, 01:51 AM
  7. Rolling over data in columns
    By payrollgal in forum Excel General
    Replies: 0
    Last Post: 10-09-2008, 10:30 AM

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