+ Reply to Thread
Results 1 to 5 of 5

How do I add all values in a given row (not colum)?

  1. #1
    xenxander
    Guest

    How do I add all values in a given row (not colum)?

    i am trying to search colum "A" for all values equal to something, say all
    the cells that have '1000' as their data, and then add up all the cells in
    the corresponding row, so if A34, A50, and A56 all have 1000 in them, then I
    want to return the value of all the cells added up in the rows, say B34,50,56
    : K34,50,56

  2. #2
    Toppers
    Guest

    RE: How do I add all values in a given row (not colum)?

    Enter with Ctrl-Shift-Enter (an array formula)

    =SUM(IF(A1:A100=1000,B1:K100))

    Change range to suit

    "xenxander" wrote:

    > i am trying to search colum "A" for all values equal to something, say all
    > the cells that have '1000' as their data, and then add up all the cells in
    > the corresponding row, so if A34, A50, and A56 all have 1000 in them, then I
    > want to return the value of all the cells added up in the rows, say B34,50,56
    > : K34,50,56


  3. #3
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Or how about

    =SUMPRODUCT(--($A$1:$A$56=1000)*($A$1:$A$56)+(--($A$1:$A$56=1000)*($B$1:$B$56)+(--($A$1:$A$56=1000)*($K$1:$K$56))))

  4. #4
    Ragdyer
    Guest

    Re: How do I add all values in a given row (not colum)?

    What's wrong with simply using:

    =SUMPRODUCT((A1:A100=1000)*B1:K100)

    --
    Regards,

    RD

    ---------------------------------------------------------------------------
    Please keep all correspondence within the NewsGroup, so all may benefit !
    ---------------------------------------------------------------------------
    "VBA Noob" <VBA.Noob.2b1r4g_1153067707.9912@excelforum-nospam.com> wrote in
    message news:VBA.Noob.2b1r4g_1153067707.9912@excelforum-nospam.com...
    >
    > Or how about
    >
    >

    =SUMPRODUCT(--($A$1:$A$56=1000)*($A$1:$A$56)+(--($A$1:$A$56=1000)*($B$1:$B$5
    6)+(--($A$1:$A$56=1000)*($K$1:$K$56))))
    >
    >
    > --
    > VBA Noob
    > ------------------------------------------------------------------------
    > VBA Noob's Profile:

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



  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Sorry I read it wrong

    I thought he just wanted Col B and K not all of them

    VBA Noob

+ 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