+ Reply to Thread
Results 1 to 5 of 5

Wanting to create a loop

  1. #1
    Registered User
    Join Date
    02-12-2019
    Location
    West Yorkshire, UK
    MS-Off Ver
    2013
    Posts
    12

    Wanting to create a loop

    Hi All,

    So rather new to VBA. What i'm wanting to do is create a loop that goes down my column from E4:E70. I'm stuck. The code i'm wanting to loop is currently:

    Range("E4").select
    if activecell = "hol" then
    Range("D4").select
    Activecell.clearcontents
    end if

    any help would be much appriciated.

    Thank you

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Wanting to create a loop

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Wanting to create a loop

    loops are not that hard..

    pick one of the below..
    they both do the same..
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-12-2019
    Location
    West Yorkshire, UK
    MS-Off Ver
    2013
    Posts
    12

    Re: Wanting to create a loop

    That's great. Thank you

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Wanting to create a loop

    You're welcome.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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] Wanting to create a random word generator
    By Simon.g in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-07-2019, 11:46 PM
  2. Wanting to run loop for multiple pages
    By VeryConfused in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-04-2015, 10:35 AM
  3. guest list wanting to create groups
    By Teenie11357 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-25-2014, 05:19 PM
  4. Wanting to create conditional formatting that is not Cell related.
    By deliveryboy83 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-22-2014, 02:46 PM
  5. Wanting to create collapsable rows
    By Miss.Rubixcube in forum Excel General
    Replies: 1
    Last Post: 01-12-2014, 11:29 PM
  6. [SOLVED] Wanting to create a unique customer number
    By Tamstar01 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-06-2013, 01:36 AM
  7. Newbie wanting to create "auto-fill" spreadsheet...
    By Addijo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-17-2013, 03:33 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