+ Reply to Thread
Results 1 to 6 of 6

Looping Macro

  1. #1
    Registered User
    Join Date
    09-07-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Looping Macro

    Hello all,

    Need a little help writing a macro that will run through a report and change the following:

    If Col D = “Open”, then change to “

    If Col D = “Open”, then Col E changes to “Y”, Col F changes to “Y” and Col G changes to “N.”

    Please see attached workbook DatesReport for before and after versions. Would need this to loop through over 3K rows.

    Thanks for any and all help!
    Last edited by ExcelGuy160; 09-20-2010 at 07:10 PM.

  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
    48,110

    Re: Looping Macro

    One way:

    Please Login or Register  to view this content.

    Regards

  3. #3
    Registered User
    Join Date
    09-07-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Looping Macro

    Thanks TMshucks,

    Unfortunately, this macro deleted all rows except the ones marked "open."

    I was trying to keep all rows where they are, just change "Open"
    Last edited by ExcelGuy160; 09-20-2010 at 07:10 PM.

  4. #4
    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
    48,110

    Re: Looping Macro

    Deleted ... or hidden?

    It shouldn't have deleted anything.

    Click on the drop down selection arrow on column D and select all.

    Regards

  5. #5
    Registered User
    Join Date
    09-07-2010
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    17

    Re: Looping Macro

    Ah, thanks - these were hidden.

  6. #6
    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
    48,110

    Re: Looping Macro

    This is a better version of the code. A little longer but a) it will only change the OPEN lines; b) if you run it twice it doesn't mess up the header; and c) it removes the Autofilter

    Please Login or Register  to view this content.

    Regards

+ 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