+ Reply to Thread
Results 1 to 9 of 9

Sum of seven cell if cell contains "+" (Plus) mark

  1. #1
    Registered User
    Join Date
    08-13-2016
    Location
    NAGPUR
    MS-Off Ver
    MS OFFICE 2007
    Posts
    49

    Lightbulb Sum of seven cell if cell contains "+" (Plus) mark

    Respected Sir...

    In the excel, there are Seven Cells which contains marks as below:

    38
    39
    42
    27+08
    47
    25+10
    29+06

    As per above I want the result as "271" in the eighth cell..

    Kindly help.. Thanks in advance...

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,000

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    Maybe:

    Please Login or Register  to view this content.
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)


    Then:

    =SumTotal(A1:A7)
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    Will it always be 2 digits? And will it always be a plus sign?

    Also, are you fine with VBA?
    Cheers!
    Deep Dave

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,907

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    Try this ...

    =SUMPRODUCT(--MID(SUBSTITUTE(A1:A7&"+0","+",REPT(" ",100)),{1,101},100))

  5. #5
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    @Phuocam - That is a beautiful formula..
    Last edited by NeedForExcel; 03-14-2018 at 05:15 AM.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,000

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    Phuocam... That's really great. It might need a tweak, as it breaks if there is an empty cell in the range.

  7. #7
    Registered User
    Join Date
    08-13-2016
    Location
    NAGPUR
    MS-Off Ver
    MS OFFICE 2007
    Posts
    49

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    Quote Originally Posted by Phuocam View Post
    Try this ...

    =SUMPRODUCT(--MID(SUBSTITUTE(A1:A7&"+0","+",REPT(" ",100)),{1,101},100))
    YESSSSSSSSS... This formula working Great... Thank you. Everyone...

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,000

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    Out of interest.... if there are blank cells in the range, this is the minor adjustment required to Phuocam's formula to keep it working...

    =SUMPRODUCT(--MID(SUBSTITUTE(0&A1:A7&"+0","+",REPT(" ",100)),{1,101},100))

  9. #9
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Sum of seven cell if cell contains "+" (Plus) mark

    Quote Originally Posted by Glenn Kennedy View Post
    Out of interest.... if there are blank cells in the range, this is the minor adjustment required to Phuocam's formula to keep it working...

    =SUMPRODUCT(--MID(SUBSTITUTE(0&A1:A7&"+0","+",REPT(" ",100)),{1,101},100))
    Even this is great..

    I did think of a lousy solution -

    =SUMPRODUCT(IFERROR(--MID(SUBSTITUTE(C33:C39&"+0","+",REPT(" ",100)),{1,101},100),0))

    Iferror turned it into an Array formula.

+ 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. Click and Mark a cell with an "x"
    By dgaller in forum Excel General
    Replies: 18
    Last Post: 07-09-2015, 02:05 PM
  2. Click cell to mark it with an "X"
    By ELLIS106 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-09-2015, 09:55 AM
  3. Replies: 3
    Last Post: 01-29-2015, 02:36 PM
  4. a formula that pulls data from an array to mark a single cell "X"
    By cstewart37 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2014, 02:33 PM
  5. Make each cell text inside a Quotation Mark " "
    By Marvin85 in forum Excel General
    Replies: 3
    Last Post: 04-17-2014, 03:11 PM
  6. Mark intersecting cell "Yes" if both Column and Row Headers exist in raw data as a pair
    By tenscourts in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2012, 04:30 PM
  7. Replies: 6
    Last Post: 01-08-2006, 06:20 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