+ Reply to Thread
Results 1 to 6 of 6

Sum for cell containg text - Sum all row

  1. #1
    Registered User
    Join Date
    08-08-2007
    Posts
    23

    Sum for cell containg text - Sum all row

    Hello

    Someone at my work trying to create excel sheet that do search for employee assigned task and hours and then sum these product together

    Example:

    Employees Project1 Project 2 Project 3
    Tony 8 Check Sheets (8) Check Sheets (4) Check Sheets (8)
    Keith 4 Plans (4) Check Sheets (40) Check Sheets (40)
    Chris 4 Plans (4)


    Assume that tony has assigned 8 hours to check sheets in project #1 and 4 hour for project # 2 and 8 hr for project # 3

    He did this formula :

    =IF(ISBLANK(INDIRECT("S19")),0,(MID(INDIRECT("S19"),SEARCH("(",INDIRECT("S19"))+1,SEARCH(")",INDIRECT("S19"))-SEARCH("(",INDIRECT("S19"))-1)+0))

    However it only give the result of 4 which is project #1. How can he add the hours in Project 1, 2 & 3 using this formula and give me the total of 20?

    is there a macro to do that or better formula?

    Thanks

  2. #2
    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,929

    Re: Sum for cell containg text - Sum all row

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  3. #3
    Forum Contributor
    Join Date
    10-30-2003
    Location
    Singapore
    MS-Off Ver
    Excel 2019
    Posts
    197

    Re: Sum for cell containg text - Sum all row

    Try…………..

    1] Assume your data put in A1:D4 with heading

    2] In E2, array formula (Ctrl+Shift+Enter) copied down :

    =SUM(IFERROR(-MID(B2:D2,FIND("(",B2:D2),20),0))

    Regards
    Bosco

  4. #4
    Registered User
    Join Date
    08-08-2007
    Posts
    23

    Re: Sum for cell containg text - Sum all row

    Here is the file attachment.
    Attached Files Attached Files

  5. #5
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Sum for cell containg text - Sum all row

    Maybe this
    Array formula. **Must be entered with Ctrl+Shift+Enter key combination.
    Enter in R18 and drag formula down
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    v Q R S T U
    17 Project1 Project 2
    18 Tony 20 Check Sheets (8) Check Sheets (4) Check Sheets (8)
    19 Keith 84 Plans (4) Check Sheets (40) Check Sheets (40)
    20 Chris 4 Plans (4)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  6. #6
    Registered User
    Join Date
    08-08-2007
    Posts
    23

    Re: Sum for cell containg text - Sum all row

    Thanks for you help. It works great. Hopefully this is what they are looking for. 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. Cell containg array name
    By Tresfjording in forum Excel General
    Replies: 3
    Last Post: 10-31-2017, 08:10 AM
  2. [SOLVED] How do you display the last number in a string containg text and numbers
    By john dalton in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-13-2016, 09:23 AM
  3. Script for sheet name containg specific text
    By vimalanathk in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-08-2013, 01:44 PM
  4. formula for calculating cell containg both text and number
    By green369 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-20-2012, 04:41 AM
  5. Replies: 0
    Last Post: 12-11-2012, 04:08 AM
  6. I can't remove periods (.) from a cell containg a name
    By dschmitt in forum Excel General
    Replies: 10
    Last Post: 03-14-2010, 09:00 PM
  7. insert text in columns based on maximum number of rows containg data
    By twrizzo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-30-2007, 03:35 PM

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