+ Reply to Thread
Results 1 to 4 of 4

Do Until loop or equivalent required

  1. #1
    Registered User
    Join Date
    04-01-2009
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2003
    Posts
    24

    Do Until loop or equivalent required

    Hi

    I need a loop function (i guess a do while or do until code) so whenever the word 'Non-Current' appears in colum A enter a 1 in colum E until the word 'Total Non-C' is reached at which point the loop must end.
    Such as:
    A B C D E
    NON-CURRENT 6 4 5 1*
    ABSA 4 5 2 1*
    BARCLAYS 3 2 8 1*
    NED 0 8 6 1*
    TOTAL NON-C 4 6 7 0

    Anyone got any ideas?

    Thanks
    Last edited by Nonboff; 04-11-2009 at 05:59 AM. Reason: gramar improvement

  2. #2
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Re: Do Until loop or equivalent required

    Please Login or Register  to view this content.
    Last edited by foxguy; 04-09-2009 at 04:46 PM.

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Do Until loop or equivalent required

    Nonboff,

    See the attached workbook "Update Data and Do Loop or equivalent required - Nonboff - SDG.xls".

    Run the "UpdateData" macro.


    Have a great day,
    Stan
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Registered User
    Join Date
    04-01-2009
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2003
    Posts
    24

    Re: Do Until loop or equivalent required

    Thanks Stan and Foxguy...

    Stan - I managed to get your method working. Only problem is that my data is not consistent. Sometimes the info i need is under current acc, sometimes non current, sometimes total local fixed interest. So i am not going to be able to use this method

    Foxguy, your method i got a syntax error at this point:
    a() = range(A:A).value

    To get round this prob, i think what i will do is create a data table to find my accounts and then using an if function add a 1 in column E. I can handle this prob from here....

    Thanks for all the help!!

+ 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