+ Reply to Thread
Results 1 to 3 of 3

Problem filling the data

  1. #1
    Registered User
    Join Date
    04-14-2011
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    30

    Question Problem filling the data

    Hi,

    i have used this code in another workbook and it worked well. Now i've made some small changes to it to fit to a new worksheet i'm using and the procedure starts ok and when it gets to the line 140 the second time it runs a loop it breaks (i have painted the line red).

    Please can someone take a look.

    Thank you in advance,

    Br,
    Marko

    Please Login or Register  to view this content.
    Last edited by strippy; 01-26-2012 at 09:57 AM.

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Problem filling the data

    hi strippy, as a sample of the workbook in question is not available and thus the data structure is unknown the quess is:

    Please Login or Register  to view this content.
    sort of decoding what it does:

    1. Range(Datum).Offset(-1, 6) - From Range(Datum) we move 1 row up and 6 columns to the right
    2. End(xlDown) - move down till the first non-empty value. If there is no such cell we arrive at the end of the sheet - its last row
    3. Offset(1, 0) - if non-empty cell exists and it is not located in the last row of the sheet, we move 1 row down. Otherwise we get error as we are out of rows.

  3. #3
    Registered User
    Join Date
    04-14-2011
    Location
    Croatia
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Problem filling the data

    Hi,

    yes the procedure is doing exactly what you wrote. I have solved my problem. Probably was a bit tired yesterday afternoon when i was doing this last part and in the end did not think clearly. In the last two columns (where the procedure was breaking) i had a lot of blanks, so i filled in the blanks and now the procedure is working just fine. Anyways in the last two columns there should not be any blanks.

    Thank you for your help.

    Br,
    Marko

+ 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