+ Reply to Thread
Results 1 to 7 of 7

Searching within a single cell and summing up relevant values

  1. #1
    Registered User
    Join Date
    05-29-2015
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    2

    Searching within a single cell and summing up relevant values

    Hi,

    i have a single cell that has data in the following format

    "name age *** height weight date name(1) age(1) ***(1) height(1) weight(1) date(1) name(2) age(2) ***(2) height(2) weight(2) date(2) name(3) age(3) ***(3) height(3) weight(3) date(3)"

    example: "tom 41 male 190 80 5/12/2015 bill 29 male 174 70 5/14/2015 sarah 19 female 140 45 5/14/2015 cheryl 29 female 170 80 5/14/2015"

    1. the terms are all separated by a single space
    2. i cant use text to column

    How may i use excel formula or vba to sum the weight of all the applicants with a particular date?

    i.e. i want to sum the weight of bill, sarah and cheryl to obtain 195 as their 3 data series are dated 5/14/2015


    Thank you for the help in advance!

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

    Re: Searching within a single cell and summing up relevant values

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

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

    View Pic

  3. #3
    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
    43,984

    Re: Searching within a single cell and summing up relevant values

    This is NOT pretty; but it does work (at least for the example shown - where there were 4 people). However, I have that sinking feeling that the single example will prove NOT to be representative of your real data. In reality, I think you need VBA.
    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

  4. #4
    Registered User
    Join Date
    05-29-2015
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    2

    Re: Searching within a single cell and summing up relevant values

    Hi Glenn,

    thank you for the help. But i'm afraid it's not scalable with all the array formulas.

    I have attached a sample workbook, have to change the way i framed the problem because i realised the data has other problems (sorry, have to desensitise data)

    I am looking to


    => sum all the "variable length" values which comes before a "desired" date. and unfortunately the data is all within a single cell (can't delimit it due to other reasons).
    => in this case (in the workbook), i am referring to the change in wealth

    Thank you in advance

  5. #5
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Searching within a single cell and summing up relevant values

    Hi.

    What date format does your system use? Your entries in the Input - Desired Date column are all "03/05/2015", yet the strings in the Data column contain the date "5/03/2015". Is this an error on your part?

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Searching within a single cell and summing up relevant values

    Edit: just realised you've cross-posted on another forum without informing us.

    http://www.mrexcel.com/forum/excel-q...nt-values.html

    This is both against the forum rules here and something I don't agree with personally, so unfortunately I'll have to drop out.

    Regards

  7. #7
    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
    43,984

    Re: Searching within a single cell and summing up relevant values

    As I said - you need VBA. In which case, I'm out...

+ 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. Replies: 19
    Last Post: 04-15-2014, 09:41 AM
  2. [SOLVED] Summing the latest 7 values from a single row of data
    By RMXByker in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 05-13-2013, 07:40 AM
  3. Searching for values based on a single cell, changing row..
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2012, 10:33 PM
  4. [SOLVED] searching and summing using string within cell
    By Al in forum Excel General
    Replies: 2
    Last Post: 04-25-2006, 11:10 PM
  5. [SOLVED] searching for values and summing the corresponding values
    By Simon in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2005, 09:06 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