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.
My workbook is also attached.Please Login or Register to view this content.
Thanks for any insights!
Grilleman
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.
My workbook is also attached.Please Login or Register to view this content.
Thanks for any insights!
Grilleman
Please Login or Register to view this content.
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.
Please Login or Register to view this content.
Last edited by daboho; 02-01-2017 at 06:25 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks