+ Reply to Thread
Results 1 to 2 of 2

Looping Through Columns And Rows

  1. #1
    Registered User
    Join Date
    08-08-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1

    Looping Through Columns And Rows

    Hey Guys,

    This is my third day with VBA, so i am a complete Newbie and not surprisingly am having some trouble. I am trying to write a section of code that:

    1. Loops through cells of a given range and searches for a value greater than 0.

    2. If Value meets above condition then copy that value into another cell of a different sheet

    3. Continue searching and copying cells until all values from that range have been found and copied

    This Loop is also within a For Next Loop that goes row by row and copies other values into another sheet until it finds the last row where it will end

    I have set up a MsgBox test to see what values the initial Loop (one searching for values)is finding and for the most part it seems to be working correctly and returning the right values but after some values it returns a blank box when it should be returning the next found value

    I know it is not pretty , but hey third day. Any pointers, tips suggestions and criticisms are welcomed and appreciated. Do not need the answer just direction and some hints

    Here is the Code:

    Please Login or Register  to view this content.
    Last edited by slimjm911; 08-09-2012 at 03:47 PM. Reason: Added code tags

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Looping Through Columns And Rows

    @ slimjm911

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at top of the page and read Rule #3.
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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