+ Reply to Thread
Results 1 to 5 of 5

Alternative VBA code

  1. #1
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Alternative VBA code

    Hello,

    I am trying to use the following VBA code with no success. It give me error because there are too many arguments (i think). Does someone knows a shorter or better way to make use of this code?

    Please Login or Register  to view this content.
    Thank you very much.

    Kind regards,

    pezal

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    6,367

    Re: Alternative VBA code

    Split it up:

    Please Login or Register  to view this content.
    Or use the row number and math logic on the column (if your pattern of two columns every ninth column starting in column 12 holds for the entire range):

    Please Login or Register  to view this content.
    Last edited by Bernie Deitrick; 02-03-2015 at 01:54 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,659

    Re: Alternative VBA code

    I think the Range object can take only 30 arguments at one time. You could combine multiple ranges like this...

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

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

    Re: Alternative VBA code

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-22-2012
    Location
    Spain
    MS-Off Ver
    Excel 2008
    Posts
    304

    Re: Alternative VBA code

    Hi!

    Thank you very much for your replies, they both work!

    Kind regards,

+ 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] Alternative to F2+Enter code?
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 01-31-2015, 05:08 PM
  2. Alternative code to vLookup
    By Sam1036 in forum Excel General
    Replies: 10
    Last Post: 06-26-2014, 07:09 AM
  3. [SOLVED] Alternative vba code
    By pezalmendra in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2013, 07:31 AM
  4. [SOLVED] Alternative and faster code
    By pezalmendra in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-07-2013, 09:31 AM
  5. Alternative Code - Nested Ifs
    By gizoku00 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2008, 11:16 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