+ Reply to Thread
Results 1 to 4 of 4

Need help with index function - combining rows.

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Need help with index function - combining rows.

    Hi,

    I actually had help with something similar here before, but I'm faced with the same problem, and I cannot get it to work. I have a spreadsheet with store numbers down column a and items going all the way across. Each store takes up multiple rows (ie. store 5 spans 10 rows or so). I need to combine these rows so that each store is on one row, combining the totals all the way across. Previously, somebody helped me to create an index and then used sumif on the values. I cannot get the index function to work! I've attached my sheet. The 'sorting' tab is the one that needs to be condensed. I've made the last tab, 'grouped', to do the function on. Please help!

    Thanks
    Michael
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Need help with index function - combining rows.

    Michael,

    This might not be exactly what you're looking for, but I believe it will give you the information you require.


    In AD2:

    Please Login or Register  to view this content.
    will sum C2 to AC2. Copy this formula as far down your sheet as you require.



    In AE2:

    Please Login or Register  to view this content.
    will find the sum of the cells in Column AD where the corresponding cells in Column A match the value of A2 (ie, "5". Copy this down as far as you did the previous formula.



    In Column AG/somewhere/anywhere, make a list of the unique store numbers. In the attached, AG2 contains store 5, AG3 store 30, etc.



    In AH2:

    Please Login or Register  to view this content.
    will look for a match for AG2 (5) in Column A, and will return the value from the corresponding cell in Column AE.

    INDEX/MATCH only returns a value for the FIRST match it finds, so no need to worry about values being repeated.



    Hope this helps.
    Attached Files Attached Files
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  3. #3
    Registered User
    Join Date
    12-17-2012
    Location
    Carrollton, TX
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Need help with index function - combining rows.

    I need the rows to all collapse to a single row though with the collapsed rows totaling all the way across so that I have a single value in each column all the way over. I need to know how many of each item each store will get, and I need to keep the format pretty much the same. We're working with other people's data. I'll attach the one that somebody helped me with before, and maybe that will give you an idea. Thank you so far. The one I attached has the grouping tab done the way I'm trying to do it.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Need help with index function - combining rows.

    Michael,

    I see bebo helped you here http://www.excelforum.com/excel-form...59#post3088059 about a month ago. I can see what he did with the SUMIF formula, but I don't know how he managed what he refers to as the "difficult" part.

    You should bump the thread so that s/he might see your question, or maybe drop a PM - it's easy enough to overlook posts one has been involved in - and hopefully bebo can explain what was done to sort your information, which in turn would mean you don't have to ask the forum every time this exercise comes up for you. For my part, I'm not going to try to reinvent the wheel, when another forum member has already cracked what you want to do.

    Good luck.
    Last edited by BB1972; 02-28-2013 at 07:30 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