+ Reply to Thread
Results 1 to 1 of 1

Insert blank rows above a table based on unique values in one of the columns in the table

  1. #1
    Forum Contributor
    Join Date
    10-03-2015
    Location
    North Carolina, USA
    MS-Off Ver
    2016
    Posts
    145

    Insert blank rows above a table based on unique values in one of the columns in the table

    Hi,

    First, my apologies if anything I write is unclear or if I have not provided sufficient information. I almost never have the opportunity to work with vba, so when I do get to play around with it once or twice every year or two, I come at it as an absolute newb.

    My question (with some details):

    I copied some vba from a previous macro that splits data from a table in one sheet onto several sheets based on contents in cells of one of the columns in the original sheet. In other words, if there are three unique strings in column E, then my macro creates three new sheets with names that match the unique strings in column E in the original table, and then it copies rows of data from the original table that contain each unique string, and pastes those rows into the corresponding new sheet. This code is working perfectly (even thought I don't understand how it all works).

    What I want to happen next is, on each of the newly created sheets, I want to count the number of unique strings in column B, then insert that number of blank rows + 5 at the top of the sheet. In other words, if there are 5 unique strings in column B, then I want to insert 10 blank rows at the top of the sheet. I don't know if it matters, but the new sheets will always start at the 4th sheet (first three sheets are fixed, and will always be present). Possible names of the new sheets are, "ICO RWE", "ICO RWE-RSH", "ICO RSH", "ICR SSU", and "ICR MED", but not all sheets will always be present. For example, one workbook might only have "ICO RWE" and "ICO RSH".

    Any and all help is greatly appreciated. Please let me know if more details are needed.

    Thank you!
    Carlos

    Edit: I have not received a response to this question, so I cross-posted here: Chandoo

    Ha! This site instructs users that if they cross-post, they should provide links to the cross-post, BUT I CAN'T DO IT, because excelforum will not let me post links due to my current low post count.

    Can someone explain why cross-posting is strongly discouraged? Why is it a problem? In life, isn't it smart to look for information/answers from multiple sources, and then choose which works best for you? Also to learn which sources are best for your personal needs? Please don't tell me this anti cross-posting thing is about hurt feelings! I mean, I completely understand why we shouldn't post the same question across different parts of the same forum, but why not on different forums!?! I'm looking for an honest answer, as I would like to understand, and know if I am missing something, or looking at things wrong. Thanks.
    Last edited by carlito2002wgn; 02-07-2019 at 11:32 AM.

+ 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. Insert blank rows above a table based on unique values in one of the columns in the table
    By carlito2002wgn in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-08-2019, 01:06 PM
  2. Table that insert measures and insert blank rows
    By searme in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-08-2016, 04:49 AM
  3. [SOLVED] Get values from varying rows and columns of Pivot Table and enter those in different table
    By Richavlaues in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2016, 10:24 AM
  4. Finding a macro that will populate a table from another table based on a columns values
    By Daril_Ghiroza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-27-2015, 02:26 PM
  5. create a table based on values selected in rows and columns
    By hemagala in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-14-2015, 03:46 AM
  6. Replies: 6
    Last Post: 10-18-2011, 07:34 PM
  7. insert blank rows based on columns a values numerically
    By elkhole in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-18-2009, 04:57 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