+ Reply to Thread
Results 1 to 4 of 4

sum values between characters

  1. #1
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Sibiu
    MS-Off Ver
    Excel 2007
    Posts
    114

    sum values between characters

    Hello guys,
    I need some guidance in finding a solution for this problem.
    I have the following text in a cell FS320702-10 : 08-05-2017 : 30; FS322658-05 : 26-05-2017 : 40; FS333658-05 : 26-05-2017 : 40; FS444658-05 : 26-05-2017 : 40;.
    I need the sum of the values that appear before ";" so this would translate to 30+40+40+40.
    FS320702-10 : 08-05-2017 : 30; represents value 30. There could be up to 10 to 15 values in one cell.
    Thanks.

  2. #2
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: sum values between characters

    This function should do that job for you.
    It first splits up the cell by the ;-delimiter and then splits up the separate parts by the :-delimiter. Then 3rd part of the latter will have the value to add.
    Please Login or Register  to view this content.
    Add a module to your workbook and copy this code to it.
    Cheers!
    Tsjallie




    --------
    If your problem is solved, pls mark the thread SOLVED (see Thread Tools in the menu above). Thank you!

    If you think design is an expensive waste of time, try doing without ...

  3. #3
    Forum Contributor
    Join Date
    07-22-2013
    Location
    Sibiu
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: sum values between characters

    It works amazing. I'm a beginner when it comes to vba and I honestly didnt know about split and ubound functions.
    If it's not to much trouble could you explain your thought process? Did you had this issues before or this solution just came to your mind on the spot?
    Anyway ty so much for your help.

  4. #4
    Forum Expert Tsjallie's Avatar
    Join Date
    09-15-2012
    Location
    NL
    MS-Off Ver
    2010, 2013, 2016
    Posts
    2,077

    Re: sum values between characters

    ...could you explain your thought process?
    To be honest I really don't have a clue of what's happening between my ears
    But I think it's mainly looking for structure and applying knowledge of functions.

    Thx for the rep

+ 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. Having characters appear after entering values ?
    By loady in forum Excel General
    Replies: 3
    Last Post: 01-12-2014, 03:00 PM
  2. Replies: 3
    Last Post: 10-23-2013, 08:42 AM
  3. How to SUM values even special characters?
    By toplisek in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-01-2013, 06:36 AM
  4. Replies: 1
    Last Post: 07-24-2013, 05:18 AM
  5. Replies: 2
    Last Post: 11-01-2011, 05:14 PM
  6. replace values between specific characters
    By hluk in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-01-2009, 05:39 PM
  7. Add characters with number values
    By Derekwit in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-26-2007, 08:51 AM
  8. characters and values
    By Partysquad in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2006, 09:55 AM

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