+ Reply to Thread
Results 1 to 5 of 5

Macro that runs through certain range of rows

  1. #1
    Registered User
    Join Date
    02-09-2011
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    87

    Question Macro that runs through certain range of rows

    I have attached a Macro enabled Sheet.

    I have recorder a Macro that will take the Line starts with TC1 to stay in Cell B

    and line starts with

    Expected result
    to be pasted into cell C

    As you can see that I ran the Macro successfully for B9 & C9

    However, my intention was to have the Macro run through the rest of the rows.

    In another way, kind like with an IF statement.

    until all rows has been adjusted.

    Not too sure how thought?
    Attached Files Attached Files
    Oceans Blue

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: Macro that runs through certain range of rows

    hi OceanBlue
    maybe a simple loop

    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro that runs through certain range of rows

    Try this:
    Please Login or Register  to view this content.


    After you've just recorded a macro is the best time to edit down the resulting code to take out all the "bloat" that isn't needed, especially with formatting. Excel does a lot of "block" formatting commands, so you know all you did was set the Wrap text flag, so edit out the stuff you know you don't need.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Macro that runs through certain range of rows

    Thanks..............................

  5. #5
    Registered User
    Join Date
    10-10-2012
    Location
    Dallas
    MS-Off Ver
    Excel 2010
    Posts
    92

    Re: Macro that runs through certain range of rows

    Thank you..............................

+ 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