+ Reply to Thread
Results 1 to 5 of 5

Add Columns with specific text in a row

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    Trophy Club, Texas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Add Columns with specific text in a row

    I am trying to track street pavement for a city and as you can imagine, there is a lot of data entry.

    At the end of the day, I will need to know the total length of streets with brick, asphalt, and concrete. Column 'D' has the street material (Asphalt, Brick, Concrete) and Column 'E' will have the length. At the bottom of the sheet, under column 'E', I have cells that will show the total length for streets with Asphalt (E61), Brick (E63), and Concrete(E65), so I need a formula to enter in those cells that will look for the specific pavement materials it is totalling

    Also, I am tracking streets with/without curb and gutter. If a street doesn't have it, I need to track how much will be needed. Basically, it will be the length (Column E) times 2 (both sides of the street). In column 'G' there will either be 'Yes' or 'No'. If 'Yes', then I don't need a total and the cell containg the amount of curb and gutter need (Column 'J') will be blank. However, if 'No', Column 'J' will have the total amount of curb and gutter needed ('E??' x 2)

    Obviously the sheets will be different lengths so the cells will need to be copied and pasted.

    Thanks for your help.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Add Columns with specific text in a row

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include BEFORE/AFTER sheets if needed to show the process you're trying to complete or automate. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,938

    Re: Add Columns with specific text in a row

    Hi

    for part 1, try using sumif()

    =sumif(D:D,"Asphalt",E:E) you can either hard-code Asphalt and the others, or reference them in a small table

    For the 2nd part, you can use the same basic formula, but change it to sumifS(), which will allow you to add extra criteria
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Registered User
    Join Date
    03-21-2013
    Location
    Trophy Club, Texas
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Add Columns with specific text in a row

    Thanks to both of you for responding.

    After posting, I found an answer yesterday and used:

    =SUM(IF(D7:D101="ASPHALT",E7:E101))

    and then for the curb and gutter I used:
    =IF(G19="NO",J19*Lookup!$B$7,0)

    Thanks again

  5. #5
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,448

    Re: Add Columns with specific text in a row

    BTW, it is bad practice to use a reserved name for a sheet name . As LOOKUP is an existing function, it would be best to call your sheet something else

+ 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