+ Reply to Thread
Results 1 to 5 of 5

Sum of value if column contain specific value

  1. #1
    crapit
    Guest

    Sum of value if column contain specific value

    A B

    1 AR 21.40
    2 AL 400.00
    3 AL 100.00
    4 AR 8.90
    5 AR 16.90
    6 AR 42.00
    7 PS 30.00
    8 PS 40.00



    How to add up column "B" value if the corresponding value in column "A"
    equal AR ???



  2. #2
    Gord Dibben
    Guest

    Re: Sum of value if column contain specific value

    crapit

    =SUMIF(A1:A8,"AR",B1:B8)

    If you don't know the range you can use

    =SUMIF(A:A,"AR",B:B)


    Gord Dibben Excel MVP



    On Fri, 25 Nov 2005 09:01:09 +0800, "crapit" <littlecramP@yahoo.com.sg> wrote:

    > A B
    >
    >1 AR 21.40
    >2 AL 400.00
    >3 AL 100.00
    >4 AR 8.90
    >5 AR 16.90
    >6 AR 42.00
    >7 PS 30.00
    >8 PS 40.00
    >
    >
    >
    >How to add up column "B" value if the corresponding value in column "A"
    >equal AR ???
    >



  3. #3
    crapit
    Guest

    Re: Sum of value if column contain specific value

    Suppose the value at Col "A" contain space E.g "AR "

    How come this doesnt work?

    =SUMIF(trim(A:A),"AR",B:B)

    "Gord Dibben" <gorddibbATshawDOTca> wrote in message
    news:apoco11cbt1p46cqth4l9u0brao4vq6k0i@4ax.com...
    > crapit
    >
    > =SUMIF(A1:A8,"AR",B1:B8)
    >
    > If you don't know the range you can use
    >
    > =SUMIF(A:A,"AR",B:B)
    >
    >
    > Gord Dibben Excel MVP
    >
    >
    >
    > On Fri, 25 Nov 2005 09:01:09 +0800, "crapit" <littlecramP@yahoo.com.sg>
    > wrote:
    >
    >> A B
    >>
    >>1 AR 21.40
    >>2 AL 400.00
    >>3 AL 100.00
    >>4 AR 8.90
    >>5 AR 16.90
    >>6 AR 42.00
    >>7 PS 30.00
    >>8 PS 40.00
    >>
    >>
    >>
    >>How to add up column "B" value if the corresponding value in column "A"
    >>equal AR ???
    >>

    >




  4. #4
    Forum Contributor
    Join Date
    03-03-2005
    Posts
    316
    Modify Gord's formula to:


    SUMIF(trim(A:A),"AR*",B:B)


    (note the use of the asterisk)


    David

  5. #5
    crapit
    Guest

    Re: Sum of value if column contain specific value

    Can explain y must I insert the asterisk as the purpose of trim is to remove
    space char. ?

    "davidm" <davidm.1z1r9m_1132912503.8285@excelforum-nospam.com> wrote in
    message news:davidm.1z1r9m_1132912503.8285@excelforum-nospam.com...
    >
    > Modify Gord's formula to:
    >
    >
    > SUMIF(trim(A:A),"AR*",B:B)
    >
    >
    > (note the use of the asterisk)
    >
    >
    > David
    >
    >
    > --
    > davidm
    > ------------------------------------------------------------------------
    > davidm's Profile:
    > http://www.excelforum.com/member.php...o&userid=20645
    > View this thread: http://www.excelforum.com/showthread...hreadid=488061
    >




+ 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