+ Reply to Thread
Results 1 to 4 of 4

Calculating sum of relative cells

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003
    Posts
    15

    Calculating sum of relative cells

    Hey guys. Feel like i'm spamming the forum a bit but the more I work with Excel the more I realize that I'm not that good at it Anyways, I'm in need of a quite advanced formula (for me) that sums up relative relative rows of a specified column. The rows relation depends on the ID-number of the person. Look at my attachment.

    In Sheet1 I have an extract of the data I'm working with. It's a medical record of different people in a study. The ID (col. B) seperate the different people. One person can have several perscriptions (spelling?) of medicine. Every perscription has an "fddd", a daily dose (col. L). I want to add up all the daily doses for every seperate ID of my data in Sheet2. So for example, for ID1 I want it to sum L3:L6 in Sheet1 and return it to Sheet2!B2. If the ID is not found I want it to be blank. Cheers
    Attached Files Attached Files
    Last edited by nxc; 02-19-2009 at 09:55 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Calculating sum of relative cells

    Check out the SUMIF function in XL Help

    Sheet2!B2: =SUMIF(Sheet1!B:B,A2,Sheet1!L:L)

    You will get a zero using the above where ID not found... if you want to return blank either use a custom format of

    [=0]"";#,###

    Or you have to use a MATCH

    Sheet2!B2: =IF(ISNUMBER(MATCH(A2,Sheet1!B:B,0)),SUMIF(Sheet1!B:B,A2,Sheet1!L:L),"")

  3. #3
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Re: Calculating sum of relative cells

    You Need to use:

    Please Login or Register  to view this content.
    Here
    Attached Files Attached Files
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  4. #4
    Registered User
    Join Date
    02-11-2009
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Calculating sum of relative cells

    Wow thanks guys fast response, works excellent. Used this to get rid of blanks:

    Please Login or Register  to view this content.

+ 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