+ Reply to Thread
Results 1 to 11 of 11

HELP! Adding Rows with a macro

  1. #1
    Registered User
    Join Date
    01-25-2021
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    11

    HELP! Adding Rows with a macro

    I am still struggling with this....
    I have attached a spread sheet where I want to add the number "1" under "Issue No" and "1" under "Action Step" by clicking a button and subsequently if additional actions are needed then I would like to click the other button to add additional Action Steps as needed.

    Ok I have figured it out the above

    BUTTTT..... is there a way to auto format the cell that contains the issue if there are multiple actions.... ie. if there are 2 actions steps then the issue needs to be merged into 2 cell, if 3 action steps then merge issue into 3 cells.

    thanks
    Kelly
    Attached Files Attached Files
    Last edited by kkavanagh; 01-27-2021 at 01:31 PM.

  2. #2
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: HELP! Adding Rows with a macro

    Try the AddAction code as follows, but you should know, mixing Cell merge with VBA is not something one should do.

    Please Login or Register  to view this content.
    Last edited by maniacb; 01-27-2021 at 03:56 PM. Reason: Fix Line width

  3. #3
    Forum Expert
    Join Date
    05-29-2020
    Location
    NH USA
    MS-Off Ver
    365
    Posts
    2,103

    Re: HELP! Adding Rows with a macro

    Here is code updated for formatting

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: HELP! Adding Rows with a macro

    Try this ...
    I use hidden 'tmp' sheet in VBA code.
    To add an 'Action Step' select a given line for a given 'Issue' and select the 'Add new action' button.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,
    Maras.

  5. #5
    Registered User
    Join Date
    01-25-2021
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    11

    Re: HELP! Adding Rows with a macro

    Hi Maras,

    Thank you! How do I remove the bright green colour on the date cell? I will add conditional formatting later...

    Thanks
    Kelly

  6. #6
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: HELP! Adding Rows with a macro

    You can like below.
    Select the cells that you will remove solid fill colors from, and click Home > Fill Color > No Fill.

  7. #7
    Registered User
    Join Date
    01-25-2021
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    11

    Re: HELP! Adding Rows with a macro

    But they come up every time I click the new issue button

  8. #8
    Registered User
    Join Date
    01-25-2021
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    11

    Re: HELP! Adding Rows with a macro

    When you click the New Issue button the date cell in column J keeps coming up bright green, I just want it to be "clear" with no fill....

  9. #9
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: HELP! Adding Rows with a macro

    Sorry, unhide the sheet 'tmp' and remove the conditional formatting from cell 'J2'. Then hide the sheet back.

  10. #10
    Registered User
    Join Date
    01-25-2021
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2016
    Posts
    11

    Re: HELP! Adding Rows with a macro

    That's perfect! Many thanks!

  11. #11
    Valued Forum Contributor
    Join Date
    07-14-2017
    Location
    Poland
    MS-Off Ver
    Office 2010
    Posts
    528

    Re: HELP! Adding Rows with a macro

    Glad to help.

+ 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. Macro Adding rows for you
    By Cbowman in forum Excel General
    Replies: 1
    Last Post: 11-10-2011, 09:51 AM
  2. Adding Conditional Rows in a Macro
    By succel in forum Excel General
    Replies: 10
    Last Post: 07-29-2010, 04:52 PM
  3. Adding multiple rows with macro
    By bruce71101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-14-2010, 03:29 AM
  4. Adding multiple rows with a Macro
    By Nienaber in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-25-2010, 06:52 PM
  5. Macro for adding rows after previous row?
    By xwishmasterx in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-17-2010, 07:28 PM
  6. Adding Rows and Calculation to Macro
    By waderless1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-08-2008, 06:34 PM
  7. Macro and Adding Rows
    By dreicer_Jarr in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-15-2008, 05:59 PM
  8. Problem with macro adding rows
    By bsmith27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2007, 08:06 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