+ Reply to Thread
Results 1 to 3 of 3

VBA Insert formatted rows + a copy of istelf

  1. #1
    Registered User
    Join Date
    10-19-2020
    Location
    Canada
    MS-Off Ver
    2019
    Posts
    2

    VBA Insert formatted rows + a copy of istelf

    I would like to have rows dynamically inserted underneath a formatted row (row 6 for example) based off an inputted value in a cell (F:6). Then a copy of the formatted row would be placed after that so another value can be inserted into the next F:# cell and rows would appear below that, etc.
    Please Login or Register  to view this content.
    (However this code is too hardcoded for my needs)

    example : row 6 cell F:6 user puts in a '3' So 3 rows (7,8,9) get put underneath with row 10 being a copy of the original cell. Then in F:10 a user puts 2 so 2 rows are placed underneath, etc....


    Can this be done? it would be nice to have some pre formatting applied to those inserted cells. even if what is inserted is a pre-made row from another worksheet.

    Any help or direction is greatly appreciated.
    Last edited by alansidman; 10-26-2020 at 08:54 PM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: VBA Insert formatted rows + a copy of istelf

    you posted a dup. a mod will delete one:

    https://www.excelforum.com/excel-gen...of-itself.html

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: VBA Insert formatted rows + a copy of istelf

    Code Tags Added
    Your post does not comply with Rule 2 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found at http://www.excelforum.com/forum-rule...rum-rules.html

    Other Post has been removed. It appears you did not bother to read the rules you agreed to. (:


    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. VBA Insert formatted rows + a copy of itself
    By lhunt0194 in forum Excel General
    Replies: 2
    Last Post: 10-26-2020, 08:52 PM
  2. Copy and Paste Conditionally formatted rows
    By theTaoJones in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2019, 07:32 AM
  3. Need multiple macro buttons to insert new, formatted rows
    By msmetal in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-09-2014, 12:05 PM
  4. [SOLVED] Need help to easily copy rows that contain a formatted date
    By cpeaches in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-22-2013, 09:05 AM
  5. Insert rows via values of formatted cell
    By christya24 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2009, 10:52 AM
  6. Macro to insert formatted rows
    By oneblueaugust in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-24-2009, 05:05 PM
  7. Copy rows formatted and with same hidden colums
    By z00misen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-20-2006, 11:22 AM

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