+ Reply to Thread
Results 1 to 5 of 5

help me on condition issues

  1. #1
    Registered User
    Join Date
    11-12-2005
    Posts
    55

    Angry not solved yet help me on condition issues

    heloo
    if i have 5 columns like these

    1 microsoft 100 50
    2 sakhr
    3 intel
    1 microsoft 100 50
    1 microsoft 100 (this is blank cell) 40


    and i want to sum the third column only if the forth column has a value (for only the numer one company (microsoft) )
    so the answer will be 200 not 300

    thanks
    Last edited by amrezzat; 11-14-2005 at 09:27 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello amrezzat,

    Lets say you data occupies cells A1:D5. You can use the SUMIF worksheet function to sum the cells based on your criteria.

    Example of SUMIF:
    SUMIF(Test Range, Criteria, Sum Range)

    In this case you place the following formula in the cell of your choice...
    =SUMIF(D4:D5, ">0", C4:C5)

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    11-12-2005
    Posts
    55
    you didnt get what i meant
    i only want to sum the numbers in third column if they only belonged to one company(suppose company number 1 (microsoft)) and also if the forth column have a value in it
    so in that example
    the summation of microsoft is 100+100=200
    Last edited by amrezzat; 11-14-2005 at 09:18 PM.

  4. #4
    Kleev
    Guest

    RE: help me on condition issues

    I believe this will work for you:
    =SUMPRODUCT(--($A$1:$A$5=1),--($D$1:$D$5<>""),($C$1:$C$5))

    "amrezzat" wrote:

    >
    > heloo
    > if i have 5 columns like these
    >
    > 1 microsoft 100 50
    > 2 sakhr
    > 3 intel
    > 1 microsoft 100 50
    > 1 microsoft 100 40
    >
    >
    > and i want to sum the third column only if the forth column has a
    > value (for only the numer one company (microsoft) )
    > so the answer will be 200 not 300
    >
    > thanks
    >
    >
    > --
    > amrezzat
    > ------------------------------------------------------------------------
    > amrezzat's Profile: http://www.excelforum.com/member.php...o&userid=28766
    > View this thread: http://www.excelforum.com/showthread...hreadid=485028
    >
    >


  5. #5
    Tom Ogilvy
    Guest

    Re: help me on condition issues

    =sumproduct(--(secondcolumn="Microsoft"),--(len(trim(fourthcolumn))>0),third
    column)

    --
    Regards,
    Tom Ogilvy

    "amrezzat" <[email protected]> wrote in
    message news:[email protected]...
    >
    > you didnt get what i means
    > i only want to sum the numbers in third column if they only belonged to
    > one company(suppose company number (microsoft)) and also if the forth
    > column have a value in it
    > so in that example
    > the summation of microsoft is 100+100=200
    >
    >
    > --
    > amrezzat
    > ------------------------------------------------------------------------
    > amrezzat's Profile:

    http://www.excelforum.com/member.php...o&userid=28766
    > View this thread: http://www.excelforum.com/showthread...hreadid=485028
    >




+ 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