+ Reply to Thread
Results 1 to 3 of 3

SUMIF random cells

  1. #1
    Registered User
    Join Date
    01-29-2008
    Posts
    7

    SUMIF random cells

    I want to add up cells only if they are more than 0. I can do this if it is a range of cells but i can't add them if it is just a string of cells.

    for example

    add Y1323+Y1330+Y1337+Y1344+Y1351+Y1358+Y1365+Y1372+Y1379+Y1386+Y1393+Y1400+Y1407+Y1414+Y1421+Y1428+Y1435+Y1442+Y1449+Y1456+Y1463+Y1470+Y1477+Y1484+Y1491 only if the contents of the cell is greater than 0

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    You say that the cells are random but in your example they're every 7th row so you could use this formula

    =SUMPRODUCT(--(MOD(ROW(Y1323:Y1491)-ROW(Y1323),7)=0),--(Y1323:Y1491>0),Y1323:Y1491)

  3. #3
    Registered User
    Join Date
    01-29-2008
    Posts
    7

    Countif

    Mr Long legs,
    Thanks for this, it works. However I have another question. I would now like to count each cell (every 7 rows) with a number greater than zero in it.
    I have tried to work it out on my own but it keeps telling me that my argument is too long. Any thoughts?

    Thanks

+ 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