+ Reply to Thread
Results 1 to 2 of 2

Dynamic code

  1. #1
    Registered User
    Join Date
    07-29-2019
    Location
    London, England
    MS-Off Ver
    MS Office 16 and Office 2007
    Posts
    12

    Dynamic code

    Hi

    I have a file that deals with monthly data. my current macro inserts a new column each month. my problem is that i want to keep the offset part of my code referring to the monthly headers so therefore to the same row each time yet i want the formula to extend the number of columns it looks up after a new one is inserted!!

    the code is below and i just cant see a way around this yet! I want the 122 to change to 123,124 etc each time there is a new column.

    Please Login or Register  to view this content.
    Thanks in advance!
    Last edited by hagey01; 11-21-2019 at 06:31 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,409

    Re: Dynamic code

    Take a look at the yellow banner
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


+ 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] My code is not dynamic; it has a pre-defined range. Possible to change code?
    By mick0005 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-20-2015, 10:23 PM
  2. Dynamic VB code for Autofill
    By VictorsDad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-23-2014, 09:58 AM
  3. [SOLVED] VBA code for Dynamic range
    By Srikanth H N in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2014, 11:22 PM
  4. [SOLVED] Need help with Dynamic Range in my code.
    By moonsaga in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-14-2014, 01:08 PM
  5. [SOLVED] Changing static code to dynamic code
    By JamesFletcher in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-14-2013, 07:31 AM
  6. dynamic chart with VBA code
    By weii in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 09-15-2007, 08:04 AM
  7. Dynamic Chart Via Code
    By cherman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-17-2006, 08:30 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