+ Reply to Thread
Results 1 to 7 of 7

Thread: Check value in a array sum

  1. #1
    Registered User
    Join Date
    12-14-2011
    Location
    Lisboa
    MS-Off Ver
    Excel 2007
    Posts
    3

    Check value in a array sum

    Hi guys,

    First Thread!

    Im trying to do an array sum, but for each value to sum, i have to check a condition, but im not getting....

    Basically it's run the 3 row, and for each value check if the value of the first row, same columm, it's bigger that an predefined value..


    s1 s2 s3
    100 100 10

    Note: i only put 3 rows in example, but in my worksheet there are hundrends...
    Can anyone help me on this?

    Thanks in advance

    Best Regards

  2. #2
    Valued Forum Contributor Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens Greece
    MS-Off Ver
    Excel 2003
    Posts
    2,297

    Re: Check value in a array sum

    Hi johnny_martins00 and welcome to the Forum

    Be sure that the best way to solve your problem, is to attach a workbook.

    If i understoond well your point, then try this(S1=100--S2=100---S3=10). iF you want to sum these, if s1>80(per example)

    =IF(S1>80;SUM(S1:S3);"")

    Hope to helps you.
    Regards

    Fotis.

    I am proud that i am Greek.

    Just to know every one.We Greeks, we are nοt proud of our politicians. Υou?

    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Please,mark your thread [SOLVED] if you received your answer.


    My Avadar picture, is from Athens Acropolis.
    http://www.theacropolismuseum.gr

    http://www.visitgreece.gr/

  3. #3
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057

    Re: Check value in a array sum

    Try SUMIF like this

    =SUMIF(A$1:Z$1;">=100";A3:Z3)

    That will sum row 3 when the corresponding value in row 1 is >=100
    Audere est facere

  4. #4
    Registered User
    Join Date
    12-14-2011
    Location
    Lisboa
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Check value in a array sum

    testes.xlsx

    Hi guys, thanks for your awnsers.

    Here goes my attached workbook.

    I would like something more dynamic, if possible .

    Let's say i have an array, from D7 until BT7, and i want to sum all the values in that array that for each respective 3rd row, D7->C3 E7->E3 and so on, has a value not bigger than s39.

    Is this possible?

    thanks
    Regards
    Joao
    Last edited by johnny_martins00; 12-14-2011 at 11:36 AM.

  5. #5
    Valued Forum Contributor dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    New Delhi, India
    MS-Off Ver
    Excel 1997, 2000, XP, 2003, 2007, 2010
    Posts
    2,403

    Re: Check value in a array sum

    Hi Joao,

    I am not getting "for each respective 3rd row, D7->C3 E7->E3 and so on, has a value not bigger than s39". Please explain.


    Regards,
    DILIPandey

    < click on below 'star' if this helps >
    DILIPandey
    +919810929744
    dilipandey@gmail.com

  6. #6
    Registered User
    Join Date
    12-14-2011
    Location
    Lisboa
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Check value in a array sum

    Quote Originally Posted by dilipandey View Post
    Hi Joao,

    I am not getting "for each respective 3rd row, D7->C3 E7->E3 and so on, has a value not bigger than s39". Please explain.


    Regards,
    DILIPandey

    < click on below 'star' if this helps >
    Hi Dili,

    In other words, i want to run the 7th row,all values in my range, but for each columm to sum, first i want to check if it's respective 3rd row value it's now bigger that an value.

    hope it get it right

    Thanks
    Best Regards
    Joćo Martins

  7. #7
    Forum Moderator daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2007
    Posts
    10,057

    Re: Check value in a array sum

    To sum row 7 if the value in that row is greater than the respective value in row 3 then you can use SUMPRODUCT like this

    =SUMPRODUCT((7:7>$3:$3)+0,7:7)

    I'm not sure where S39 comes in - is that supposed to be a cell reference? If so then this version sums row 7 when the above criterion is satisfied but also only if the row 7 value is < the value in cell S39

    =SUMPRODUCT((7:7>$3:$3)*(7:7< S39),7:7)

    If that doesn't answer your question then please attach a small dummy spreadsheet with representative data - also showing required results, thanks
    Audere est facere

+ 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.2.0