Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Jul 2005
    Location
    Mandenville, Louisiana, USA
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    when cell data matches, add up cells to the right (excel 2002)

    I am having a issue with arragment of my data.

    In 1 columns I have SO numbers ([img]/forums/images/smilies/cool.gif[/img], and in another I have amounts (D)

    I have a scenerio that if the SO numbers in column B are the same, then add both the amounts together and show only one amount for that SO number, if the SO numbers are different leave the amount alone.

    the new amounts can be placed in column H.

    Thanks,

    I wrote a condtional IF statement but it

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: when cell data matches, add up cells to the right (excel 2002)

    Put the formula below in cell H2 and then copy it down as far as necessary. Does this do what you want?

    <code>
    =IF(B2=B3,D2+D3,"")
    </code>
    Legare Coleman

  3. #3
    Star Lounger
    Join Date
    Jul 2005
    Location
    Mandenville, Louisiana, USA
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: when cell data matches, add up cells to the right (excel 2002)

    Yes it does but it skips the so numbers that dont have doubles, If I can also show the amounts for only one SO

  4. #4
    Star Lounger
    Join Date
    Jul 2005
    Location
    Mandenville, Louisiana, USA
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: when cell data matches, add up cells to the right (excel 2002)

    Sometimes there may even be Three same SO numbers aswell.

  5. #5
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: when cell data matches, add up cells to the right (excel 2002)

    How about in H2 (copy down as required. expand the "694"s as needed)
    <pre>=IF(COUNTIF($B$1:B2,B2)>1,"",SUMIF($B$1:$B$69 4,B2,$D$1:$D$694))</pre>


    Steve

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: when cell data matches, add up cells to the right (excel 2002)

    OK, then try this formula. You will need to adjust the 2000 in the fomula if there can be more than 2000 rows of data.

    <code>
    =IF(AND(B2<>"",B2<>B1),SUMIF($B$1:$B$2000,B2,$D$1: $D$2000),"")
    </code>
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •