+ Reply to Thread
Results 1 to 7 of 7

How to make VBA offset and speed up coding

  1. #1
    Registered User
    Join Date
    07-03-2014
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    43

    Exclamation How to make VBA offset and speed up coding

    Dear Excel Gods,



    I've pieced together this code from information I have found online and the code works perfectly right now. I originally wanted to make this a user form where it would simply add the values to the next free column but that may be out of my league.

    To help get this project over with I'd like to make this code work for multiple columns with out copying and pasting the code. I think this would be called doing "offset"?

    Right now it works for P1 down.

    If D1 = True, then do the code below for columns D:E
    If F1 = True, then do the code below for columns F:G
    If H1 = True, then do the code below for columns H:I
    If J1 = True, then do the code below for columns J:K
    ect

    I'm VERY new to VBA so please be detailed in your response.


    Thank you!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: How to make VBA offset and speed up coding

    Is it the exact same code, except the columns, for each of D1, E1, D1... etc.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    07-03-2014
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    43

    Re: How to make VBA offset and speed up coding

    It is the same code however some of the formulas need to offset as well

    P:Q Column would be
    Please Login or Register  to view this content.
    R:S Column would be

    Please Login or Register  to view this content.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: How to make VBA offset and speed up coding

    So it's just the columns that change, including in the formulas?

  5. #5
    Registered User
    Join Date
    07-03-2014
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    43

    Re: How to make VBA offset and speed up coding

    I'm 99% that's correct,

    I may be over looking one formula but for the most part that is the idea

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: How to make VBA offset and speed up coding

    Where is the code located and how is it being executed?

  7. #7
    Registered User
    Join Date
    07-03-2014
    Location
    Toronto
    MS-Off Ver
    2010
    Posts
    43

    Re: How to make VBA offset and speed up coding

    I've attached the file, very new to VBA's so I just want to make sure I'm being clear

    Price Template2.xlsm

+ 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] Need help on offset and copy coding using VBA
    By megan-jane in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2013, 09:20 AM
  2. Sum(n(offset speed
    By gottscpa in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-17-2013, 10:53 AM
  3. [SOLVED] Offset value to absolute column value - minor coding change
    By ChristineJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-08-2012, 12:04 PM
  4. Coding for offset cell references with multiple row headings with merged cells
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-04-2010, 02:22 PM
  5. Coding to make a transpose values button
    By Sally in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-30-2006, 06:15 PM

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