+ Reply to Thread
Results 1 to 4 of 4

for/next Correct Syntax for Ranges with variables

  1. #1
    Registered User
    Join Date
    10-20-2011
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    98

    for/next Correct Syntax for Ranges with variables

    Basically what is wrong with this


    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert Solus Rankin's Avatar
    Join Date
    05-24-2013
    Location
    Hollywood, CA
    MS-Off Ver
    Win7 Office 2010 VS Express 2012
    Posts
    2,655

    Re: for/next Correct Syntax for Ranges with variables

    You can concatenate the colon and the second range in one string. Like
    Please Login or Register  to view this content.

    e/ Also I'm assuming you want to take the values of those ranges so it would be:
    Please Login or Register  to view this content.
    Thanks,
    Solus


    Please remember the following:

    1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
    Highlight the code in your post and press the # button in the toolbar.
    2. Show appreciation to those who have helped you by clicking below their posts.
    3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.

    "Slow is smooth, smooth is fast."

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: for/next Correct Syntax for Ranges with variables

    Please Login or Register  to view this content.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: for/next Correct Syntax for Ranges with variables

    Or ...

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

+ 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] Syntax for passing ranges as variables
    By geophysicist in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2013, 04:08 AM
  2. looking for correct syntax
    By adsxvii in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2009, 01:40 PM
  3. Need correct syntax for ranges
    By jman0707 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-24-2008, 05:24 PM
  4. Correct syntax
    By Paragons in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-07-2007, 07:48 AM
  5. [SOLVED] Correct VBA syntax
    By Ken G. in forum Excel General
    Replies: 3
    Last Post: 12-06-2005, 08:40 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