+ Reply to Thread
Results 1 to 4 of 4

How to automatically number rows after running macro

  1. #1
    Registered User
    Join Date
    09-03-2012
    Location
    Indianapolis, IN
    MS-Off Ver
    Excel Office 365
    Posts
    9

    How to automatically number rows after running macro

    I have created a standard list of items that may or may not need to be included depending on the type of project being worked on. You will see a macro in the right hand column that will hide all rows to which the "NO" is applied. I do not want to delete the "NO" rows since this is intended to develop into a master list of items. After clicking the "HIDE button, only the "YES" items remain and the "NO" rows are hidden. Is there a way to then automatically number the visible (YES) rows in numerical sequence? Everything that I have tried numbers the hidden rows also and so there are gaps in the numbering.

    Thanks
    Attached Files Attached Files

  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,445

    Re: How to automatically number rows after running macro

    This:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied down.
    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
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,526

    Re: How to automatically number rows after running macro

    Or
    Please Login or Register  to view this content.
    and add this line to your "revealing" code
    Please Login or Register  to view this content.

  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
    44,445

    Re: How to automatically number rows after running macro

    You don't really need to modify your macro, or add a separate macro. You don't even need to add a count of visible cells. The visible cells are the rows with "Yes" in them. So just add a formula that counts the "Yes" values and leave it there. That's what the formula in post #2 does.

+ 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. Running Clock/Automatically Filter Merged Cell Rows
    By hwtcrl in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-30-2014, 04:15 PM
  2. Automatically running a macro
    By nelson.matt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2012, 11:28 AM
  3. running a macro automatically
    By gbWildy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-19-2007, 03:16 PM
  4. Running a macro automatically
    By alex1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-29-2007, 09:48 AM
  5. [SOLVED] Running a Macro automatically
    By davemel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2006, 06:15 PM
  6. [SOLVED] automatically running a macro
    By 42410 in forum Excel General
    Replies: 2
    Last Post: 04-26-2005, 11:06 AM
  7. automatically running a macro
    By 42410 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2005, 11:06 AM

Tags for this Thread

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