+ Reply to Thread
Results 1 to 5 of 5

Macro to repeat code on multiple rows

  1. #1
    Registered User
    Join Date
    10-09-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Macro to repeat code on multiple rows

    Hi I have a Private Sub Macro that I am using currently that works. But I am new to this and need some help extending this.

    It currently clears the contents of Cells in the same row in Columns "H" through to "K" when the value in Column "B" is changed. i.e when cell B4 is changed cells H4:K4 are blanked out.

    I am looking for a code that will do this from rows 4 to 104 without having to write the code for each row (as in my current code)

    the current code I have is this:

    Please Login or Register  to view this content.

    Any Help would be much appreciated.

  2. #2
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,864

    Re: Macro to repeat code on multiple rows

    Hi,

    Try this :

    Please Login or Register  to view this content.


    Regards

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    11,737

    Re: Macro to repeat code on multiple rows

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    10-09-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Macro to repeat code on multiple rows

    That worked perfectly. Thank you very much.

  5. #5
    Forum Guru
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,864

    Re: Macro to repeat code on multiple rows

    You are welcome, thanks for the feedback.


    Regards

+ 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] How to repeat a macro in multiple rows of a sheet?
    By rgoodman in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 07-01-2013, 09:07 AM
  2. [SOLVED] Tried to Build a Macro, but couldn't make it repeat for multiple rows.
    By homike2 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-06-2013, 09:37 AM
  3. Need macro help with transposing columns to rows and repeat a row value multiple times
    By InnovativeAJ in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-11-2012, 11:53 AM
  4. Repeat code for several rows with If statement
    By excel_vba_newbie in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2010, 06:37 PM
  5. Repeat code over 300 rows
    By Patrick Simonds in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-24-2005, 12:15 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