+ Reply to Thread
Results 1 to 3 of 3

Excel 2010 VBA Help: Grouping Rows by text in A Column.

  1. #1
    Registered User
    Join Date
    10-24-2013
    Location
    Topeka, Kansas
    MS-Off Ver
    Excel 2010
    Posts
    2

    Excel 2010 VBA Help: Grouping Rows by text in A Column.

    First, Hello everyone.
    I am working in Excel 2010 and I have 175550 rows, but only 6 columns.

    I need to scan each row Starting in Column A2, and if A3 matches, keep going until you don't get a match. (Once they don't match, you won't get another one that matches)
    Once the next column doesn't match add a Row, Paste the same Name from above into the new Row in A column, group all that matched and last step place a count in Same Row, Column F. Then continue until a blank A Cell exists.

    Here's my example:

    a1 - f1 title row. Numbers on left are Row Numbers for example, A2 is "Test", Data in B,C,D,E,F doesn't matter.

    1 Test B C D E F
    2 Test B C D E F
    3 Test B C D E F
    4 Test1 B C D E F
    5 Test1 B C D E F
    6 Test1 B C D E F
    7 Test1 B C D E F
    8 Test1 B C D E F

    what I want it to look like:

    Leave A1 - F1 row.
    + 4 Test - - - - 3
    +10 Test1 - - - - 5

    The + is the grouping. Columns B C D E can be left blank, F just needs the total of all the rows we grouped (the count of matches) excluding the display row(the one we added).

    Thank you,

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

    Re: Excel 2010 VBA Help: Grouping Rows by text in A Column.

    This is a built in function of Excel. It is called sub-totals.

    Here is a link on how to do it.

    http://office.microsoft.com/en-us/ex...010342620.aspx

    http://www.videojug.com/film/how-to-...otals-in-excel
    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

  3. #3
    Registered User
    Join Date
    10-24-2013
    Location
    Topeka, Kansas
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Excel 2010 VBA Help: Grouping Rows by text in A Column.

    Quote Originally Posted by alansidman View Post
    This is a built in function of Excel. It is called sub-totals.

    Here is a link on how to do it.

    http://office.microsoft.com/en-us/ex...010342620.aspx

    http://www.videojug.com/film/how-to-...otals-in-excel

    Thank you very much, I didn't know this would work. Much appreciated.

+ 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. Combine rows with common id in column A into one row in excel 2010
    By sherry64 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-06-2015, 12:29 PM
  2. Replies: 0
    Last Post: 01-16-2013, 03:40 AM
  3. [SOLVED] Excel 2010: Converting Rows into Column with specified condition.
    By aqeel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2012, 06:55 PM
  4. [SOLVED] Grouping of time slots in Excel 2010
    By Doctor Gooose in forum Excel General
    Replies: 4
    Last Post: 06-20-2012, 03:32 AM
  5. Macro to Automate Transpose column to rows Excel 2010
    By Rayb1969 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-08-2012, 06:51 PM

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