+ Reply to Thread
Results 1 to 4 of 4

For Loop - getting Qualifier error

  1. #1
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    245

    For Loop - getting Qualifier error

    Hello -

    I'm trying to learn how to write For loops. The code below keeps returning a "Qualifier" error but I can't figure out why.

    Please Login or Register  to view this content.
    My workbook is also attached.

    Thanks for any insights!

    Grilleman
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    12-15-2009
    Location
    Chicago, IL
    MS-Off Ver
    Microsoft Office 365
    Posts
    3,177

    Re: For Loop - getting Qualifier error

    Please Login or Register  to view this content.

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: For Loop - getting Qualifier error

    Just a general point

    Loops are an important part of any programming language so do continue to play around with them and learn.
    However in an Excel application don't get carried away with them. I've lost track of the number of times I've seen looping code when it just isn't necessary. Loops, particularly when processing large ranges, carry a large time overhead since with every iteration of the loop VBE needs to jump back into the Excel App and the return. This is very inefficient

    Most of the time the data to be processed should first be filtered so that it only shows the rows that need to be addressed. Then a single line of code can be used to update the filtered range block in one hit. In your example the code would be something like.

    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,256

    Re: For Loop - getting Qualifier error

    Please Login or Register  to view this content.
    Last edited by daboho; 02-01-2017 at 06:25 PM.

+ 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] Why am I getting an 'Invalid Qualifier' Error?
    By chaddug in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2014, 02:55 PM
  2. [SOLVED] Invalid Qualifier to a Valid Qualifier (Application)
    By exceltabz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-16-2014, 11:31 AM
  3. [SOLVED] Invalid qualifier error help
    By apeiron in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-22-2014, 12:09 PM
  4. [SOLVED] Help with Invalid Qualifier error
    By nickwhan in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-27-2012, 05:17 PM
  5. invalid qualifier error
    By Maglor in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-30-2009, 09:14 AM
  6. Invalid qualifier Error
    By ACM-GFT in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-13-2009, 09:05 AM
  7. compile error: invalid qualifier.
    By MGG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-02-2005, 12:05 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