+ Reply to Thread
Results 1 to 6 of 6

combine like items and sum

  1. #1
    Registered User
    Join Date
    11-09-2004
    Posts
    19

    combine like items and sum

    Hi,
    Sure this is simple for regular users (I'm just not).

    I have two columns, first is road name and second is mileage. The roads are broken out from my GIS into segments. For instance Main St might have 6 segments because of crossroads.

    I need to combine the like road names and sum the mileage so those six segments have one entry.

    Please help.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,482

    Re: combine like items and sum

    Look at SUMIF

    =IF(A:A, "Main St", B:B), for example

    Regards
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-09-2004
    Posts
    19

    Re: combine like items and sum

    Thanks for the answer on sumif. My problem then lies in the fact that I have approx 100 different road names and my understanding of sumif is I would enter each road name in the function. Don't think that would work.

    Any more ideas?

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,482

    Re: combine like items and sum

    Some. Post a sample workbook with some typical data for more specific advice.

    Regards

  5. #5
    Registered User
    Join Date
    11-09-2004
    Posts
    19

    Re: combine like items and sum

    Here is a small sample of what I am talking about:

    RD_NAME GRA_LEN_MI
    AIRPORT RD 0.181180595
    ALSOP LN 0.085506665
    B RICE RD 0.555444203
    B RICE RD 1.379248004
    BAKER LN 0.949159738
    BAKER LN 0.508002681
    BAKER ST 0.059345549
    BATES HOLW RD 0.547248937
    BATES HOLW RD 0.011189400
    BATES HOLW RD 1.545798445
    BEAUCHAMP LN 1.344686710
    BEAUCHAMP LN 0.541628428
    BOLING LN 0.154529973
    BOYD HARRIS RD 1.410542636
    BROADWAY ST 0.197358336
    BRUNER LN 0.123761306
    BUCK POWERS RD 0.233638280
    BUCK POWERS RD 0.582730235

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: combine like items and sum

    Use the Advanced Filter on the column of street names to get a secondary list of UNIQUE values, perhaps in column G. Then put in a SUMIF() in column H as suggested already, then copy down.

    In H2:
    =SUMIF(A:A, A2, B:B)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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