+ Reply to Thread
Results 1 to 5 of 5

Insert number of rows based on cell values?

  1. #1
    Forum Contributor
    Join Date
    05-01-2006
    Location
    Erie, Pa USA
    MS-Off Ver
    Vista - Excel 2003
    Posts
    132

    Insert number of rows based on cell values?

    Column B contains geographical Areas. Column C contains a list of business departments.

    North Env
    North Env
    North Ops
    North Sales
    North Sales
    North Sales
    South Env
    South Maint
    South Ops
    South Sales
    South Sales
    South Sales

    Etc.

    The values and number of these departments will vary.

    I want to insert lines to sum the totals at the bottom of each geographic area based on the number of different departments. So, for this example, for the North three lines would be inserted. For the South, 4 lines would be inserted.

    Any ideas?
    Last edited by HBF; 02-20-2009 at 11:01 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Insert number of rows based on cell values?

    Not exactly clear to me what the result is meant to look like but you could perhaps check out XL's in built Subtotal functionality ?

    For ex. you also don't specify where the values are you wish to Sum... let's assume Col D...

    Highlight your data in B:D (you should have headers in the first row) then -> Data -> Insert Subtotals

    Set up such that at Each Change in Col C insert a SUM into Col D

    Is that what you want ?

  3. #3
    Forum Contributor
    Join Date
    05-01-2006
    Location
    Erie, Pa USA
    MS-Off Ver
    Vista - Excel 2003
    Posts
    132

    Re: Insert number of rows based on cell values?

    Sort of, there are many different values in column C, so going back through the spreadsheet and adding subtotals would be very time consuming.

    In my example, I am aiming for a row to be inserted after North Env with a sum in col R through col IT of the data in North Env row 1 (R through IT) and North Env row 2 (R through IT).

    So it would look like:
    North Env
    North Env
    North Env Total
    North Ops
    North Ops Total
    North Sales
    North Sales
    North Sales
    North Sales Total


    You said "Set up such that at Each Change in Col C insert a SUM into Col D".
    If there is a way to automate the subtotal function, that would be most helpful.
    Last edited by HBF; 02-20-2009 at 10:05 AM.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Insert number of rows based on cell values?

    It is an entirely automated feature - follow the steps outlined.

    see here for an actual screenshot: http://pubs.logicalexpressions.com/P...cle.asp?ID=358

  5. #5
    Forum Contributor
    Join Date
    05-01-2006
    Location
    Erie, Pa USA
    MS-Off Ver
    Vista - Excel 2003
    Posts
    132

    Re: Insert number of rows based on cell values?

    Finally got it - Thanks for your help.
    Last edited by HBF; 02-20-2009 at 11:01 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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