+ Reply to Thread
Results 1 to 5 of 5

Adding cell values that are dependent on adjacent cell values

  1. #1
    Registered User
    Join Date
    10-10-2006
    Posts
    68

    Adding cell values that are dependent on adjacent cell values

    Here's an example of what i'm working with,...

    Range is C40:D48

    Please Login or Register  to view this content.
    What i want to do is...

    If C40:48 = WAS, then add up all the values in D40:48 for which this is the case.

    Same for if C40:48 = PHI... add up the adjacent D values..

    The results i will just stick somewhere off to the side.. i just need a formula for now..


    The values in C ("WAS" and "PHI") will change, so in the function, obviously a cell reference is required, not the literal "WAS" or "PHI"...

    can anyone help?? this is really simple i think, but i figure it's faster asking rather than trying to deal with Excel's bogus help files..
    Last edited by globulous; 10-27-2009 at 10:42 AM.

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

    Re: Adding cell values that are dependent on adjacent cell values

    see the SUMIF function

    =SUMIF($C$40:$C$48,$A1,$D$40:$D$48)

    where A1 contains code of interest

  3. #3
    Registered User
    Join Date
    10-10-2006
    Posts
    68

    Re: Adding cell values that are dependent on adjacent cell values

    That's perfect... thanks Donkey

  4. #4
    Registered User
    Join Date
    10-10-2006
    Posts
    68

    Re: Adding cell values that are dependent on adjacent cell values

    Actually.....

    there's 1 more thing...

    That function sums certain values from certain range based on certain criteria...

    There must be a similar function that returns ENTIRE ROWS from a certain range, based on certain criteria...

    i'd like to scan a couple of columns and return the entire row where a particular value is found in the scanned column... is there a function to do this? or is this the work of a macro??

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

    Re: Adding cell values that are dependent on adjacent cell values

    Different question - new thread please.

+ 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